Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ConstantCPIVolatility Class Reference

#include <qle/termstructures/inflation/constantcpivolatility.hpp>

+ Inheritance diagram for ConstantCPIVolatility:
+ Collaboration diagram for ConstantCPIVolatility:

Public Member Functions

 ConstantCPIVolatility (QuantLib::Volatility v, 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 maxDate () const override
 
QuantLib::Real minStrike () const override
 
QuantLib::Real maxStrike () const override
 
QuantLib::Real atmStrike (const QuantLib::Date &maturity, const QuantLib::Period &obsLag=QuantLib::Period(-1, QuantLib::Days)) const override
 
- 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
 

Private Member Functions

virtual QuantLib::Volatility volatilityImpl (QuantLib::Time length, QuantLib::Rate strike) const override
 

Private Attributes

double constantVol_
 

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_
 

Detailed Description

Definition at line 29 of file constantcpivolatility.hpp.

Constructor & Destructor Documentation

◆ ConstantCPIVolatility()

ConstantCPIVolatility ( QuantLib::Volatility  v,
QuantLib::Natural  settlementDays,
const QuantLib::Calendar &  cal,
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 
)

Definition at line 24 of file constantcpivolatility.cpp.

30 : QuantExt::CPIVolatilitySurface(settlementDays, cal, bdc, dc, observationLag, frequency, indexIsInterpolated,
32 constantVol_(v){}
double displacement() const
Returns the displacement for lognormal volatilities.
QuantLib::Date capFloorStartDate() const

Member Function Documentation

◆ maxDate()

QuantLib::Date maxDate ( ) const
override

Definition at line 38 of file constantcpivolatility.hpp.

38{ return QuantLib::Date::maxDate(); }

◆ minStrike()

QuantLib::Real minStrike ( ) const
override

Definition at line 40 of file constantcpivolatility.hpp.

40{ return QL_MIN_REAL; }

◆ maxStrike()

QuantLib::Real maxStrike ( ) const
override

Definition at line 42 of file constantcpivolatility.hpp.

42{ return QL_MAX_REAL; }

◆ atmStrike()

QuantLib::Real atmStrike ( const QuantLib::Date &  maturity,
const QuantLib::Period &  obsLag = QuantLib::Period(-1, QuantLib::Days) 
) const
overridevirtual

Implements CPIVolatilitySurface.

Definition at line 38 of file constantcpivolatility.cpp.

38 {
39 // Not relevant for constantCPIVolatiltiy;
40 return 0.0;
41};

◆ volatilityImpl()

QuantLib::Volatility volatilityImpl ( QuantLib::Time  length,
QuantLib::Rate  strike 
) const
overrideprivatevirtual

Definition at line 34 of file constantcpivolatility.cpp.

34 {
35 return constantVol_;
36};

Member Data Documentation

◆ constantVol_

double constantVol_
private

Definition at line 49 of file constantcpivolatility.hpp.