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

#include <ored/model/inflation/infjydata.hpp>

+ Inheritance diagram for InfJyData:
+ Collaboration diagram for InfJyData:

Public Member Functions

 InfJyData ()
 Default constructor. More...
 
 InfJyData (CalibrationType calibrationType, const std::vector< CalibrationBasket > &calibrationBaskets, const std::string &currency, const std::string &index, const ReversionParameter &realRateReversion, const VolatilityParameter &realRateVolatility, const VolatilityParameter &indexVolatility, const LgmReversionTransformation &reversionTransformation=LgmReversionTransformation(), const CalibrationConfiguration &calibrationConfiguration=CalibrationConfiguration(), const bool ignoreDuplicateCalibrationExpiryTimes=false, const bool linkRealToNominalRateParams=false, const Real linkedRealRateVolatilityScaling=1.0)
 Detailed constructor. More...
 
Inspectors
const ReversionParameterrealRateReversion () const
 
const VolatilityParameterrealRateVolatility () const
 
const VolatilityParameterindexVolatility () const
 
const LgmReversionTransformationreversionTransformation () const
 
const CalibrationConfigurationcalibrationConfiguration () const
 
bool linkRealRateParamsToNominalRateParams () const
 
Real linkedRealRateVolatilityScaling () const
 
Setters
void setRealRateReversion (ReversionParameter p)
 
void setRealRateVolatility (VolatilityParameter p)
 
- Public Member Functions inherited from InflationModelData
 InflationModelData ()
 Default constructor. The currency and inflation index are empty. More...
 
 InflationModelData (CalibrationType calibrationType, const std::vector< CalibrationBasket > &calibrationBaskets, const std::string &currency, const std::string &index, const bool ignoreDuplicateCalibrationExpiryTimes)
 
const std::string & currency () const
 
const std::string & index () const
 
bool ignoreDuplicateCalibrationExpiryTimes () const
 
void fromXML (XMLNode *node) override
 
- Public Member Functions inherited from ModelData
 ModelData ()
 Default constructor. More...
 
 ModelData (CalibrationType calibrationType, const std::vector< CalibrationBasket > &calibrationBaskets)
 Detailed constructor. More...
 
CalibrationType calibrationType () const
 
const std::vector< CalibrationBasket > & calibrationBaskets () const
 
void fromXML (XMLNode *node) override
 
- Public Member Functions inherited from XMLSerializable
virtual ~XMLSerializable ()
 
virtual void fromXML (XMLNode *node)=0
 
virtual XMLNodetoXML (XMLDocument &doc) const =0
 
void fromFile (const std::string &filename)
 
void toFile (const std::string &filename) const
 
void fromXMLString (const std::string &xml)
 Parse from XML string. More...
 
std::string toXMLString () const
 Parse from XML string. More...
 

Serialisation

ReversionParameter realRateReversion_
 
VolatilityParameter realRateVolatility_
 
VolatilityParameter indexVolatility_
 
LgmReversionTransformation reversionTransformation_
 
CalibrationConfiguration calibrationConfiguration_
 
bool linkRealToNominalRateParams_
 
Real linkedRealRateVolatilityScaling_
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (XMLDocument &doc) const override
 

Additional Inherited Members

- Protected Member Functions inherited from InflationModelData
void append (XMLDocument &doc, XMLNode *node) const override
 Method used by toXML in derived classes to add the members here to a node. More...
 
- Protected Member Functions inherited from ModelData
- Protected Attributes inherited from ModelData
std::vector< CalibrationBasketcalibrationBaskets_
 

Detailed Description

Jarrow Yildirim inflation model data.

Model data specifying the Jarrow Yildirim inflation model described in Modern Derivatives Pricing and Credit Exposure Analysis, Chapter 13.

Definition at line 44 of file infjydata.hpp.

Constructor & Destructor Documentation

◆ InfJyData() [1/2]

InfJyData ( )

Default constructor.

Definition at line 30 of file infjydata.cpp.

30{}

◆ InfJyData() [2/2]

