27 const Date &paymentDate,
Real nominal,
const Date &startDate,
29 const ext::shared_ptr<SwapSpreadIndex> &index,
Real gearing,
31 const Date &refPeriodEnd,
32 const DayCounter &dayCounter,
bool isInArrears,
const Date &exCouponDate)
34 fixingDays, index, gearing, spread,
35 refPeriodStart, refPeriodEnd, dayCounter,
36 isInArrears, exCouponDate),
48 : schedule_(
std::move(schedule)), swapSpreadIndex_(
std::move(index)) {
87 gearings_ = std::vector<Real>(1, gearing);
98 spreads_ = std::vector<Spread>(1, spread);
109 caps_ = std::vector<Rate>(1, cap);
119 floors_ = std::vector<Rate>(1, floor);
138 CmsSpreadLeg::operator
Leg()
const {
141 schedule_, notionals_, swapSpreadIndex_, paymentDayCounter_,
142 paymentAdjustment_, fixingDays_, gearings_, spreads_, caps_,
143 floors_, inArrears_, zeroPayments_);
Floating rate coupon with additional cap/floor.
Cash flow vector builders.
degenerate base class for the Acyclic Visitor pattern
CmsSpreadCoupon(const Date &paymentDate, Real nominal, const Date &startDate, const Date &endDate, Natural fixingDays, const ext::shared_ptr< SwapSpreadIndex > &index, Real gearing=1.0, Spread spread=0.0, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), const DayCounter &dayCounter=DayCounter(), bool isInArrears=false, const Date &exCouponDate=Date())
void accept(AcyclicVisitor &) override
helper class building a sequence of capped/floored cms-spread-rate coupons
CmsSpreadLeg & withPaymentAdjustment(BusinessDayConvention)
BusinessDayConvention paymentAdjustment_
std::vector< Rate > caps_
CmsSpreadLeg & withSpreads(Spread spread)
ext::shared_ptr< SwapSpreadIndex > swapSpreadIndex_
CmsSpreadLeg & withFloors(Rate floor)
CmsSpreadLeg(Schedule schedule, ext::shared_ptr< SwapSpreadIndex > swapSpreadIndex)
CmsSpreadLeg & withGearings(Real gearing)
CmsSpreadLeg & withCaps(Rate cap)
std::vector< Real > notionals_
CmsSpreadLeg & inArrears(bool flag=true)
std::vector< Spread > spreads_
CmsSpreadLeg & withFixingDays(Natural fixingDays)
CmsSpreadLeg & withPaymentDayCounter(const DayCounter &)
std::vector< Natural > fixingDays_
CmsSpreadLeg & withZeroPayments(bool flag=true)
std::vector< Rate > floors_
std::vector< Real > gearings_
DayCounter paymentDayCounter_
CmsSpreadLeg & withNotionals(Real notional)
base floating-rate coupon class
void accept(AcyclicVisitor &) override
class for swap-rate spread indexes
Visitor for a specific class
virtual void visit(T &)=0
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Real Spread
spreads on interest rates
Leg FloatingLeg(const Schedule &schedule, const std::vector< Real > &nominals, const ext::shared_ptr< InterestRateIndexType > &index, const DayCounter &paymentDayCounter, BusinessDayConvention paymentAdj, const std::vector< Natural > &fixingDays, const std::vector< Real > &gearings, const std::vector< Spread > &spreads, const std::vector< Rate > &caps, const std::vector< Rate > &floors, bool isInArrears, bool isZero, Integer paymentLag=0, Calendar paymentCalendar=Calendar(), Period exCouponPeriod=Period(), Calendar exCouponCalendar=Calendar(), BusinessDayConvention exCouponAdjustment=Unadjusted, bool exCouponEndOfMonth=false)
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
ext::shared_ptr< BlackVolTermStructure > v