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

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

+ Inheritance diagram for InflationModelData:
+ Collaboration diagram for InflationModelData:

Public Member Functions

 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)
 
Inspectors
const std::string & currency () const
 
const std::string & index () const
 
bool ignoreDuplicateCalibrationExpiryTimes () const
 
- 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

std::string currency_
 
std::string index_
 
bool ignoreDuplicateCalibrationExpiryTimes_ = false
 
void fromXML (XMLNode *node) override
 
void append (XMLDocument &doc, XMLNode *node) const override
 Method used by toXML in derived classes to add the members here to a node. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ModelData
- Protected Attributes inherited from ModelData
std::vector< CalibrationBasketcalibrationBaskets_
 

Detailed Description

Abstract base class for holding inflation model data.

Definition at line 35 of file inflationmodeldata.hpp.

Constructor & Destructor Documentation

◆ InflationModelData() [1/2]

Default constructor. The currency and inflation index are empty.

Definition at line 27 of file inflationmodeldata.cpp.

27{}

◆ InflationModelData() [2/2]

InflationModelData ( CalibrationType  calibrationType,
const std::vector< CalibrationBasket > &  calibrationBaskets,
const std::string &  currency,
const std::string &  index,
const bool  ignoreDuplicateCalibrationExpiryTimes 
)

Detailed constructor populating the currency and inflation index.

Parameters
calibrationTypethe type of model calibration.
calibrationBasketsthe calibration baskets for the model.
currencythe currency of the inflation model.
indexthe name of the inflation index being modeled.
ignoreDuplicateCalibrationExpiryTimesif true, a calibration instrument with an expiry time equal to that of a previously added instrument is skipped. If false, an error is thrown if such an instrument is found. Notice that two instruments with different option expiry dates can still have the same expiry time due to the way dates are converted to times for inflation instruments.

Definition at line 29 of file inflationmodeldata.cpp.

Member Function Documentation

◆ currency()

const std::string & currency ( ) const

Definition at line 40 of file inflationmodeldata.cpp.

40 {
41 return currency_;
42}

◆ index()

const std::string & index ( ) const

Definition at line 44 of file inflationmodeldata.cpp.

44 {
45 return index_;
46}
+ Here is the caller graph for this function:

◆ ignoreDuplicateCalibrationExpiryTimes()

bool ignoreDuplicateCalibrationExpiryTimes ( ) const

Definition at line 48 of file inflationmodeldata.cpp.

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 52 of file inflationmodeldata.cpp.

52 {
53 index_ = XMLUtils::getAttribute(node, "index");
54 currency_ = XMLUtils::getChildValue(node, "Currency", true);
56}
void fromXML(XMLNode *node) override
Definition: modeldata.cpp:42
static string getAttribute(XMLNode *node, const string &attrName)
Definition: xmlutils.cpp:419
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
Definition: xmlutils.cpp:277
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ append()

void append ( XMLDocument doc,
XMLNode node 
) const
overrideprotectedvirtual

Method used by toXML in derived classes to add the members here to a node.

Reimplemented from ModelData.

Definition at line 58 of file inflationmodeldata.cpp.

58 {
59 XMLUtils::addAttribute(doc, node, "index", index_);
60 XMLUtils::addChild(doc, node, "Currency", currency_);
61 ModelData::append(doc, node);
62}
virtual void append(XMLDocument &doc, XMLNode *node) const
Method used by toXML in derived classes to add the members here to a node.
Definition: modeldata.cpp:56
static void addAttribute(XMLDocument &doc, XMLNode *node, const string &attrName, const string &attrValue)
Definition: xmlutils.cpp:412
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ currency_

std::string currency_
private

Definition at line 76 of file inflationmodeldata.hpp.

◆ index_

std::string index_
private

Definition at line 77 of file inflationmodeldata.hpp.

◆ ignoreDuplicateCalibrationExpiryTimes_

bool ignoreDuplicateCalibrationExpiryTimes_ = false
private

Definition at line 78 of file inflationmodeldata.hpp.