InfJyData ( CalibrationType  calibrationType,
const std::vector< CalibrationBasket > &  calibrationBaskets,
const std::string &  currency,
const std::string &  index,
const ReversionParameter realRateReversion,
const VolatilityParameter realRateVolatility,
const VolatilityParameter indexVolatility,
const LgmReversionTransformation reversionTransformation = LgmReversionTransformation(),
const CalibrationConfiguration calibrationConfiguration = CalibrationConfiguration(),
const bool  ignoreDuplicateCalibrationExpiryTimes = false,
const bool  linkRealToNominalRateParams = false,
const Real  linkedRealRateVolatilityScaling = 1.0 
)

Detailed constructor.

Definition at line 32 of file infjydata.cpp.

42 linkRealToNominalRateParams_(linkRealToNominalRateParams),
LgmReversionTransformation reversionTransformation_
Definition: infjydata.hpp:88
const VolatilityParameter & indexVolatility() const
Definition: infjydata.cpp:53
VolatilityParameter indexVolatility_
Definition: infjydata.hpp:87
const VolatilityParameter & realRateVolatility() const
Definition: infjydata.cpp:49
const CalibrationConfiguration & calibrationConfiguration() const
Definition: infjydata.cpp:61
CalibrationConfiguration calibrationConfiguration_
Definition: infjydata.hpp:89
VolatilityParameter realRateVolatility_
Definition: infjydata.hpp:86
Real linkedRealRateVolatilityScaling_
Definition: infjydata.hpp:91
Real linkedRealRateVolatilityScaling() const
Definition: infjydata.cpp:71
const ReversionParameter & realRateReversion() const
Definition: infjydata.cpp:45
bool linkRealToNominalRateParams_
Definition: infjydata.hpp:90
const LgmReversionTransformation & reversionTransformation() const
Definition: infjydata.cpp:57
ReversionParameter realRateReversion_
Definition: infjydata.hpp:85
const std::string & index() const
const std::string & currency() const
bool ignoreDuplicateCalibrationExpiryTimes() const
InflationModelData()
Default constructor. The currency and inflation index are empty.
CalibrationType calibrationType() const
Definition: modeldata.cpp:34
const std::vector< CalibrationBasket > & calibrationBaskets() const
Definition: modeldata.cpp:38

Member Function Documentation

◆ realRateReversion()

const ReversionParameter & realRateReversion ( ) const

Definition at line 45 of file infjydata.cpp.

45 {
46 return realRateReversion_;
47}

◆ realRateVolatility()

const VolatilityParameter & realRateVolatility ( ) const

Definition at line 49 of file infjydata.cpp.

49 {
51}

◆ indexVolatility()

const VolatilityParameter & indexVolatility ( ) const

Definition at line 53 of file infjydata.cpp.

53 {
54 return indexVolatility_;
55}

◆ reversionTransformation()

const LgmReversionTransformation & reversionTransformation ( ) const

Definition at line 57 of file infjydata.cpp.

57 {
59}

◆ calibrationConfiguration()

const CalibrationConfiguration & calibrationConfiguration ( ) const

Definition at line 61 of file infjydata.cpp.

61 {
63}

◆ linkRealRateParamsToNominalRateParams()

bool linkRealRateParamsToNominalRateParams ( ) const

Definition at line 69 of file infjydata.cpp.

◆ linkedRealRateVolatilityScaling()

Real linkedRealRateVolatilityScaling ( ) const

Definition at line 71 of file infjydata.cpp.

◆ setRealRateReversion()

void setRealRateReversion ( ReversionParameter  p)

Definition at line 65 of file infjydata.cpp.

65{ realRateReversion_ = std::move(p); }

◆ setRealRateVolatility()

void setRealRateVolatility ( VolatilityParameter  p)

Definition at line 67 of file infjydata.cpp.

67{ realRateVolatility_ = std::move(p); }

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 73 of file infjydata.cpp.

