QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | List of all members
InterpolatedCPICapFloorTermPriceSurface< Interpolator2D > Class Template Reference

#include <ql/experimental/inflation/cpicapfloortermpricesurface.hpp>

+ Inheritance diagram for InterpolatedCPICapFloorTermPriceSurface< Interpolator2D >:
+ Collaboration diagram for InterpolatedCPICapFloorTermPriceSurface< Interpolator2D >:

Public Member Functions

 InterpolatedCPICapFloorTermPriceSurface (Real nominal, Rate startRate, const Period &observationLag, const Calendar &cal, const BusinessDayConvention &bdc, const DayCounter &dc, const ext::shared_ptr< ZeroInflationIndex > &zii, CPI::InterpolationType interpolationType, const Handle< YieldTermStructure > &yts, const std::vector< Rate > &cStrikes, const std::vector< Rate > &fStrikes, const std::vector< Period > &cfMaturities, const Matrix &cPrice, const Matrix &fPrice, const Interpolator2D &interpolator2d=Interpolator2D())
 
- Public Member Functions inherited from CPICapFloorTermPriceSurface
 CPICapFloorTermPriceSurface (Real nominal, Real baseRate, const Period &observationLag, const Calendar &cal, const BusinessDayConvention &bdc, const DayCounter &dc, const 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)
 
Period observationLag () const override
 
Date baseDate () const override
 minimum (base) date More...
 
virtual Real nominal () const
 inspectors More...
 
virtual BusinessDayConvention businessDayConvention () const
 
ext::shared_ptr< ZeroInflationIndexzeroInflationIndex () const
 
Rate atmRate (Date maturity) const
 
virtual std::vector< Ratestrikes () const
 
virtual std::vector< RatecapStrikes () const
 
virtual std::vector< RatefloorStrikes () const
 
virtual std::vector< Periodmaturities () const
 
virtual const MatrixcapPrices () const
 
virtual const MatrixfloorPrices () 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
 
- Public Member Functions inherited from InflationTermStructure
 InflationTermStructure (Rate baseRate, const Period &observationLag, Frequency frequency, const DayCounter &dayCounter=DayCounter(), ext::shared_ptr< Seasonality > seasonality={})
 
 InflationTermStructure (const Date &referenceDate, Rate baseRate, const Period &observationLag, Frequency frequency, const Calendar &calendar=Calendar(), const DayCounter &dayCounter=DayCounter(), ext::shared_ptr< Seasonality > seasonality={})
 
 InflationTermStructure (Natural settlementDays, const Calendar &calendar, Rate baseRate, const Period &observationLag, Frequency frequency, const DayCounter &dayCounter=DayCounter(), ext::shared_ptr< Seasonality > seasonality={})
 
virtual Frequency frequency () const
 
virtual Rate baseRate () const
 
void setSeasonality (const ext::shared_ptr< Seasonality > &seasonality={})
 Functions to set and get seasonality. More...
 
ext::shared_ptr< Seasonalityseasonality () const
 
bool hasSeasonality () const
 
