QuantLib: CPILeg Class Reference

A free/open-source library for quantitative finance Reference manual - version 1.12

Public Member Functions | List of all members
CPILeg Class Reference

Helper class building a sequence of capped/floored CPI coupons. More...

`#include <ql/cashflows/cpicoupon.hpp>`

## Public Member Functions
| CPILeg (const Schedule &schedule, const boost::shared_ptr< ZeroInflationIndex > &index, const Real baseCPI, const Period &observationLag)
CPILeg & | withNotionals (Real notional)
CPILeg & | withNotionals (const std::vector< Real > &notionals)
CPILeg & | withFixedRates (Real fixedRate)
CPILeg & | withFixedRates (const std::vector< Real > &fixedRates)
CPILeg & | withPaymentDayCounter (const DayCounter &)
CPILeg & | withPaymentAdjustment (BusinessDayConvention)
CPILeg & | withPaymentCalendar (const Calendar &)
CPILeg & | withFixingDays (Natural fixingDays)
CPILeg & | withFixingDays (const std::vector< Natural > &fixingDays)
CPILeg & | withObservationInterpolation (CPI::InterpolationType)
CPILeg & | withSubtractInflationNominal (bool)
CPILeg & | withSpreads (Spread spread)
CPILeg & | withSpreads (const std::vector< Spread > &spreads)
CPILeg & | withCaps (Rate cap)
CPILeg & | withCaps (const std::vector< Rate > &caps)
CPILeg & | withFloors (Rate floor)
CPILeg & | withFloors (const std::vector< Rate > &floors)
CPILeg & | withExCouponPeriod (const Period &, const Calendar &, BusinessDayConvention, bool endOfMonth=false)
| operator Leg () const

## Detailed Description

Helper class building a sequence of capped/floored CPI coupons.

Also allowing for the inflated notional at the end... especially if there is only one date in the schedule. If a fixedRate is zero you get a FixedRateCoupon, otherwise you get a ZeroInflationCoupon.

payoff is: spread + fixedRate x index