52 ") less than floor level (" <<
floor <<
")");
58 const ext::shared_ptr<YoYInflationCoupon>& underlying,
61 underlying->nominal(),
62 underlying->accrualStartDate(),
63 underlying->accrualEndDate(),
64 underlying->fixingDays(),
65 underlying->yoyIndex(),
66 underlying->observationLag(),
67 underlying->dayCounter(),
68 underlying->gearing(),
70 underlying->referencePeriodStart(),
71 underlying->referencePeriodEnd()),
72 underlying_(underlying), isFloored_(false), isCapped_(false) {
79 const ext::shared_ptr<YoYInflationCouponPricer>& pricer) {
103 return swapletRate + floorletRate - capletRate;
caplet and floorlet pricing for YoY inflation coupons
degenerate base class for the Acyclic Visitor pattern
CappedFlooredYoYInflationCoupon(const ext::shared_ptr< YoYInflationCoupon > &underlying, Rate cap=Null< Rate >(), Rate floor=Null< Rate >())
ext::shared_ptr< YoYInflationCoupon > underlying_
void setCommon(Rate cap, Rate floor)
Rate rate() const override
swap(let) rate
void setPricer(const ext::shared_ptr< YoYInflationCouponPricer > &)
Rate effectiveCap() const
effective cap of fixing
Rate underlyingRate() const
this returns the expected rate before cap and floor are applied
Rate effectiveFloor() const
effective floor of fixing
void accept(AcyclicVisitor &v) override
virtual Rate rate() const =0
accrued rate
ext::shared_ptr< InflationCouponPricer > pricer() const
void setPricer(const ext::shared_ptr< InflationCouponPricer > &)
template class providing a null value for a given type.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Visitor for a specific class
virtual void visit(T &)=0
Coupon paying a YoY-inflation type index
Real gearing() const
index gearing, i.e. multiplicative coefficient for the index
Spread spread() const
spread paid over the fixing of the underlying index
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
ext::shared_ptr< BlackVolTermStructure > v