- 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 DatereferenceDate () 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 &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (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 ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (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...
 

LazyObject interface

Matrix cPriceB_
 
Matrix fPriceB_
 
Interpolation2D capPrice_
 
Interpolation2D floorPrice_
 
Interpolator2D interpolator2d_
 
void performCalculations () const
 
Real price (const Date &d, Rate k) const override
 remember that the strikes use the quoting convention More...
 
Real capPrice (const Date &d, Rate k) const override
 remember that the strike uses the quoting convention More...
 
Real floorPrice (const Date &d, Rate k) const override
 remember that the strike uses the quoting convention More...
 
virtual Real price (const Period &d, Rate k) const
 required to allow for method hiding More...
 
virtual Real price (const Date &d, Rate k) const=0
 required to allow for method hiding More...
 
virtual Real capPrice (const Period &d, Rate k) const
 
virtual Real capPrice (const Date &d, Rate k) const=0
 
virtual Real floorPrice (const Period &d, Rate k) const
 
virtual Real floorPrice (const Date &d, Rate k) const=0
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from CPICapFloorTermPriceSurface
virtual bool checkStrike (Rate K)
 
virtual bool checkMaturity (const Date &d)
 
- Protected Member Functions inherited from InflationTermStructure
virtual void setBaseRate (const Rate &r)
 
void checkRange (const Date &, bool extrapolate) const
 
void checkRange (Time t, bool extrapolate) const
 
- 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 CPICapFloorTermPriceSurface
ext::shared_ptr< ZeroInflationIndexzii_
 
CPI::InterpolationType interpolationType_
 
Handle< YieldTermStructurenominalTS_
 
std::vector< RatecStrikes_
 
std::vector< RatefStrikes_
 
std::vector< PeriodcfMaturities_
 
std::vector< RealcfMaturityTimes_
 
Matrix cPrice_
 
Matrix fPrice_
 
std::vector< RatecfStrikes_
 
- Protected Attributes inherited from InflationTermStructure
ext::shared_ptr< Seasonalityseasonality_
 
Period observationLag_
 
Frequency frequency_
 
Rate baseRate_
 
- Protected Attributes inherited from TermStructure
bool moving_ = false
 
bool updated_ = true
 
Calendar calendar_
 

Detailed Description

template<class Interpolator2D>
class QuantLib::InterpolatedCPICapFloorTermPriceSurface< Interpolator2D >

Definition at line 146 of file cpicapfloortermpricesurface.hpp.

Constructor & Destructor Documentation

◆ InterpolatedCPICapFloorTermPriceSurface()

InterpolatedCPICapFloorTermPriceSurface ( Real  nominal,
Rate  startRate,
const Period observationLag,
const Calendar cal,
const BusinessDayConvention bdc,
const DayCounter dc,
const ext::shared_ptr< ZeroInflationIndex > &  zii,
CPI::InterpolationType  interpolationType,
const Handle< YieldTermStructure > &  yts,
const std::vector< Rate > &  cStrikes,
const std::vector< Rate > &  fStrikes,
const std::vector< Period > &  cfMaturities,
const Matrix cPrice,
const Matrix fPrice,
const Interpolator2D &  interpolator2d = Interpolator2D() 
)

Member Function Documentation

◆ performCalculations()

void performCalculations

set up the interpolations for capPrice_ and floorPrice_ since we know ATM, and we have single flows, we can use put/call parity to extend the surfaces across all strikes

Definition at line 229 of file cpicapfloortermpricesurface.hpp.

+ Here is the call graph for this function:

◆ price() [1/3]

Real price ( const Date d,
Rate  k 
) const
overridevirtual

remember that the strikes use the quoting convention

remember that the strike uses the quoting convention

Implements CPICapFloorTermPriceSurface.

Definition at line 303 of file cpicapfloortermpricesurface.hpp.

◆ capPrice() [1/3]

Real capPrice ( const Date d,
Rate  k 
) const
overridevirtual

remember that the strike uses the quoting convention

Implements CPICapFloorTermPriceSurface.

Definition at line 312 of file cpicapfloortermpricesurface.hpp.

◆ floorPrice() [1/3]

Real floorPrice ( const Date d,
Rate  k 
) const
overridevirtual

remember that the strike uses the quoting convention

Implements CPICapFloorTermPriceSurface.

Definition at line 320 of file cpicapfloortermpricesurface.hpp.

◆ price() [2/3]

Real price ( const Period d,
Rate  k 
) const
virtual

required to allow for method hiding

Reimplemented from CPICapFloorTermPriceSurface.

Definition at line 94 of file cpicapfloortermpricesurface.cpp.

◆ price() [3/3]

virtual Real price ( const Date d,
Rate  k 
) const
virtual

required to allow for method hiding

Implements CPICapFloorTermPriceSurface.

◆ capPrice() [2/3]

Real capPrice ( const Period d,
Rate  k 
) const
virtual

Reimplemented from CPICapFloorTermPriceSurface.

Definition at line 95 of file cpicapfloortermpricesurface.cpp.

◆ capPrice() [3/3]

virtual Real capPrice ( const Date d,
Rate  k 
) const
virtual

◆ floorPrice() [2/3]

Real floorPrice ( const Period d,
Rate  k 
) const
virtual

Reimplemented from CPICapFloorTermPriceSurface.

Definition at line 96 of file cpicapfloortermpricesurface.cpp.

◆ floorPrice() [3/3]

virtual Real floorPrice ( const Date d,
Rate  k 
) const
virtual

Member Data Documentation

◆ cPriceB_

Matrix cPriceB_
mutableprotected

Definition at line 187 of file cpicapfloortermpricesurface.hpp.

◆ fPriceB_

Matrix fPriceB_
mutableprotected

Definition at line 188 of file cpicapfloortermpricesurface.hpp.

◆ capPrice_

Interpolation2D capPrice_
mutableprotected

Definition at line 189 of file cpicapfloortermpricesurface.hpp.

◆ floorPrice_

Interpolation2D floorPrice_
protected

Definition at line 189 of file cpicapfloortermpricesurface.hpp.

◆ interpolator2d_

Interpolator2D interpolator2d_
mutableprotected

Definition at line 190 of file cpicapfloortermpricesurface.hpp.