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

#include <qle/models/jyimpliedzeroinflationtermstructure.hpp>

+ Inheritance diagram for JyImpliedZeroInflationTermStructure:
+ Collaboration diagram for JyImpliedZeroInflationTermStructure:

Public Member Functions

 JyImpliedZeroInflationTermStructure (const QuantLib::ext::shared_ptr< CrossAssetModel > &model, QuantLib::Size index)
 
QL_DEPRECATED JyImpliedZeroInflationTermStructure (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

Jarrow Yildrim (JY) implied zero inflation term structure

Definition at line 35 of file jyimpliedzeroinflationtermstructure.hpp.

Constructor & Destructor Documentation

◆ JyImpliedZeroInflationTermStructure() [1/2]

JyImpliedZeroInflationTermStructure ( 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.

◆ JyImpliedZeroInflationTermStructure() [2/2]

QL_DEPRECATED JyImpliedZeroInflationTermStructure ( 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 39 of file jyimpliedzeroinflationtermstructure.cpp.

39 {
40
41 QL_REQUIRE(t >= 0.0, "JyImpliedZeroInflationTermStructure::zeroRateImpl: negative time (" << t << ") given");
42
43 // Zero rate is calculated from the relation: P_n(S, T) (1 + z(S))^t = P_r(S, T)
44 // Here, S in the relation is given by relativeTime_ and T := S + t.
45 // ratio holds \frac{P_r(S, T)}{P_n(S, T)}.
46 auto S = relativeTime_;
47 auto T = relativeTime_ + t;
48 QL_DEPRECATED_DISABLE_WARNING
49 auto ratio = inflationGrowth(model_, index_, S, T, state_[2], state_[0], indexIsInterpolated_);
50 QL_DEPRECATED_ENABLE_WARNING
51 // Return the desired z(S) = \left( \frac{P_r(S, T)}{P_n(S, T)} \right)^{\frac{1}{t}} - 1
52 return std::pow(ratio, 1 / t) - 1;
53}
QuantLib::ext::shared_ptr< CrossAssetModel > model_
Real inflationGrowth(const QuantLib::ext::shared_ptr< CrossAssetModel > &model, Size index, Time S, Time T, Real irState, Real rrState, bool indexIsInterpolated)
+ Here is the call graph for this function:

◆ 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 55 of file jyimpliedzeroinflationtermstructure.cpp.

55 {
56 // For JY, expect the state to be three variables i.e. z_I, c_I and z_{ir}.
57 QL_REQUIRE(state_.size() == 3, "JyImpliedZeroInflationTermStructure: expected state to have " <<
58 "three elements but got " << state_.size());
59}