40 const Period& observationLag,
41 ext::shared_ptr<ZeroInflationIndex> cpiIndex,
44 const std::vector<Rate>& fixedRate,
47 const Date& issueDate,
49 const Period& exCouponPeriod,
52 bool exCouponEndOfMonth)
53 :
Bond(settlementDays,
54 paymentCalendar ==
Calendar() ? schedule.calendar() : paymentCalendar,
56 frequency_(schedule.tenor().frequency()), dayCounter_(accrualDayCounter),
57 growthOnly_(growthOnly), baseCPI_(baseCPI), observationLag_(observationLag),
58 cpiIndex_(
std::move(cpiIndex)), observationInterpolation_(observationInterpolation) {
83 Leg::const_iterator i;
Cash-flow analysis functions.
Cash flow vector builders.
void calculateNotionalsFromCashflows()
ext::shared_ptr< ZeroInflationIndex > cpiIndex_
CPIBond(Natural settlementDays, Real faceAmount, bool growthOnly, Real baseCPI, const Period &observationLag, ext::shared_ptr< ZeroInflationIndex > cpiIndex, CPI::InterpolationType observationInterpolation, Schedule schedule, const std::vector< Rate > &coupons, const DayCounter &accrualDayCounter, BusinessDayConvention paymentConvention=ModifiedFollowing, const Date &issueDate=Date(), const Calendar &paymentCalendar=Calendar(), const Period &exCouponPeriod=Period(), const Calendar &exCouponCalendar=Calendar(), BusinessDayConvention exCouponConvention=Unadjusted, bool exCouponEndOfMonth=false)
CPI::InterpolationType observationInterpolation_
Helper class building a sequence of capped/floored CPI coupons.
CPILeg & withNotionals(Real notional)
CPILeg & withPaymentAdjustment(BusinessDayConvention)
CPILeg & withSubtractInflationNominal(bool)
CPILeg & withFixedRates(Real fixedRate)
CPILeg & withExCouponPeriod(const Period &, const Calendar &, BusinessDayConvention, bool endOfMonth=false)
CPILeg & withPaymentDayCounter(const DayCounter &)
CPILeg & withPaymentCalendar(const Calendar &)
CPILeg & withObservationInterpolation(CPI::InterpolationType)
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
const Date & endDate() const
zero-inflation-indexed-ratio-with-base bond
Coupon paying a zero-inflation index.
Coupon paying a fixed annual rate.
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Coupon paying a Libor-type index.
base classes for inflation indexes
InterpolationType
when you observe an index, how do you interpolate between fixings?
Interest-rate term structure.