39 const Date& startDate,
47 ext::shared_ptr<ZeroInflationIndex> index,
48 const Period& observationLag,
50 : type_(type), nominal_(nominal), startDate_(startDate), baseCPI_(baseCPI), maturity_(maturity),
51 fixCalendar_(
std::move(fixCalendar)), fixConvention_(fixConvention),
52 payCalendar_(
std::move(payCalendar)), payConvention_(payConvention),
strike_(strike),
53 index_(
std::move(index)), observationLag_(observationLag),
54 observationInterpolation_(observationInterpolation) {
61 "CPIcapfloor's observationLag must be at least availabilityLag of inflation index: "
62 <<
"when the observation is effectively flat"
66 "CPIcapfloor's observationLag must be greater than availabilityLag of inflation index: "
67 <<
"when the observation is effectively linear"
Cash-flow analysis functions.
Cash flow vector builders.
BusinessDayConvention payConvention
CPI::InterpolationType observationInterpolation
ext::shared_ptr< ZeroInflationIndex > index
BusinessDayConvention fixConvention
void validate() const override
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
ext::shared_ptr< ZeroInflationIndex > index_
CPI::InterpolationType observationInterpolation_
BusinessDayConvention payConvention_
BusinessDayConvention fixConvention_
CPICapFloor(Option::Type type, Real nominal, const Date &startDate, Real baseCPI, const Date &maturity, Calendar fixCalendar, BusinessDayConvention fixConvention, Calendar payCalendar, BusinessDayConvention payConvention, Rate strike, ext::shared_ptr< ZeroInflationIndex > inflationIndex, const Period &observationLag, CPI::InterpolationType observationInterpolation=CPI::AsIndex)
Date adjust(const Date &, BusinessDayConvention convention=Following) const
static Settings & instance()
access to the unique instance
zero-inflation-indexed-ratio-with-base option
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Coupon paying a fixed annual rate.
BusinessDayConvention
Business Day conventions.
Coupon paying a Libor-type index.
base classes for inflation indexes
bool isInterpolated(const QuantLib::CPI::InterpolationType &type=QuantLib::CPI::AsIndex)
InterpolationType
when you observe an index, how do you interpolate between fixings?
Interest-rate term structure.