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

#include <qle/models/dkimpliedzeroinflationtermstructure.hpp>

+ Inheritance diagram for DkImpliedZeroInflationTermStructure:
+ Collaboration diagram for DkImpliedZeroInflationTermStructure:

Public Member Functions

 DkImpliedZeroInflationTermStructure (const QuantLib::ext::shared_ptr< CrossAssetModel > &model, QuantLib::Size index)
 
QL_DEPRECATED DkImpliedZeroInflationTermStructure (const QuantLib::ext::shared_ptr< CrossAssetModel > &model, QuantLib::Size index, bool indexIsInterpolated)
 
- Public Member Functions inherited from ZeroInflationModelTermStructure
 ZeroInflationModelTermStructure (const QuantLib::ext::shared_ptr< CrossAssetModel > &model, QuantLib::Size index)
 
QL_DEPRECATED ZeroInflationModelTermStructure (const QuantLib::ext::shared_ptr< CrossAssetModel > &model, QuantLib::Size index, bool indexIsInterpolated)
 
void update () override
 
QuantLib::Date maxDate () const override
 
QuantLib::Time maxTime () const override
 
const QuantLib::Date & referenceDate () const override
 
QuantLib::Date baseDate () const override
 
virtual void referenceDate (const QuantLib::Date &d)
 Set the reference date. More...
 
void state (const QuantLib::Array &s)
 Set the current state variables. More...
 
void move (const QuantLib::Date &d, const QuantLib::Array &s)
 Set the current state and move the reference date to date d. More...
 

Protected Member Functions

ZeroInflationTermStructure interface
QuantLib::Real zeroRateImpl (QuantLib::Time t) const override
 
ZeroInflationModelTermStructure interface
void checkState () const override
 
- Protected Member Functions inherited from ZeroInflationModelTermStructure

Additional Inherited Members

- Protected Attributes inherited from ZeroInflationModelTermStructure
QuantLib::ext::shared_ptr< CrossAssetModelmodel_
 
QuantLib::Size index_
 
QL_DEPRECATED bool indexIsInterpolated_
 
QuantLib::Date referenceDate_
 
QuantLib::Time relativeTime_
 
QuantLib::Array state_
 

Detailed Description

Dodgson Kainth (DK) implied zero inflation term structure

Definition at line 35 of file dkimpliedzeroinflationtermstructure.hpp.

Constructor & Destructor Documentation

◆ DkImpliedZeroInflationTermStructure() [1/2]

DkImpliedZeroInflationTermStructure ( const QuantLib::ext::shared_ptr< CrossAssetModel > &  model,
QuantLib::Size  index 
)

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

◆ DkImpliedZeroInflationTermStructure() [2/2]

QL_DEPRECATED DkImpliedZeroInflationTermStructure ( const QuantLib::ext::shared_ptr< CrossAssetModel > &  model,
QuantLib::Size  index,
bool  indexIsInterpolated 
)

Member Function Documentation

◆ zeroRateImpl()

QL_DEPRECATED_ENABLE_WARNING Real zeroRateImpl ( QuantLib::Time  t) const
overrideprotected

Definition at line 37 of file dkimpliedzeroinflationtermstructure.cpp.

37 {
38 QL_REQUIRE(t >= 0.0, "DkImpliedZeroInflationTermStructure::zeroRateImpl: negative time (" << t << ") given");
39 auto p = model_->infdkI(index_, relativeTime_, relativeTime_ + t, state_[0], state_[1]);
40 return std::pow(p.second, 1 / t) - 1;
41}
QuantLib::ext::shared_ptr< CrossAssetModel > model_

◆ checkState()

void checkState ( ) const
overrideprotectedvirtual

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

Reimplemented from ZeroInflationModelTermStructure.

Definition at line 43 of file dkimpliedzeroinflationtermstructure.cpp.

43 {
44 // For DK, expect the state to be two variables i.e. z_I and y_I.
45 QL_REQUIRE(state_.size() == 2, "DkImpliedZeroInflationTermStructure: expected state to have " <<
46 "two elements but got " << state_.size());
47}