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

#include <qle/models/infjyparameterization.hpp>

+ Inheritance diagram for InfJyParameterization:
+ Collaboration diagram for InfJyParameterization:

Public Member Functions

 InfJyParameterization (QuantLib::ext::shared_ptr< Lgm1fParametrization< QuantLib::ZeroInflationTermStructure > > realRate, QuantLib::ext::shared_ptr< FxBsParametrization > index, QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > inflationIndex)
 
Inspectors
QuantLib::ext::shared_ptr< Lgm1fParametrization< QuantLib::ZeroInflationTermStructure > > realRate () const
 
QuantLib::ext::shared_ptr< FxBsParametrizationindex () const
 
QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > inflationIndex () const
 
Size numberOfParameters () const override
 
- Public Member Functions inherited from Parametrization
 Parametrization (const Currency &currency, const std::string &name="")
 
virtual ~Parametrization ()
 
virtual const Currency & currency () const
 
virtual const Array & parameterTimes (const Size) const
 
virtual Size numberOfParameters () const
 
virtual Array parameterValues (const Size) const
 
virtual const QuantLib::ext::shared_ptr< Parameter > parameter (const Size) const
 
virtual void update () const
 
const std::string & name () const
 
virtual Real direct (const Size, const Real x) const
 
virtual Real inverse (const Size, const Real y) const
 

Parametrization interface

QuantLib::ext::shared_ptr< Lgm1fParametrization< QuantLib::ZeroInflationTermStructure > > realRate_
 
QuantLib::ext::shared_ptr< FxBsParametrizationindex_
 
QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > inflationIndex_
 
const QuantLib::Array & parameterTimes (const QuantLib::Size i) const override
 
const QuantLib::ext::shared_ptr< QuantLib::Parameter > parameter (const QuantLib::Size i) const override
 
void update () const override
 
QuantLib::Real direct (const QuantLib::Size i, const QuantLib::Real x) const override
 
QuantLib::Real inverse (const QuantLib::Size i, const QuantLib::Real y) const override
 
void checkIndex (QuantLib::Size i) const
 Check that the indexing. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Parametrization
Time tr (const Time t) const
 
Time tl (const Time t) const
 
Time tr2 (const Time t) const
 
Time tm2 (const Time t) const
 
Time tl2 (const Time t) const
 
- Protected Attributes inherited from Parametrization
const Real h_
 
const Real h2_
 

Detailed Description

Definition at line 34 of file infjyparameterization.hpp.

Constructor & Destructor Documentation

◆ InfJyParameterization()

InfJyParameterization ( QuantLib::ext::shared_ptr< Lgm1fParametrization< QuantLib::ZeroInflationTermStructure > >  realRate,
QuantLib::ext::shared_ptr< FxBsParametrization index,
QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex >  inflationIndex 
)

Definition at line 31 of file infjyparameterization.cpp.

35 : Parametrization(realRate->currency(), realRate->name()),
QuantLib::ext::shared_ptr< Lgm1fParametrization< QuantLib::ZeroInflationTermStructure > > realRate() const
QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > inflationIndex() const
QuantLib::ext::shared_ptr< FxBsParametrization > index() const
QuantLib::ext::shared_ptr< FxBsParametrization > index_
QuantLib::ext::shared_ptr< Lgm1fParametrization< QuantLib::ZeroInflationTermStructure > > realRate_
QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > inflationIndex_
Parametrization(const Currency &currency, const std::string &name="")

Member Function Documentation

◆ parameterTimes()

const Array & parameterTimes ( const QuantLib::Size  i) const
override

Definition at line 38 of file infjyparameterization.cpp.

38 {
39 checkIndex(i);
40 if (i < 2) {
41 return realRate_->parameterTimes(i);
42 } else {
43 return index_->parameterTimes(0);
44 }
45}
void checkIndex(QuantLib::Size i) const
Check that the indexing.
+ Here is the call graph for this function:

◆ parameter()

const QuantLib::ext::shared_ptr< Parameter > parameter ( const QuantLib::Size  i) const
override

Definition at line 47 of file infjyparameterization.cpp.

47 {
48 checkIndex(i);
49 if (i < 2) {
50 return realRate_->parameter(i);
51 } else {
52 return index_->parameter(0);
53 }
54}
+ Here is the call graph for this function:

◆ update()

void update ( ) const
overridevirtual

this method should be called when input parameters linked via references or pointers change in order to ensure consistent results

Reimplemented from Parametrization.

Definition at line 56 of file infjyparameterization.cpp.

56 {
57 realRate_->update();
58 index_->update();
59}

◆ realRate()

QuantLib::ext::shared_ptr< Lgm1fParametrization< ZeroInflationTermStructure > > realRate ( ) const

Definition at line 61 of file infjyparameterization.cpp.

61 {
62 return realRate_;
63}

◆ index()

QuantLib::ext::shared_ptr< FxBsParametrization > index ( ) const

Definition at line 65 of file infjyparameterization.cpp.

65 {
66 return index_;
67}

◆ inflationIndex()

QuantLib::ext::shared_ptr< ZeroInflationIndex > inflationIndex ( ) const

Definition at line 69 of file infjyparameterization.cpp.

69 {
70 return inflationIndex_;
71}

◆ numberOfParameters()

Size numberOfParameters ( ) const
overridevirtual

the number of parameters in this parametrization

Reimplemented from Parametrization.

Definition at line 54 of file infjyparameterization.hpp.

54{ return 3; }

◆ direct()

Real direct ( const QuantLib::Size  i,
const QuantLib::Real  x 
) const
overrideprotected

Definition at line 73 of file infjyparameterization.cpp.

73 {
74 checkIndex(i);
75 if (i < 2) {
76 return realRate_->direct(i, x);
77 } else {
78 return index_->direct(0, x);
79 }
80}
+ Here is the call graph for this function:

◆ inverse()

Real inverse ( const QuantLib::Size  i,
const QuantLib::Real  y 
) const
overrideprotected

Definition at line 82 of file infjyparameterization.cpp.

82 {
83 checkIndex(i);
84 if (i < 2) {
85 return realRate_->inverse(i, y);
86 } else {
87 return index_->inverse(i, y);
88 }
89}
+ Here is the call graph for this function:

◆ checkIndex()

void checkIndex ( QuantLib::Size  i) const
private

Check that the indexing.

Definition at line 91 of file infjyparameterization.cpp.

91 {
92 QL_REQUIRE(i < 3, "InfJyParameterization has 3 parameters but has been asked for its " << io::ordinal(i + 1));
93}
+ Here is the caller graph for this function:

Member Data Documentation

◆ realRate_

QuantLib::ext::shared_ptr<Lgm1fParametrization<QuantLib::ZeroInflationTermStructure> > realRate_
private

Definition at line 64 of file infjyparameterization.hpp.

◆ index_

QuantLib::ext::shared_ptr<FxBsParametrization> index_
private

Definition at line 65 of file infjyparameterization.hpp.

◆ inflationIndex_

QuantLib::ext::shared_ptr<QuantLib::ZeroInflationIndex> inflationIndex_
private

Definition at line 66 of file infjyparameterization.hpp.