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

#include <ored/configuration/volatilityconfig.hpp>

+ Inheritance diagram for ConstantVolatilityConfig:
+ Collaboration diagram for ConstantVolatilityConfig:

Public Member Functions

 ConstantVolatilityConfig (MarketDatum::QuoteType quoteType=MarketDatum::QuoteType::RATE_LNVOL, QuantLib::Exercise::Type exerciseType=QuantLib::Exercise::Type::European, std::string calendarStr=std::string(), QuantLib::Natural priority=0)
 Default constructor. More...
 
 ConstantVolatilityConfig (const std::string &quote, MarketDatum::QuoteType quoteType=MarketDatum::QuoteType::RATE_LNVOL, QuantLib::Exercise::Type exerciseType=QuantLib::Exercise::Type::European, std::string calendarStr=std::string(), QuantLib::Natural priority=0)
 Explicit constructor. More...
 
Inspectors
const std::string & quote () const
 
- Public Member Functions inherited from QuoteBasedVolatilityConfig
 QuoteBasedVolatilityConfig (MarketDatum::QuoteType quoteType=MarketDatum::QuoteType::RATE_LNVOL, QuantLib::Exercise::Type exerciseType=QuantLib::Exercise::Type::European, std::string calendarStr=std::string(), QuantLib::Natural priority=0)
 Default constructor. More...
 
const MarketDatum::QuoteTypequoteType () const
 
const QuantLib::Exercise::Type & exerciseType () const
 
void fromBaseNode (ore::data::XMLNode *node)
 
void toBaseNode (ore::data::XMLDocument &doc, ore::data::XMLNode *node) const
 
- Public Member Functions inherited from VolatilityConfig
 VolatilityConfig (std::string calendarStr=std::string(), QuantLib::Natural priority=0)
 
void fromXMLNode (ore::data::XMLNode *node)
 
void toXMLNode (XMLDocument &doc, XMLNode *node) const
 
QuantLib::Natural priority () const
 
Calendar calendar () 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

std::string quote_
 
void fromXML (ore::data::XMLNode *node) override
 
ore::data::XMLNodetoXML (ore::data::XMLDocument &doc) const override
 

Detailed Description

Volatility configuration for a single constant volatility

Definition at line 132 of file volatilityconfig.hpp.

Constructor & Destructor Documentation

◆ ConstantVolatilityConfig() [1/2]

ConstantVolatilityConfig ( MarketDatum::QuoteType  quoteType = MarketDatum::QuoteType::RATE_LNVOL,
QuantLib::Exercise::Type  exerciseType = QuantLib::Exercise::Type::European,
std::string  calendarStr = std::string(),
QuantLib::Natural  priority = 0 
)

Default constructor.

◆ ConstantVolatilityConfig() [2/2]

ConstantVolatilityConfig ( const std::string &  quote,
MarketDatum::QuoteType  quoteType = MarketDatum::QuoteType::RATE_LNVOL,
QuantLib::Exercise::Type  exerciseType = QuantLib::Exercise::Type::European,
std::string  calendarStr = std::string(),
QuantLib::Natural  priority = 0 
)

Explicit constructor.

Member Function Documentation

◆ quote()

const string & quote ( ) const

Definition at line 154 of file volatilityconfig.cpp.

◆ fromXML()

void fromXML ( ore::data::XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 156 of file volatilityconfig.cpp.

156 {
157 XMLUtils::checkNode(node, "Constant");
159 quote_ = XMLUtils::getChildValue(node, "Quote", true);
160}
void fromBaseNode(ore::data::XMLNode *node)
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
+ Here is the call graph for this function:

◆ toXML()

XMLNode * toXML ( ore::data::XMLDocument doc) const
overridevirtual

Implements XMLSerializable.

Definition at line 162 of file volatilityconfig.cpp.

162 {
163 XMLNode* node = doc.allocNode("Constant");
165 XMLUtils::addChild(doc, node, "Quote", quote_);
166 return node;
167}
void toBaseNode(ore::data::XMLDocument &doc, ore::data::XMLNode *node) const
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
Definition: xmlutils.cpp:132
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:

Member Data Documentation

◆ quote_

std::string quote_
private

Definition at line 157 of file volatilityconfig.hpp.