Stripped zero inflation volatility structure. More...
#include <qle/termstructures/inflation/cpipricevolatilitysurface.hpp>
Public Member Functions | |
CPIPriceVolatilitySurface (PriceQuotePreference type, const QuantLib::Period &observationLag, const QuantLib::Calendar &cal, const QuantLib::BusinessDayConvention &bdc, const QuantLib::DayCounter &dc, const QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > index, QuantLib::Handle< QuantLib::YieldTermStructure > yts, const std::vector< QuantLib::Rate > &cStrikes, const std::vector< QuantLib::Rate > &fStrikes, const std::vector< QuantLib::Period > &cfMaturities, const QuantLib::Matrix &cPrice, const QuantLib::Matrix &fPrice, const QuantLib::ext::shared_ptr< QuantExt::CPICapFloorEngine > &engine, const bool quotedInstrumentsAreInterpolated=false, const QuantLib::Date &capFloorStartDate=QuantLib::Date(), bool ignoreMissingPrices=false, bool lowerStrikeConstExtrap=true, bool upperStrikeConstExtrap=true, const QuantLib::VolatilityType &volType=QuantLib::ShiftedLognormal, const double displacement=0.0, const QuantLib::Real &upperVolBound=CPIPriceVolatilitySurfaceDefaultValues::upperVolBound, const QuantLib::Real &lowerVolBound=CPIPriceVolatilitySurfaceDefaultValues::lowerVolBound, const QuantLib::Real &solverTolerance=CPIPriceVolatilitySurfaceDefaultValues::solverTolerance) | |
QL_DEPRECATED | CPIPriceVolatilitySurface (PriceQuotePreference type, const QuantLib::Period &observationLag, const QuantLib::Calendar &cal, const QuantLib::BusinessDayConvention &bdc, const QuantLib::DayCounter &dc, const QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > index, QuantLib::Handle< QuantLib::YieldTermStructure > yts, const std::vector< QuantLib::Rate > &cStrikes, const std::vector< QuantLib::Rate > &fStrikes, const std::vector< QuantLib::Period > &cfMaturities, const QuantLib::Matrix &cPrice, const QuantLib::Matrix &fPrice, const QuantLib::ext::shared_ptr< QuantExt::CPICapFloorEngine > &engine, const QuantLib::Date &capFloorStartDate=QuantLib::Date(), bool ignoreMissingPrices=false, bool lowerStrikeConstExtrap=true, bool upperStrikeConstExtrap=true, const QuantLib::VolatilityType &volType=QuantLib::ShiftedLognormal, const double displacement=0.0, const QuantLib::Real &upperVolBound=CPIPriceVolatilitySurfaceDefaultValues::upperVolBound, const QuantLib::Real &lowerVolBound=CPIPriceVolatilitySurfaceDefaultValues::lowerVolBound, const QuantLib::Real &solverTolerance=CPIPriceVolatilitySurfaceDefaultValues::solverTolerance) |
LazyObject interface | |
void | performCalculations () const override |
void | update () override |
Limits | |
QuantLib::Real | minStrike () const override |
the minimum strike for which the term structure can return vols More... | |
QuantLib::Real | maxStrike () const override |
the maximum strike for which the term structure can return vols More... | |
QuantLib::Date | maxDate () const override |
maximum date for which the term structure can return vols More... | |
Public Member Functions inherited from CPIVolatilitySurface | |
CPIVolatilitySurface (QuantLib::Natural settlementDays, const QuantLib::Calendar &, QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dc, const QuantLib::Period &observationLag, QuantLib::Frequency frequency, bool indexIsInterpolated, const QuantLib::Date &capFloorStartDate=QuantLib::Date(), QuantLib::VolatilityType volType=QuantLib::ShiftedLognormal, double displacement=0.0) | |
QuantLib::Date | optionDateFromTenor (const QuantLib::Period &tenor) const override |
Computes the expiry date from the capFloorStartDate() More... | |
QuantLib::Date | baseDate () const override |
base date will be in the past More... | |
QuantLib::VolatilityType | volatilityType () const |
Returns the volatility type. More... | |
double | displacement () const |
Returns the displacement for lognormal volatilities. More... | |
bool | isLogNormal () const |
QuantLib::Volatility | volatility (const QuantLib::Date &maturityDate, QuantLib::Rate strike, const QuantLib::Period &obsLag=QuantLib::Period(-1, QuantLib::Days), bool extrapolate=false) const override |
virtual QuantLib::Real | atmStrike (const QuantLib::Date &maturity, const QuantLib::Period &obsLag=QuantLib::Period(-1, QuantLib::Days)) const =0 |
QuantLib::Date | capFloorStartDate () const |
Inspectors | |
PriceQuotePreference | preference_ |
QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > | index_ |
QuantLib::Handle< QuantLib::YieldTermStructure > | yts_ |
std::vector< double > | capStrikes_ |
std::vector< double > | floorStrikes_ |
QuantLib::ext::shared_ptr< QuantExt::CPICapFloorEngine > | engine_ |
bool | ignoreMissingPrices_ |
bool | lowerStrikeConstExtrap_ |
bool | upperStrikeConstExtrap_ |
QuantLib::Real | upperVolBound_ |
QuantLib::Real | lowerVolBound_ |
QuantLib::Real | solverTolerance_ |
std::vector< QuantLib::Period > | expiries_ |
std::vector< QuantLib::Rate > | strikes_ |
QuantLib::Matrix | capPrices_ |
QuantLib::Matrix | floorPrices_ |
std::vector< QuantLib::Date > | fixingDates_ |
QuantLib::Matrix | volData_ |
std::vector< std::vector< bool > > | missingPrices_ |
std::vector< std::vector< bool > > | failedPrices_ |
QuantLib::ext::shared_ptr< QuantExt::OptionInterpolator2d< InterpolatorStrike, InterpolatorTime > > | volSurface_ |
const std::vector< QuantLib::Real > & | strikes () |
Returns the strikes. More... | |
const std::vector< QuantLib::Period > & | maturities () |
Returns the tenors. More... | |
const QuantLib::Matrix & | volData () const |
const std::vector< std::vector< bool > > & | missingValues () const |
const std::vector< std::vector< bool > > & | pricesFailedToConvert () const |
double | baseCPI () const |
CPI fixing on the baseDate of the surface. More... | |
double | atmGrowth (QuantLib::Period &tenor) const |
double | atmGrowth (const QuantLib::Date &date) const |
QuantLib::Real | atmStrike (const QuantLib::Date &maturity, const QuantLib::Period &obsLag=QuantLib::Period(-1, QuantLib::Days)) const override |
virtual void | validateInputParameters () const |
virtual void | initializeStrikes () const |
double | priceFromPutCallParity (double price, bool isCapPrice, double atm, double strikeGrowth, double df) const |
Computes a cap price from a floor price using the put-call parity and vice-versa. More... | |
double | floorPrice (double strike, size_t tenorIdx, double atm, double strikeGrowth, double df) const |
Returns floor price for strike level (average annual inflation) and maturity index. More... | |
double | capPrice (double strike, size_t tenorIdx, double atm, double strikeGrowth, double df) const |
Returns cap price for strike level (average annual inflation) and maturity index. More... | |
QuantLib::Volatility | volatilityImpl (QuantLib::Time length, QuantLib::Rate strike) const override |
bool | chooseFloor (QuantLib::Real strike, QuantLib::Real atmRate) const |
double | implyVol (double strike, const QuantLib::Date &maturity, double price, bool isFloor) const |
Additional Inherited Members | |
Protected Member Functions inherited from CPIVolatilitySurface | |
virtual double | fixingTime (const QuantLib::Date &maturityDate) const |
Computes the expiry time from the capFloorStartDate() More... | |
Protected Attributes inherited from CPIVolatilitySurface | |
QuantLib::VolatilityType | volType_ |
double | displacement_ |
Stripped zero inflation volatility structure.
The surface provides implied CPI Black volatilities for the union of strikes that occur in the underlying cap and floor price surface.
The type argument determines which kind of price quotes are used with priority when there is an overlap, i.e. strikes for which we have both cap and floor quotes: If type is Cap: Use cap quotes where available, floor quotes otherwise If type is Floor: Use floor quotes where available, cap quotes otherwise If type is CapFloor: In case of overlap, use floor quotes up to the ATM strike, cap quotes for strikes beyond ATM
Definition at line 56 of file cpipricevolatilitysurface.hpp.
CPIPriceVolatilitySurface | ( | PriceQuotePreference | type, |
const QuantLib::Period & | observationLag, | ||
const QuantLib::Calendar & | cal, | ||
const QuantLib::BusinessDayConvention & | bdc, | ||
const QuantLib::DayCounter & | dc, | ||
const QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > | index, | ||
QuantLib::Handle< QuantLib::YieldTermStructure > | yts, | ||
const std::vector< QuantLib::Rate > & | cStrikes, | ||
const std::vector< QuantLib::Rate > & | fStrikes, | ||
const std::vector< QuantLib::Period > & | cfMaturities, | ||
const QuantLib::Matrix & | cPrice, | ||
const QuantLib::Matrix & | fPrice, | ||
const QuantLib::ext::shared_ptr< QuantExt::CPICapFloorEngine > & | engine, | ||
const bool | quotedInstrumentsAreInterpolated = false , |
||
const QuantLib::Date & | capFloorStartDate = QuantLib::Date() , |
||
bool | ignoreMissingPrices = false , |
||
bool | lowerStrikeConstExtrap = true , |
||
bool | upperStrikeConstExtrap = true , |
||
const QuantLib::VolatilityType & | volType = QuantLib::ShiftedLognormal , |
||
const double | displacement = 0.0 , |
||
const QuantLib::Real & | upperVolBound = CPIPriceVolatilitySurfaceDefaultValues::upperVolBound , |
||
const QuantLib::Real & | lowerVolBound = CPIPriceVolatilitySurfaceDefaultValues::lowerVolBound , |
||
const QuantLib::Real & | solverTolerance = CPIPriceVolatilitySurfaceDefaultValues::solverTolerance |
||
) |
Definition at line 206 of file cpipricevolatilitysurface.hpp.
QL_DEPRECATED_DISABLE_WARNING CPIPriceVolatilitySurface | ( | PriceQuotePreference | type, |
const QuantLib::Period & | observationLag, | ||
const QuantLib::Calendar & | cal, | ||
const QuantLib::BusinessDayConvention & | bdc, | ||
const QuantLib::DayCounter & | dc, | ||
const QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > | index, | ||
QuantLib::Handle< QuantLib::YieldTermStructure > | yts, | ||
const std::vector< QuantLib::Rate > & | cStrikes, | ||
const std::vector< QuantLib::Rate > & | fStrikes, | ||
const std::vector< QuantLib::Period > & | cfMaturities, | ||
const QuantLib::Matrix & | cPrice, | ||
const QuantLib::Matrix & | fPrice, | ||
const QuantLib::ext::shared_ptr< QuantExt::CPICapFloorEngine > & | engine, | ||
const QuantLib::Date & | capFloorStartDate = QuantLib::Date() , |
||
bool | ignoreMissingPrices = false , |
||
bool | lowerStrikeConstExtrap = true , |
||
bool | upperStrikeConstExtrap = true , |
||
const QuantLib::VolatilityType & | volType = QuantLib::ShiftedLognormal , |
||
const double | displacement = 0.0 , |
||
const QuantLib::Real & | upperVolBound = CPIPriceVolatilitySurfaceDefaultValues::upperVolBound , |
||
const QuantLib::Real & | lowerVolBound = CPIPriceVolatilitySurfaceDefaultValues::lowerVolBound , |
||
const QuantLib::Real & | solverTolerance = CPIPriceVolatilitySurfaceDefaultValues::solverTolerance |
||
) |
Definition at line 236 of file cpipricevolatilitysurface.hpp.
|
override |
Definition at line 269 of file cpipricevolatilitysurface.hpp.
|
override |
Definition at line 102 of file cpipricevolatilitysurface.hpp.
|
override |
the minimum strike for which the term structure can return vols
Definition at line 386 of file cpipricevolatilitysurface.hpp.
|
override |
the maximum strike for which the term structure can return vols
Definition at line 391 of file cpipricevolatilitysurface.hpp.
|
override |
maximum date for which the term structure can return vols
Definition at line 396 of file cpipricevolatilitysurface.hpp.
const std::vector< QuantLib::Real > & strikes | ( | ) |
const std::vector< QuantLib::Period > & maturities | ( | ) |
const QuantLib::Matrix & volData | ( | ) | const |
Definition at line 125 of file cpipricevolatilitysurface.hpp.
const std::vector< std::vector< bool > > & missingValues | ( | ) | const |
Definition at line 130 of file cpipricevolatilitysurface.hpp.
const std::vector< std::vector< bool > > & pricesFailedToConvert | ( | ) | const |
Definition at line 135 of file cpipricevolatilitysurface.hpp.
|
protected |
CPI fixing on the baseDate of the surface.
Definition at line 409 of file cpipricevolatilitysurface.hpp.
|
protected |
Definition at line 414 of file cpipricevolatilitysurface.hpp.
|
protected |
Definition at line 419 of file cpipricevolatilitysurface.hpp.
|
overrideprotectedvirtual |
Implements CPIVolatilitySurface.
Definition at line 564 of file cpipricevolatilitysurface.hpp.
|
privatevirtual |
Definition at line 424 of file cpipricevolatilitysurface.hpp.
|
privatevirtual |
Definition at line 464 of file cpipricevolatilitysurface.hpp.
|
private |
Computes a cap price from a floor price using the put-call parity and vice-versa.
Definition at line 474 of file cpipricevolatilitysurface.hpp.
|
private |
Returns floor price for strike level (average annual inflation) and maturity index.
Definition at line 485 of file cpipricevolatilitysurface.hpp.
|
private |
Returns cap price for strike level (average annual inflation) and maturity index.
Definition at line 505 of file cpipricevolatilitysurface.hpp.
|
overrideprivate |
Definition at line 402 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 329 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 524 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 176 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 177 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 178 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 179 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 180 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 182 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 183 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 184 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 185 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 186 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 187 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 188 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 190 of file cpipricevolatilitysurface.hpp.
|
mutableprivate |
Definition at line 191 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 193 of file cpipricevolatilitysurface.hpp.
|
private |
Definition at line 194 of file cpipricevolatilitysurface.hpp.
|
mutableprivate |
Definition at line 195 of file cpipricevolatilitysurface.hpp.
|
mutableprivate |
Definition at line 196 of file cpipricevolatilitysurface.hpp.
|
mutableprivate |
Definition at line 197 of file cpipricevolatilitysurface.hpp.
|
mutableprivate |
Definition at line 198 of file cpipricevolatilitysurface.hpp.
|
mutableprivate |
Definition at line 200 of file cpipricevolatilitysurface.hpp.