|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Provides cpi cap/floor prices by interpolation and put/call parity (not cap/floor/swap* parity). More...
#include <cpicapfloortermpricesurface.hpp>
Inheritance diagram for CPICapFloorTermPriceSurface:
Collaboration diagram for CPICapFloorTermPriceSurface:Public Member Functions | |
| CPICapFloorTermPriceSurface (Real nominal, Real baseRate, const Period &observationLag, const Calendar &cal, const BusinessDayConvention &bdc, const DayCounter &dc, ext::shared_ptr< ZeroInflationIndex > zii, CPI::InterpolationType interpolationType, Handle< YieldTermStructure > yts, const std::vector< Rate > &cStrikes, const std::vector< Rate > &fStrikes, const std::vector< Period > &cfMaturities, const Matrix &cPrice, const Matrix &fPrice) | |
Public Member Functions inherited from TermStructure | |
| TermStructure (DayCounter dc=DayCounter()) | |
| default constructor More... | |
| TermStructure (const Date &referenceDate, Calendar calendar=Calendar(), DayCounter dc=DayCounter()) | |
| initialize with a fixed reference date More... | |
| TermStructure (Natural settlementDays, Calendar, DayCounter dc=DayCounter()) | |
| calculate the reference date based on the global evaluation date More... | |
| ~TermStructure () override=default | |
| virtual DayCounter | dayCounter () const |
| the day counter used for date/time conversion More... | |
| Time | timeFromReference (const Date &date) const |
| date/time conversion More... | |
| virtual Time | maxTime () const |
| the latest time for which the curve can return values More... | |
| virtual const Date & | referenceDate () const |
| the date at which discount = 1.0 and/or variance = 0.0 More... | |
| virtual Calendar | calendar () const |
| the calendar used for reference and/or option date calculation More... | |
| virtual Natural | settlementDays () const |
| the settlementDays used for reference date calculation More... | |
| void | update () override |
Public Member Functions inherited from Observer | |
| Observer ()=default | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| virtual | ~Observer () |
| std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
| void | registerWithObservables (const ext::shared_ptr< Observer > &) |
| Size | unregisterWith (const ext::shared_ptr< Observable > &) |
| void | unregisterWithAll () |
| virtual void | update ()=0 |
| virtual void | deepUpdate () |
Public Member Functions inherited from Observable | |
| Observable ()=default | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| virtual | ~Observable ()=default |
| void | notifyObservers () |
Public Member Functions inherited from Extrapolator | |
| Extrapolator ()=default | |
| virtual | ~Extrapolator ()=default |
| void | enableExtrapolation (bool b=true) |
| enable extrapolation in subsequent calls More... | |
| void | disableExtrapolation (bool b=true) |
| disable extrapolation in subsequent calls More... | |
| bool | allowsExtrapolation () const |
| tells whether extrapolation is enabled More... | |
InflationTermStructure interface | |
| ext::shared_ptr< ZeroInflationIndex > | zii_ |
| CPI::InterpolationType | interpolationType_ |
| Handle< YieldTermStructure > | nominalTS_ |
| std::vector< Rate > | cStrikes_ |
| std::vector< Rate > | fStrikes_ |
| std::vector< Period > | cfMaturities_ |
| std::vector< Real > | cfMaturityTimes_ |
| Matrix | cPrice_ |
| Matrix | fPrice_ |
| std::vector< Rate > | cfStrikes_ |
| Real | nominal_ |
| BusinessDayConvention | bdc_ |
| Period | observationLag_ |
| Rate | baseRate_ |
| virtual Period | observationLag () const |
| virtual Frequency | frequency () const |
| virtual Date | baseDate () const |
| virtual Rate | baseRate () const |
| virtual Real | nominal () const |
| inspectors More... | |
| virtual BusinessDayConvention | businessDayConvention () const |
| ext::shared_ptr< ZeroInflationIndex > | zeroInflationIndex () const |
| Rate | atmRate (Date maturity) const |
| virtual Real | price (const Period &d, Rate k) const |
| virtual Real | capPrice (const Period &d, Rate k) const |
| virtual Real | floorPrice (const Period &d, Rate k) const |
| virtual Real | price (const Date &d, Rate k) const =0 |
| virtual Real | capPrice (const Date &d, Rate k) const =0 |
| virtual Real | floorPrice (const Date &d, Rate k) const =0 |
| virtual std::vector< Rate > | strikes () const |
| virtual std::vector< Rate > | capStrikes () const |
| virtual std::vector< Rate > | floorStrikes () const |
| virtual std::vector< Period > | maturities () const |
| virtual const Matrix & | capPrices () const |
| virtual const Matrix & | floorPrices () const |
| virtual Rate | minStrike () const |
| virtual Rate | maxStrike () const |
| virtual Date | minDate () const |
| Date | maxDate () const override |
| the latest date for which the curve can return values More... | |
| virtual Date | cpiOptionDateFromTenor (const Period &p) const |
| virtual bool | checkStrike (Rate K) |
| virtual bool | checkMaturity (const Date &d) |
Additional Inherited Members | |
Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
Protected Member Functions inherited from TermStructure | |
| void | checkRange (const Date &d, bool extrapolate) const |
| date-range check More... | |
| void | checkRange (Time t, bool extrapolate) const |
| time-range check More... | |
Protected Attributes inherited from TermStructure | |
| bool | moving_ = false |
| bool | updated_ = true |
| Calendar | calendar_ |
Provides cpi cap/floor prices by interpolation and put/call parity (not cap/floor/swap* parity).
The inflation index MUST contain a ZeroInflationTermStructure as this is used to create ATM. Unlike YoY price surfaces we assume that 1) an ATM ZeroInflationTermStructure is available and 2) that it is safe to use it. This is supported by the fact that no stripping is required for CPI cap/floors as they only give one flow.
cpi cap/floors have a single (one) flow (unlike nominal caps) because they observe cumulative inflation up to their maturity. Options are on CPI(T)/CPI(0) but strikes are quoted for yearly average inflation, so require transformation via (1+quote)^T to obtain actual strikes. These are consistent with ZCIIS quoting conventions.
The observationLag is that for the referenced instrument prices. Strikes are as-quoted not as-used.
Definition at line 54 of file cpicapfloortermpricesurface.hpp.
| CPICapFloorTermPriceSurface | ( | Real | nominal, |
| Real | baseRate, | ||
| const Period & | observationLag, | ||
| const Calendar & | cal, | ||
| const BusinessDayConvention & | bdc, | ||
| const DayCounter & | dc, | ||
| ext::shared_ptr< ZeroInflationIndex > | zii, | ||
| CPI::InterpolationType | interpolationType, | ||
| Handle< YieldTermStructure > | yts, | ||
| const std::vector< Rate > & | cStrikes, | ||
| const std::vector< Rate > & | fStrikes, | ||
| const std::vector< Period > & | cfMaturities, | ||
| const Matrix & | cPrice, | ||
| const Matrix & | fPrice | ||
| ) |
Definition at line 27 of file cpicapfloortermpricesurface.cpp.
Here is the call graph for this function:
|
virtual |
Definition at line 332 of file cpicapfloortermpricesurface.hpp.
|
virtual |
Definition at line 336 of file cpicapfloortermpricesurface.hpp.
Here is the call graph for this function:
|
virtual |
Definition at line 340 of file cpicapfloortermpricesurface.hpp.
Here is the call graph for this function:
|
virtual |
Definition at line 344 of file cpicapfloortermpricesurface.hpp.
Here is the caller graph for this function:
|
virtual |
inspectors
Definition at line 348 of file cpicapfloortermpricesurface.hpp.
|
virtual |
Definition at line 353 of file cpicapfloortermpricesurface.hpp.
Here is the caller graph for this function:| ext::shared_ptr< ZeroInflationIndex > zeroInflationIndex | ( | ) | const |
Definition at line 87 of file cpicapfloortermpricesurface.hpp.
Here is the caller graph for this function:Definition at line 112 of file cpicapfloortermpricesurface.cpp.
Here is the call graph for this function:Reimplemented in InterpolatedCPICapFloorTermPriceSurface< Interpolator2D >.
Definition at line 130 of file cpicapfloortermpricesurface.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Reimplemented in InterpolatedCPICapFloorTermPriceSurface< Interpolator2D >.
Definition at line 135 of file cpicapfloortermpricesurface.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Reimplemented in InterpolatedCPICapFloorTermPriceSurface< Interpolator2D >.
Definition at line 140 of file cpicapfloortermpricesurface.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Definition at line 104 of file cpicapfloortermpricesurface.hpp.
|
virtual |
Definition at line 105 of file cpicapfloortermpricesurface.hpp.
|
virtual |
Definition at line 106 of file cpicapfloortermpricesurface.hpp.
|
virtual |
Definition at line 107 of file cpicapfloortermpricesurface.hpp.
|
virtual |
Definition at line 109 of file cpicapfloortermpricesurface.hpp.
|
virtual |
Definition at line 110 of file cpicapfloortermpricesurface.hpp.
|
virtual |
Definition at line 112 of file cpicapfloortermpricesurface.hpp.
Here is the caller graph for this function:
|
virtual |
Definition at line 113 of file cpicapfloortermpricesurface.hpp.
Here is the caller graph for this function:
|
virtual |
Definition at line 114 of file cpicapfloortermpricesurface.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
the latest date for which the curve can return values
Implements TermStructure.
Definition at line 115 of file cpicapfloortermpricesurface.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 124 of file cpicapfloortermpricesurface.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 121 of file cpicapfloortermpricesurface.hpp.
Here is the call graph for this function:Definition at line 124 of file cpicapfloortermpricesurface.hpp.
Here is the call graph for this function:
|
protected |
Definition at line 128 of file cpicapfloortermpricesurface.hpp.
|
protected |
Definition at line 129 of file cpicapfloortermpricesurface.hpp.
|
protected |
Definition at line 130 of file cpicapfloortermpricesurface.hpp.
|
protected |
Definition at line 132 of file cpicapfloortermpricesurface.hpp.
|
protected |
Definition at line 133 of file cpicapfloortermpricesurface.hpp.
|
protected |
Definition at line 134 of file cpicapfloortermpricesurface.hpp.
|
mutableprotected |
Definition at line 135 of file cpicapfloortermpricesurface.hpp.
|
protected |
Definition at line 136 of file cpicapfloortermpricesurface.hpp.
|
protected |
Definition at line 137 of file cpicapfloortermpricesurface.hpp.
|
mutableprotected |
Definition at line 139 of file cpicapfloortermpricesurface.hpp.
|
private |
Definition at line 141 of file cpicapfloortermpricesurface.hpp.
|
private |
Definition at line 142 of file cpicapfloortermpricesurface.hpp.
|
private |
Definition at line 143 of file cpicapfloortermpricesurface.hpp.
|
private |
Definition at line 144 of file cpicapfloortermpricesurface.hpp.