22#ifndef quantlib_cmsspread_coupon_hpp
23#define quantlib_cmsspread_coupon_hpp
45 const Date& startDate,
48 const ext::shared_ptr<SwapSpreadIndex>&
index,
67 ext::shared_ptr<SwapSpreadIndex>
index_;
73 const Date& paymentDate,
75 const Date& startDate,
78 const ext::shared_ptr<SwapSpreadIndex>&
index,
122 operator Leg()
const;
Floating rate coupon with additional cap/floor.
degenerate base class for the Acyclic Visitor pattern
CappedFlooredCmsSpreadCoupon(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 Rate cap=Null< Rate >(), const Rate floor=Null< Rate >(), const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), const DayCounter &dayCounter=DayCounter(), bool isInArrears=false, const Date &exCouponDate=Date())
void accept(AcyclicVisitor &v) override
Capped and/or floored floating-rate coupon.
void accept(AcyclicVisitor &) override
const ext::shared_ptr< SwapSpreadIndex > & swapSpreadIndex() const
void accept(AcyclicVisitor &) override
ext::shared_ptr< SwapSpreadIndex > index_
base pricer for vanilla CMS spread coupons
CmsSpreadCouponPricer(Handle< Quote > correlation=Handle< Quote >())
Handle< Quote > correlation_
Handle< Quote > correlation() const
void setCorrelation(const Handle< Quote > &correlation=Handle< Quote >())
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 & 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)
Date exCouponDate() const override
returns the date that the cash flow trades exCoupon
virtual Real nominal() const
base floating-rate coupon class
Natural fixingDays() const
fixing days
Real gearing() const
index gearing, i.e. multiplicative coefficient for the index
DayCounter dayCounter() const override
day counter for accrual calculation
const ext::shared_ptr< InterestRateIndex > & index() const
floating index
Spread spread() const
spread paid over the fixing of the underlying index
bool isInArrears() const
whether or not the coupon fixes in arrears
generic pricer for floating-rate coupons
Shared handle to an observable.
template class providing a null value for a given type.
Size unregisterWith(const ext::shared_ptr< Observable > &)
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Visitor for a specific class
virtual void visit(T &)=0
Coupon paying a variable index-based rate.
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Real Spread
spreads on interest rates
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
ext::shared_ptr< BlackVolTermStructure > v