- QuantLib
- CPICapFloor
CPI cap or floor. More...
#include <ql/instruments/cpicapfloor.hpp>
Public Member Functions | |
CPICapFloor (Option::Type type, Real nominal, const Date &startDate, Real baseCPI, const Date &maturity, const Calendar &fixCalendar, BusinessDayConvention fixConvention, const Calendar &payCalendar, BusinessDayConvention payConvention, Rate strike, const Handle< ZeroInflationIndex > &infIndex, const Period &observationLag, CPI::InterpolationType observationInterpolation=CPI::AsIndex) | |
Inspectors | |
Option::Type | type () const |
Real | nominal () const |
Rate | strike () const |
![]() | |
Date | fixingDate () const |
Date | payDate () const |
Handle< ZeroInflationIndex > | inflationIndex () const |
Period | observationLag () const |
Instrument interface | |
bool | isExpired () const |
returns whether the instrument might have value greater than zero. | |
void | setupArguments (PricingEngine::arguments *) const |
void | fetchResults (const PricingEngine::results *r) const |
Protected Attributes | |
Option::Type | type_ |
Real | nominal_ |
Date | startDate_ |
Date | fixDate_ |
Date | payDate_ |
Real | baseCPI_ |
Date | maturity_ |
Calendar | fixCalendar_ |
BusinessDayConvention | fixConvention_ |
Calendar | payCalendar_ |
BusinessDayConvention | payConvention_ |
Rate | strike_ |
Handle< ZeroInflationIndex > | infIndex_ |
Period | observationLag_ |
CPI::InterpolationType | observationInterpolation_ |
CPI cap or floor.
Quoted as a fixed strike rate . Payoff:
where is the maturity time,
is the nominal discount factor at time
,
is the notional, and
is the inflation index value at time
.
Inflation is generally available on every day, including holidays and weekends. Hence there is a variable to state whether the observe/fix dates for inflation are adjusted or not. The default is not to adjust.
N.B. a cpi cap or floor is an option, not a cap or floor on a coupon. Thus this is very similar to a ZCIIS and has a single flow, this is as usual for cpi because it is cumulative up to option maturity from base date.
We do not inherit from Option, although this would be reasonable, because we do not have that degree of generality.
void setupArguments | ( | PricingEngine::arguments * | ) | const [virtual] |
When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument.
void fetchResults | ( | const PricingEngine::results * | r | ) | const [virtual] |
When a derived result structure is defined for an instrument, this method should be overridden to read from it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument.