Logo
Reference manual - version qle_version
Public Member Functions | List of all members
YoYInflationModelTermStructure Class Referenceabstract

#include <qle/models/yoyinflationmodeltermstructure.hpp>

+ Inheritance diagram for YoYInflationModelTermStructure:

Public Member Functions

 YoYInflationModelTermStructure (const boost::shared_ptr< CrossAssetModel > &model, QuantLib::Size index, bool indexIsInterpolated)
 
Observer interface
void update () override
 
TermStructure interface
QuantLib::Date maxDate () const override
 
QuantLib::Time maxTime () const override
 
const QuantLib::Date & referenceDate () const override
 

Protected Member Functions

YoYInflationTermStructure interface
QuantLib::Real yoyRateImpl (QuantLib::Time t) const override
 This cannot be called. The implementation is set to throw an exception.
 
virtual void checkState () const
 

InflationTermStructure interface

boost::shared_ptr< CrossAssetModelmodel_
 
QuantLib::Size index_
 
bool indexIsInterpolated_
 
QuantLib::Date referenceDate_
 
QuantLib::Time relativeTime_
 
QuantLib::Array state_
 
QuantLib::Date baseDate () const override
 
virtual void referenceDate (const QuantLib::Date &d)
 Set the reference date.
 
void state (const QuantLib::Array &s)
 Set the current state variables.
 
void move (const QuantLib::Date &d, const QuantLib::Array &s)
 Set the current state and move the reference date to date d.
 
QuantLib::Real yoyRate (const QuantLib::Date &d, const QuantLib::Period &obsLag=-1 *QuantLib::Days, bool forceLinearInterpolation=false, bool extrapolate=false) const
 
virtual std::map< QuantLib::Date, QuantLib::Real > yoyRates (const std::vector< QuantLib::Date > &dates, const QuantLib::Period &obsLag=-1 *QuantLib::Days) const =0
 

Detailed Description

Base class for cross asset model implied year on year inflation term structures.

The termstructure has the reference date of the model's term structure at construction, but you can vary this as well as the state. Note that this term structure does not implement the full YoYInflationTermStructure interface. It is questionable whether it should derive from YoYInflationTermStructure at all.

Constructor & Destructor Documentation

◆ YoYInflationModelTermStructure()

YoYInflationModelTermStructure ( const boost::shared_ptr< CrossAssetModel > &  model,
QuantLib::Size  index,
bool  indexIsInterpolated 
)

Constructor taking the cross asset model, model, and the index of the relevant inflation component within the model, index.

Member Function Documentation

◆ yoyRate()

QuantLib::Real yoyRate ( const QuantLib::Date &  d,
const QuantLib::Period &  obsLag = -1 *QuantLib::Days,
bool  forceLinearInterpolation = false,
bool  extrapolate = false 
) const

Hides the YoYInflationTermStructure::yoyRate method. The parameters forceLinearInterpolation and extrapolate are ignored.

◆ yoyRates()

virtual std::map<QuantLib::Date, QuantLib::Real> yoyRates ( const std::vector< QuantLib::Date > &  dates,
const QuantLib::Period &  obsLag = -1 *QuantLib::Days 
) const
pure virtual

Return the year-on-year rates for the maturities associated with dates. If an obsLag is explicitly provided and not set to -1 * QuantLib::Days, it is used as the observation lag. Otherwise, the term structure's observation lag is used.

Implemented in JyImpliedYoYInflationTermStructure, and DkImpliedYoYInflationTermStructure.

◆ checkState()

virtual void checkState ( ) const
protectedvirtual

Override this method to perform checks on the state variable array when the state and move methods are called.

Reimplemented in JyImpliedYoYInflationTermStructure, and DkImpliedYoYInflationTermStructure.