QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Helper class building a sequence of capped/floored CPI coupons. More...
#include <cpicoupon.hpp>
Public Member Functions | |
CPILeg (Schedule schedule, ext::shared_ptr< ZeroInflationIndex > index, Real baseCPI, const Period &observationLag) | |
CPILeg & | withNotionals (Real notional) |
CPILeg & | withNotionals (const std::vector< Real > ¬ionals) |
CPILeg & | withFixedRates (Real fixedRate) |
CPILeg & | withFixedRates (const std::vector< Real > &fixedRates) |
CPILeg & | withPaymentDayCounter (const DayCounter &) |
CPILeg & | withPaymentAdjustment (BusinessDayConvention) |
CPILeg & | withPaymentCalendar (const Calendar &) |
CPILeg & | withObservationInterpolation (CPI::InterpolationType) |
CPILeg & | withSubtractInflationNominal (bool) |
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) |
CPILeg & | withBaseDate (const Date &baseDate) |
operator Leg () const | |
Private Attributes | |
Schedule | schedule_ |
ext::shared_ptr< ZeroInflationIndex > | index_ |
Real | baseCPI_ |
Period | observationLag_ |
std::vector< Real > | notionals_ |
std::vector< Real > | fixedRates_ |
DayCounter | paymentDayCounter_ |
BusinessDayConvention | paymentAdjustment_ = ModifiedFollowing |
Calendar | paymentCalendar_ |
CPI::InterpolationType | observationInterpolation_ = CPI::AsIndex |
bool | subtractInflationNominal_ = true |
std::vector< Rate > | caps_ |
std::vector< Rate > | floors_ |
Period | exCouponPeriod_ |
Calendar | exCouponCalendar_ |
BusinessDayConvention | exCouponAdjustment_ = Following |
bool | exCouponEndOfMonth_ = false |
Date | baseDate_ |
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 the fixed rate is zero you get a FixedRateCoupon, otherwise you get a ZeroInflationCoupon.
Definition at line 209 of file cpicoupon.hpp.
CPILeg | ( | Schedule | schedule, |
ext::shared_ptr< ZeroInflationIndex > | index, | ||
Real | baseCPI, | ||
const Period & | observationLag | ||
) |
Definition at line 179 of file cpicoupon.cpp.
Definition at line 209 of file cpicoupon.cpp.
Definition at line 199 of file cpicoupon.cpp.
CPILeg & withPaymentDayCounter | ( | const DayCounter & | dayCounter | ) |
CPILeg & withPaymentAdjustment | ( | BusinessDayConvention | convention | ) |
CPILeg & withObservationInterpolation | ( | CPI::InterpolationType | interp | ) |
Definition at line 234 of file cpicoupon.cpp.
Definition at line 239 of file cpicoupon.cpp.
Definition at line 244 of file cpicoupon.cpp.
Definition at line 249 of file cpicoupon.cpp.
CPILeg & withExCouponPeriod | ( | const Period & | period, |
const Calendar & | cal, | ||
BusinessDayConvention | convention, | ||
bool | endOfMonth = false |
||
) |
Definition at line 266 of file cpicoupon.cpp.
operator Leg | ( | ) | const |
|
private |
Definition at line 237 of file cpicoupon.hpp.
|
private |
Definition at line 238 of file cpicoupon.hpp.
|
private |
Definition at line 239 of file cpicoupon.hpp.
|
private |
Definition at line 240 of file cpicoupon.hpp.
|
private |
Definition at line 241 of file cpicoupon.hpp.
|
private |
Definition at line 242 of file cpicoupon.hpp.
|
private |
Definition at line 243 of file cpicoupon.hpp.
|
private |
Definition at line 244 of file cpicoupon.hpp.
|
private |
Definition at line 245 of file cpicoupon.hpp.
|
private |
Definition at line 246 of file cpicoupon.hpp.
|
private |
Definition at line 247 of file cpicoupon.hpp.
|
private |
Definition at line 248 of file cpicoupon.hpp.
|
private |
Definition at line 248 of file cpicoupon.hpp.
|
private |
Definition at line 249 of file cpicoupon.hpp.
|
private |
Definition at line 250 of file cpicoupon.hpp.
|
private |
Definition at line 251 of file cpicoupon.hpp.
|
private |
Definition at line 252 of file cpicoupon.hpp.
|
private |
Definition at line 253 of file cpicoupon.hpp.