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

#include <ored/model/lgmdata.hpp>

+ Inheritance diagram for LgmReversionTransformation:
+ Collaboration diagram for LgmReversionTransformation:

Public Member Functions

 LgmReversionTransformation ()
 Default constructor setting the horizon to 0.0 and the scaling to 1.0. More...
 
 LgmReversionTransformation (QuantLib::Time horizon, QuantLib::Real scaling)
 Detailed constructor. More...
 
Inspectors
QuantLib::Time horizon () const
 
QuantLib::Real scaling () const
 
- 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

QuantLib::Time horizon_
 
QuantLib::Real scaling_
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (XMLDocument &doc) const override
 

Detailed Description

LGM reversion transformation.

This class holds values for possibly transforming the reversion parameter of the LGM model. The use of this is outlined in Modern Derivatives Pricing and Credit Exposure Analysis, Section 16.4.

Definition at line 170 of file lgmdata.hpp.

Constructor & Destructor Documentation

◆ LgmReversionTransformation() [1/2]

Default constructor setting the horizon to 0.0 and the scaling to 1.0.

Definition at line 251 of file lgmdata.cpp.

251: horizon_(0.0), scaling_(1.0) {}

◆ LgmReversionTransformation() [2/2]

LgmReversionTransformation ( QuantLib::Time  horizon,
QuantLib::Real  scaling 
)

Detailed constructor.

Member Function Documentation

◆ horizon()

Time horizon ( ) const

Definition at line 256 of file lgmdata.cpp.

256{ return horizon_; }

◆ scaling()

Real scaling ( ) const

Definition at line 258 of file lgmdata.cpp.

258{ return scaling_; }

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 260 of file lgmdata.cpp.

260 {
261 XMLUtils::checkNode(node, "ParameterTransformation");
262 horizon_ = XMLUtils::getChildValueAsDouble(node, "ShiftHorizon", true);
263 scaling_ = XMLUtils::getChildValueAsDouble(node, "Scaling", true);
264}
static void checkNode(XMLNode *n, const string &expectedName)
Definition: xmlutils.cpp:175
static Real getChildValueAsDouble(XMLNode *node, const string &name, bool mandatory=false, double defaultValue=0.0)
Definition: xmlutils.cpp:286
+ 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 266 of file lgmdata.cpp.

266 {
267 XMLNode* node = doc.allocNode("ParameterTransformation");
268 XMLUtils::addChild(doc, node, "ShiftHorizon", horizon_);
269 XMLUtils::addChild(doc, node, "Scaling", scaling_);
270 return node;
271}
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ horizon_

QuantLib::Time horizon_
private

Definition at line 191 of file lgmdata.hpp.

◆ scaling_

QuantLib::Real scaling_
private

Definition at line 192 of file lgmdata.hpp.