24#ifndef quantlib_newyoy_coupon_hpp
25#define quantlib_newyoy_coupon_hpp
32 class YoYInflationCouponPricer;
39 const Date& startDate,
42 const ext::shared_ptr<YoYInflationIndex>&
index,
54 [[deprecated(
"Use the overload that passes an interpolation type instead")]]
57 const Date& startDate,
60 const ext::shared_ptr<YoYInflationIndex>&
index,
79 const ext::shared_ptr<YoYInflationIndex>&
yoyIndex()
const;
94 bool checkPricerImpl(
const ext::shared_ptr<InflationCouponPricer>&)
const override;
97 inline const ext::shared_ptr<YoYInflationIndex>&
118 ext::shared_ptr<YoYInflationIndex> index,
119 const Period& observationLag,
124 [[deprecated(
"Use the overload that passes an interpolation type instead")]]
127 ext::shared_ptr<YoYInflationIndex> index,
128 const Period& observationLag);
143 operator Leg()
const;
146 ext::shared_ptr<YoYInflationIndex>
index_;
degenerate base class for the Acyclic Visitor pattern
virtual Real nominal() const
Base inflation-coupon class.
Natural fixingDays() const
fixing days
Rate rate() const override
accrued rate
Period observationLag() const
how the coupon observes the index
DayCounter dayCounter() const override
day counter for accrual calculation
const ext::shared_ptr< InflationIndex > & index() const
yoy inflation index
Coupon paying a YoY-inflation type index
bool checkPricerImpl(const ext::shared_ptr< InflationCouponPricer > &) const override
makes sure you were given the correct type of pricer
CPI::InterpolationType interpolation() const
Rate indexFixing() const override
fixing of the underlying index, as observed by the coupon
CPI::InterpolationType interpolation_
void accept(AcyclicVisitor &) override
Real gearing() const
index gearing, i.e. multiplicative coefficient for the index
const ext::shared_ptr< YoYInflationIndex > & yoyIndex() const
Rate adjustedFixing() const
ext::shared_ptr< YoYInflationIndex > yoyIndex_
Spread spread() const
spread paid over the fixing of the underlying index
Helper class building a sequence of capped/floored yoy inflation coupons.
BusinessDayConvention paymentAdjustment_
std::vector< Rate > caps_
yoyInflationLeg & withSpreads(Spread spread)
yoyInflationLeg & withFloors(Rate floor)
yoyInflationLeg & withPaymentAdjustment(BusinessDayConvention)
ext::shared_ptr< YoYInflationIndex > index_
yoyInflationLeg & withNotionals(Real notional)
Calendar paymentCalendar_
yoyInflationLeg & withGearings(Real gearing)
CPI::InterpolationType interpolation_
std::vector< Real > notionals_
std::vector< Spread > spreads_
yoyInflationLeg & withPaymentDayCounter(const DayCounter &)
std::vector< Natural > fixingDays_
yoyInflationLeg & withCaps(Rate cap)
std::vector< Rate > floors_
yoyInflationLeg & withFixingDays(Natural fixingDays)
std::vector< Real > gearings_
DayCounter paymentDayCounter_
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Real Spread
spreads on interest rates
Coupon paying a variable index-based rate.
base classes for inflation indexes
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
InterpolationType
when you observe an index, how do you interpolate between fixings?