73 {
74
75 // Check the node is not null and that name is LGM or DodgsonKainth. LGM is for backward compatibility.
76 XMLUtils::checkNode(node, "JarrowYildirim");
77
79
80 // Get reversion and volatility for the real rate process
81 XMLNode* rrNode = XMLUtils::getChildNode(node, "RealRate");
82 QL_REQUIRE(rrNode, "JarrowYildirim inflation model data should have RealRate node.");
85 if (XMLNode* n = XMLUtils::getChildNode(rrNode, "ParameterTransformation")) {
87 }
88
89 // Get volatility for the inflation index process
90 XMLNode* idxNode = XMLUtils::getChildNode(node, "Index");
91 QL_REQUIRE(idxNode, "JarrowYildirim inflation model data should have Index node.");
92 indexVolatility_.fromXML(XMLUtils::getChildNode(idxNode, "Volatility"));
93
94 // Get the calibration configuration
95 if (XMLNode* ccNode = XMLUtils::getChildNode(node, "CalibrationConfiguration"))
97
98 // Get the link to nominal param fields
100 parseBool(XMLUtils::getChildValue(node, "LinkRealToNominalRateParams", false, "false"));
103 parseReal(XMLUtils::getChildValue(node, "LinkedRealRateVolatilityScaling", false, "1.0"));
104 }
105}
void fromXML(XMLNode *node) override
void fromXML(XMLNode *node) override
Definition: lgmdata.cpp:260
void fromXML(XMLNode *node) override
void fromXML(XMLNode *node) override
static void checkNode(XMLNode *n, const string &expectedName)
Definition: xmlutils.cpp:175
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
Definition: xmlutils.cpp:277
static XMLNode * getChildNode(XMLNode *n, const string &name="")
Definition: xmlutils.cpp:387
bool parseBool(const string &s)
Convert text to bool.
Definition: parsers.cpp:144
Real parseReal(const string &s)
Convert text to Real.
Definition: parsers.cpp:112
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:

◆ toXML()

XMLNode * toXML ( XMLDocument doc) const
overridevirtual

Implements XMLSerializable.

Definition at line 107 of file infjydata.cpp.

107 {
108
109 XMLNode* node = doc.allocNode("JarrowYildirim");
111
112 XMLNode* rrNode = doc.allocNode("RealRate");
116 XMLUtils::appendNode(node, rrNode);
117
118 XMLNode* idxNode = doc.allocNode("Index");
120 XMLUtils::appendNode(node, idxNode);
121
123
125 XMLUtils::addChild(doc, node, "LinkRealToNominalRateParams", linkRealToNominalRateParams_);
126 XMLUtils::addChild(doc, node, "LinkedRealRateVolatilityScaling", linkedRealRateVolatilityScaling_);
127 }
128
129 return node;
130}
XMLNode * toXML(XMLDocument &doc) const override
void append(XMLDocument &doc, XMLNode *node) const override
Method used by toXML in derived classes to add the members here to a node.
XMLNode * toXML(XMLDocument &doc) const override
Definition: lgmdata.cpp:266
XMLNode * toXML(XMLDocument &doc) const override
XMLNode * toXML(XMLDocument &doc) const override
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
static void appendNode(XMLNode *parent, XMLNode *child)
Definition: xmlutils.cpp:406
+ Here is the call graph for this function:

Member Data Documentation

◆ realRateReversion_

ReversionParameter realRateReversion_
private

Definition at line 85 of file infjydata.hpp.

◆ realRateVolatility_

VolatilityParameter realRateVolatility_
private

Definition at line 86 of file infjydata.hpp.

◆ indexVolatility_

VolatilityParameter indexVolatility_
private

Definition at line 87 of file infjydata.hpp.

◆ reversionTransformation_

LgmReversionTransformation reversionTransformation_
private

Definition at line 88 of file infjydata.hpp.

◆ calibrationConfiguration_

CalibrationConfiguration calibrationConfiguration_
private

Definition at line 89 of file infjydata.hpp.

◆ linkRealToNominalRateParams_

bool linkRealToNominalRateParams_
private

Definition at line 90 of file infjydata.hpp.

◆ linkedRealRateVolatilityScaling_

Real linkedRealRateVolatilityScaling_
private

Definition at line 91 of file infjydata.hpp.