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

#include <ored/configuration/volatilityconfig.hpp>

+ Inheritance diagram for VolatilityCurveConfig:
+ Collaboration diagram for VolatilityCurveConfig:

Public Member Functions

 VolatilityCurveConfig (MarketDatum::QuoteType quoteType=MarketDatum::QuoteType::RATE_LNVOL, QuantLib::Exercise::Type exerciseType=QuantLib::Exercise::Type::European, bool enforceMontoneVariance=true, std::string calendarStr=std::string(), QuantLib::Natural priority=0)
 Default constructor. More...
 
 VolatilityCurveConfig (const std::vector< std::string > &quotes, const std::string &interpolation, const std::string &extrapolation, MarketDatum::QuoteType quoteType=MarketDatum::QuoteType::RATE_LNVOL, QuantLib::Exercise::Type exerciseType=QuantLib::Exercise::Type::European, bool enforceMontoneVariance=true, std::string calendarStr=std::string(), QuantLib::Natural priority=0)
 Explicit constructor. More...
 
Inspectors
const std::vector< std::string > & quotes () const
 
const std::string & interpolation () const
 
const std::string & extrapolation () const
 
bool enforceMontoneVariance () 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::vector< std::string > quotes_
 
std::string interpolation_
 
std::string extrapolation_
 
bool enforceMontoneVariance_
 
void fromXML (ore::data::XMLNode *node) override
 
ore::data::XMLNodetoXML (ore::data::XMLDocument &doc) const override
 

Detailed Description

Volatility configuration for a 1-D volatility curve

Definition at line 163 of file volatilityconfig.hpp.

Constructor & Destructor Documentation

◆ VolatilityCurveConfig() [1/2]

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

Default constructor.

◆ VolatilityCurveConfig() [2/2]

VolatilityCurveConfig ( const std::vector< std::string > &  quotes,
const std::string &  interpolation,
const std::string &  extrapolation,
MarketDatum::QuoteType  quoteType = MarketDatum::QuoteType::RATE_LNVOL,
QuantLib::Exercise::Type  exerciseType = QuantLib::Exercise::Type::European,
bool  enforceMontoneVariance = true,
std::string  calendarStr = std::string(),
QuantLib::Natural  priority = 0 
)

Explicit constructor.

Member Function Documentation

◆ quotes()

const vector< string > & quotes ( ) const

Definition at line 181 of file volatilityconfig.cpp.

181{ return quotes_; }
std::vector< std::string > quotes_
+ Here is the caller graph for this function:

◆ interpolation()

const string & interpolation ( ) const

Definition at line 183 of file volatilityconfig.cpp.

+ Here is the caller graph for this function:

◆ extrapolation()

const string & extrapolation ( ) const

Definition at line 185 of file volatilityconfig.cpp.

+ Here is the caller graph for this function:

◆ enforceMontoneVariance()

bool enforceMontoneVariance ( ) const

Definition at line 187 of file volatilityconfig.cpp.

◆ fromXML()

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

Implements XMLSerializable.

Definition at line 189 of file volatilityconfig.cpp.

189 {
190 XMLUtils::checkNode(node, "Curve");
192 quotes_ = XMLUtils::getChildrenValues(node, "Quotes", "Quote", true);
193 interpolation_ = XMLUtils::getChildValue(node, "Interpolation", true);
194 extrapolation_ = XMLUtils::getChildValue(node, "Extrapolation", true);
195
197 if (XMLNode* n = XMLUtils::getChildNode(node, "EnforceMontoneVariance"))
199}
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
static XMLNode * getChildNode(XMLNode *n, const string &name="")
Definition: xmlutils.cpp:387
static string getNodeValue(XMLNode *node)
Get a node's value.
Definition: xmlutils.cpp:489
static vector< string > getChildrenValues(XMLNode *node, const string &names, const string &name, bool mandatory=false)
Definition: xmlutils.cpp:306
bool parseBool(const string &s)
Convert text to bool.
Definition: parsers.cpp:144
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:

◆ toXML()

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

Implements XMLSerializable.

Definition at line 201 of file volatilityconfig.cpp.

201 {
202 XMLNode* node = doc.allocNode("Curve");
204 XMLUtils::addChildren(doc, node, "Quotes", "Quote", quotes_);
205 XMLUtils::addChild(doc, node, "Interpolation", interpolation_);
206 XMLUtils::addChild(doc, node, "Extrapolation", extrapolation_);
207 XMLUtils::addChild(doc, node, "EnforceMontoneVariance", enforceMontoneVariance_);
208 return node;
209}
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 void addChildren(XMLDocument &doc, XMLNode *n, const string &names, const string &name, const vector< T > &values)
Definition: xmlutils.cpp:502
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
+ Here is the call graph for this function:

Member Data Documentation

◆ quotes_

std::vector<std::string> quotes_
private

Definition at line 194 of file volatilityconfig.hpp.

◆ interpolation_

std::string interpolation_
private

Definition at line 195 of file volatilityconfig.hpp.

◆ extrapolation_

std::string extrapolation_
private

Definition at line 196 of file volatilityconfig.hpp.

◆ enforceMontoneVariance_

bool enforceMontoneVariance_
private

Definition at line 197 of file volatilityconfig.hpp.