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

#include <ored/configuration/volatilityconfig.hpp>

+ Inheritance diagram for VolatilityApoFutureSurfaceConfig:
+ Collaboration diagram for VolatilityApoFutureSurfaceConfig:

Public Member Functions

 VolatilityApoFutureSurfaceConfig (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...
 
 VolatilityApoFutureSurfaceConfig (const std::vector< std::string > &moneynessLevels, const std::string &baseVolatilityId, const std::string &basePriceCurveId, const std::string &baseConventionsId, const std::string &timeInterpolation, const std::string &strikeInterpolation, bool extrapolation, const std::string &timeExtrapolation, const std::string &strikeExtrapolation, QuantLib::Real beta=0.0, const std::string &maxTenor="", 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::vector< std::string > & moneynessLevels () const
 
const std::string & baseVolatilityId () const
 
const std::string & basePriceCurveId () const
 
const std::string & baseConventionsId () const
 
QuantLib::Real beta () const
 
const std::string & maxTenor () const
 
VolatilitySurfaceConfig
std::vector< std::pair< std::string, std::string > > quotes () const override
 
- Public Member Functions inherited from VolatilitySurfaceConfig
 VolatilitySurfaceConfig (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...
 
 VolatilitySurfaceConfig (const std::string &timeInterpolation, const std::string &strikeInterpolation, bool extrapolation, const std::string &timeExtrapolation, const std::string &strikeExtrapolation, 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...
 
const std::string & timeInterpolation () const
 
const std::string & strikeInterpolation () const
 
bool extrapolation () const
 
const std::string & timeExtrapolation () const
 
const std::string & strikeExtrapolation () 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 > moneynessLevels_
 
std::string baseVolatilityId_
 
std::string basePriceCurveId_
 
std::string baseConventionsId_
 
QuantLib::Real beta_
 
std::string maxTenor_
 
void fromXML (ore::data::XMLNode *node) override
 
ore::data::XMLNodetoXML (ore::data::XMLDocument &doc) const override
 

Additional Inherited Members

- Protected Member Functions inherited from VolatilitySurfaceConfig
void fromNode (ore::data::XMLNode *node)
 
void addNodes (ore::data::XMLDocument &doc, ore::data::XMLNode *node) const
 

Detailed Description

Volatility configuration for an average future price option (APO) surface.

Definition at line 393 of file volatilityconfig.hpp.

Constructor & Destructor Documentation

◆ VolatilityApoFutureSurfaceConfig() [1/2]

VolatilityApoFutureSurfaceConfig ( 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.

◆ VolatilityApoFutureSurfaceConfig() [2/2]

VolatilityApoFutureSurfaceConfig ( const std::vector< std::string > &  moneynessLevels,
const std::string &  baseVolatilityId,
const std::string &  basePriceCurveId,
const std::string &  baseConventionsId,
const std::string &  timeInterpolation,
const std::string &  strikeInterpolation,
bool  extrapolation,
const std::string &  timeExtrapolation,
const std::string &  strikeExtrapolation,
QuantLib::Real  beta = 0.0,
const std::string &  maxTenor = "",
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

◆ moneynessLevels()

const vector< string > & moneynessLevels ( ) const

Definition at line 458 of file volatilityconfig.cpp.

458{ return moneynessLevels_; }

◆ baseVolatilityId()

const string & baseVolatilityId ( ) const

Definition at line 460 of file volatilityconfig.cpp.

◆ basePriceCurveId()

const string & basePriceCurveId ( ) const

Definition at line 462 of file volatilityconfig.cpp.

◆ baseConventionsId()

const string & baseConventionsId ( ) const

Definition at line 464 of file volatilityconfig.cpp.

◆ beta()

Real beta ( ) const

Definition at line 466 of file volatilityconfig.cpp.

◆ maxTenor()

const string & maxTenor ( ) const

Definition at line 468 of file volatilityconfig.cpp.

◆ quotes()

vector< pair< string, string > > quotes ( ) const
overridevirtual

Return a vector of pairs of expiry and strike. The first element in the pair is the expiry and the second element in the pair is the string representation of the strike. This will be useful for building the vector of quote strings in classes that have a VolatilitySurfaceConfig.

Implements VolatilitySurfaceConfig.

Definition at line 470 of file volatilityconfig.cpp.

470{ return vector<pair<string, string>>(); }

◆ fromXML()

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

Implements XMLSerializable.

Definition at line 472 of file volatilityconfig.cpp.

472 {
473 XMLUtils::checkNode(node, "ApoFutureSurface");
475 moneynessLevels_ = XMLUtils::getChildrenValuesAsStrings(node, "MoneynessLevels", true);
476 baseVolatilityId_ = XMLUtils::getChildValue(node, "VolatilityId", true);
477 basePriceCurveId_ = XMLUtils::getChildValue(node, "PriceCurveId", true);
478 baseConventionsId_ = XMLUtils::getChildValue(node, "FutureConventions", true);
479 maxTenor_ = XMLUtils::getChildValue(node, "MaxTenor", false);
480 beta_ = XMLUtils::getChildValueAsDouble(node, "Beta", false);
481 fromNode(node);
482}
void fromBaseNode(ore::data::XMLNode *node)
void fromNode(ore::data::XMLNode *node)
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
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
Definition: xmlutils.cpp:277
static vector< string > getChildrenValuesAsStrings(XMLNode *node, const string &name, bool mandatory=false)
Definition: xmlutils.cpp:342
+ Here is the call graph for this function:

◆ toXML()

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

Implements XMLSerializable.

Definition at line 484 of file volatilityconfig.cpp.

484 {
485 XMLNode* node = doc.allocNode("ApoFutureSurface");
487 XMLUtils::addGenericChildAsList(doc, node, "MoneynessLevels", moneynessLevels_);
488 XMLUtils::addChild(doc, node, "VolatilityId", baseVolatilityId_);
489 XMLUtils::addChild(doc, node, "PriceCurveId", basePriceCurveId_);
490 XMLUtils::addChild(doc, node, "FutureConventions", baseConventionsId_);
491 addNodes(doc, node);
492 if (!maxTenor_.empty())
493 XMLUtils::addChild(doc, node, "MaxTenor", maxTenor_);
494 XMLUtils::addChild(doc, node, "Beta", beta_);
495
496 return node;
497}
void toBaseNode(ore::data::XMLDocument &doc, ore::data::XMLNode *node) const
void addNodes(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 addGenericChildAsList(XMLDocument &doc, XMLNode *n, const string &name, const vector< T > &values, const string &attrName="", const string &attr="")
Definition: xmlutils.hpp:144
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

◆ moneynessLevels_

std::vector<std::string> moneynessLevels_
private

Definition at line 433 of file volatilityconfig.hpp.

◆ baseVolatilityId_

std::string baseVolatilityId_
private

Definition at line 434 of file volatilityconfig.hpp.

◆ basePriceCurveId_

std::string basePriceCurveId_
private

Definition at line 435 of file volatilityconfig.hpp.

◆ baseConventionsId_

std::string baseConventionsId_
private

Definition at line 436 of file volatilityconfig.hpp.

◆ beta_

QuantLib::Real beta_
private

Definition at line 437 of file volatilityconfig.hpp.

◆ maxTenor_

std::string maxTenor_
private

Definition at line 438 of file volatilityconfig.hpp.