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

#include <ored/model/modelparameter.hpp>

+ Inheritance diagram for ReversionParameter:
+ Collaboration diagram for ReversionParameter:

Public Member Functions

 ReversionParameter ()
 Default constructor. More...
 
 ReversionParameter (LgmData::ReversionType reversionType, bool calibrate, ParamType type, std::vector< QuantLib::Time > times, std::vector< QuantLib::Real > values)
 Constructor for piecewise reversion. More...
 
 ReversionParameter (LgmData::ReversionType reversionType, bool calibrate, QuantLib::Real value)
 Constructor for constant reversion. More...
 
Inspectors
LgmData::ReversionType reversionType () const
 
- Public Member Functions inherited from ModelParameter
 ModelParameter ()
 Default constructor. More...
 
 ModelParameter (bool calibrate, ParamType type, std::vector< QuantLib::Time > times, std::vector< QuantLib::Real > values)
 Detailed constructor. More...
 
bool calibrate () const
 
ParamType type () const
 
const std::vector< QuantLib::Time > & times () const
 
const std::vector< QuantLib::Real > & values () const
 
void setTimes (std::vector< Real > times)
 
void setValues (std::vector< Real > values)
 
void mult (const Real f)
 
void setCalibrate (const bool b)
 
- 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

LgmData::ReversionType reversionType_
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (XMLDocument &doc) const override
 

Additional Inherited Members

- Protected Member Functions inherited from ModelParameter
void append (XMLDocument &doc, XMLNode *node) const
 Method used by toXML in derived classes to add the members here to a node. More...
 
virtual void check () const
 Perform some checks on the parameters. More...
 

Detailed Description

Reversion model parameter with specified reversion type.

Note
The reversion type is currently an LGM reversion type. We may want to broaden this in future.

Definition at line 133 of file modelparameter.hpp.

Constructor & Destructor Documentation

◆ ReversionParameter() [1/3]

Default constructor.

Definition at line 127 of file modelparameter.cpp.

◆ ReversionParameter() [2/3]

ReversionParameter ( LgmData::ReversionType  reversionType,
bool  calibrate,
ParamType  type,
std::vector< QuantLib::Time >  times,
std::vector< QuantLib::Real >  values 
)

Constructor for piecewise reversion.

◆ ReversionParameter() [3/3]

ReversionParameter ( LgmData::ReversionType  reversionType,
bool  calibrate,
QuantLib::Real  value 
)

Constructor for constant reversion.

Member Function Documentation

◆ reversionType()

LgmData::ReversionType reversionType ( ) const

Definition at line 140 of file modelparameter.cpp.

140 {
141 return reversionType_;
142}
+ Here is the caller graph for this function:

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Reimplemented from ModelParameter.

Definition at line 144 of file modelparameter.cpp.

144 {
145 XMLUtils::checkNode(node, "Reversion");
146 reversionType_ = parseReversionType(XMLUtils::getChildValue(node, "ReversionType", true));
148}
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
LgmData::ReversionType parseReversionType(const string &s)
Enum parsers.
Definition: lgmdata.cpp:62
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toXML()

XMLNode * toXML ( XMLDocument doc) const
overridevirtual

Implements XMLSerializable.

Definition at line 150 of file modelparameter.cpp.

150 {
151 XMLNode* node = doc.allocNode("Reversion");
152 XMLUtils::addChild(doc, node, "ReversionType", to_string(reversionType_));
153 ModelParameter::append(doc, node);
154 return node;
155}
void append(XMLDocument &doc, XMLNode *node) const
Method used by toXML in derived classes to add the members here to a node.
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
std::string to_string(const LocationInfo &l)
Definition: ast.cpp:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ reversionType_

LgmData::ReversionType reversionType_
private

Definition at line 157 of file modelparameter.hpp.