FX volatility structure configuration. More...
#include <ored/configuration/fxvolcurveconfig.hpp>
Inheritance diagram for FXVolatilityCurveConfig:
Collaboration diagram for FXVolatilityCurveConfig:Public Types | |
| enum class | Dimension { ATM , SmileVannaVolga , SmileDelta , SmileBFRR , SmileAbsolute , ATMTriangulated } |
| supported volatility structure types More... | |
| enum class | SmileInterpolation { VannaVolga1 , VannaVolga2 , Linear , Cubic } |
Public Member Functions | |
Constructors/Destructors | |
| FXVolatilityCurveConfig () | |
| Default constructor. More... | |
| FXVolatilityCurveConfig (const string &curveID, const string &curveDescription, const Dimension &dimension, const vector< string > &expiries, const vector< string > &deltas=vector< string >(), const string &fxSpotID="", const string &fxForeignCurveID="", const string &fxDomesticCurveID="", const DayCounter &dayCounter=QuantLib::Actual365Fixed(), const Calendar &calendar=QuantLib::TARGET(), const SmileInterpolation &interp=SmileInterpolation::VannaVolga2, const string &conventionsID="", const std::vector< Size > &smileDelta={25}, const string &smileExtrapolation="Flat") | |
| Detailed constructor. More... | |
| FXVolatilityCurveConfig (const string &curveID, const string &curveDescription, const Dimension &dimension, const string &baseVolatility1, const string &baseVolatility2, const string &fxIndexTag="GENERIC") | |
Serialisation | |
| void | fromXML (XMLNode *node) override |
| XMLNode * | toXML (XMLDocument &doc) const override |
Inspectors | |
| const Dimension & | dimension () const |
| const vector< string > & | expiries () const |
| const vector< string > & | deltas () const |
| const DayCounter & | dayCounter () const |
| const Calendar & | calendar () const |
| const string & | fxSpotID () const |
| const string & | fxForeignYieldCurveID () const |
| const string & | fxDomesticYieldCurveID () const |
| const SmileInterpolation & | smileInterpolation () const |
| const std::string & | smileExtrapolation () const |
| const string & | conventionsID () const |
| const std::vector< Size > & | smileDelta () const |
| const vector< string > & | quotes () override |
| Return all the market quotes required for this config. More... | |
| const string & | baseVolatility1 () const |
| const string & | baseVolatility2 () const |
| const string & | fxIndexTag () const |
| const ReportConfig & | reportConfig () const |
Public Member Functions inherited from CurveConfig | |
| CurveConfig (const string &curveID, const string &curveDescription, const vector< string > "es=vector< string >()) | |
| Detailed constructor. More... | |
| CurveConfig () | |
| Default constructor. More... | |
| const string & | curveID () const |
| const string & | curveDescription () const |
| const set< string > & | requiredCurveIds (const CurveSpec::CurveType &curveType) const |
| const map< CurveSpec::CurveType, set< string > > & | requiredCurveIds () const |
| string & | curveID () |
| string & | curveDescription () |
| set< string > & | requiredCurveIds (const CurveSpec::CurveType &curveType) |
| map< CurveSpec::CurveType, set< string > > & | requiredCurveIds () |
Public Member Functions inherited from XMLSerializable | |
| virtual | ~XMLSerializable () |
| virtual void | fromXML (XMLNode *node)=0 |
| virtual XMLNode * | toXML (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... | |
Setters | |
| Dimension | dimension_ |
| vector< string > | expiries_ |
| vector< string > | deltas_ |
| DayCounter | dayCounter_ |
| Calendar | calendar_ |
| string | fxSpotID_ |
| string | fxForeignYieldCurveID_ |
| string | fxDomesticYieldCurveID_ |
| string | conventionsID_ |
| std::vector< Size > | smileDelta_ |
| std::set< string > | requiredYieldCurveIDs_ |
| SmileInterpolation | smileInterpolation_ |
| string | smileExtrapolation_ |
| string | baseVolatility1_ |
| string | baseVolatility2_ |
| string | fxIndexTag_ |
| ReportConfig | reportConfig_ |
| Dimension & | dimension () |
| SmileInterpolation & | smileInterpolation () |
| string & | smileExtrapolation () |
| vector< string > & | deltas () |
| DayCounter & | dayCounter () |
| Calendar & | calendar () |
| string & | fxSpotID () |
| string & | fxForeignYieldCurveID () |
| string & | fxDomesticYieldCurveID () |
| string | conventionsID () |
| std::vector< Size > & | smileDelta () |
| const std::set< string > & | requiredYieldCurveIDs () const |
| string & | baseVolatility1 () |
| string & | baseVolatility2 () |
| string & | fxIndexTag () |
| void | populateRequiredCurveIds () |
Additional Inherited Members | |
Protected Attributes inherited from CurveConfig | |
| string | curveID_ |
| string | curveDescription_ |
| vector< string > | quotes_ |
| map< CurveSpec::CurveType, set< string > > | requiredCurveIds_ |
FX volatility structure configuration.
Definition at line 48 of file fxvolcurveconfig.hpp.
|
strong |
supported volatility structure types
For ATM we will only load ATM quotes, for Smile we load ATM, RR, BF or Deltas SmileInterpolation - currently supports which of the 2 Vanna Volga approximations, as per Castagna& Mercurio(2006), to use. The second approximation is more accurate but can ask for the square root of a negative number under unusual circumstances.
| Enumerator | |
|---|---|
| ATM | |
| SmileVannaVolga | |
| SmileDelta | |
| SmileBFRR | |
| SmileAbsolute | |
| ATMTriangulated | |
Definition at line 56 of file fxvolcurveconfig.hpp.
|
strong |
| Enumerator | |
|---|---|
| VannaVolga1 | |
| VannaVolga2 | |
| Linear | |
| Cubic | |
Definition at line 57 of file fxvolcurveconfig.hpp.
| FXVolatilityCurveConfig | ( | const string & | curveID, |
| const string & | curveDescription, | ||
| const Dimension & | dimension, | ||
| const vector< string > & | expiries, | ||
| const vector< string > & | deltas = vector<string>(), |
||
| const string & | fxSpotID = "", |
||
| const string & | fxForeignCurveID = "", |
||
| const string & | fxDomesticCurveID = "", |
||
| const DayCounter & | dayCounter = QuantLib::Actual365Fixed(), |
||
| const Calendar & | calendar = QuantLib::TARGET(), |
||
| const SmileInterpolation & | interp = SmileInterpolation::VannaVolga2, |
||
| const string & | conventionsID = "", |
||
| const std::vector< Size > & | smileDelta = {25}, |
||
| const string & | smileExtrapolation = "Flat" |
||
| ) |
Detailed constructor.
Definition at line 31 of file fxvolcurveconfig.cpp.
Here is the call graph for this function:| FXVolatilityCurveConfig | ( | const string & | curveID, |
| const string & | curveDescription, | ||
| const Dimension & | dimension, | ||
| const string & | baseVolatility1, | ||
| const string & | baseVolatility2, | ||
| const string & | fxIndexTag = "GENERIC" |
||
| ) |
Definition at line 45 of file fxvolcurveconfig.cpp.
Here is the call graph for this function:
|
overridevirtual |
Implements XMLSerializable.
Definition at line 77 of file fxvolcurveconfig.cpp.
Here is the call graph for this function:
|
overridevirtual |
Implements XMLSerializable.
Definition at line 203 of file fxvolcurveconfig.cpp.
Here is the call graph for this function:| const Dimension & dimension | ( | ) | const |
Definition at line 93 of file fxvolcurveconfig.hpp.
| const vector< string > & expiries | ( | ) | const |
Definition at line 94 of file fxvolcurveconfig.hpp.
| const vector< string > & deltas | ( | ) | const |
Definition at line 95 of file fxvolcurveconfig.hpp.
| const DayCounter & dayCounter | ( | ) | const |
Definition at line 96 of file fxvolcurveconfig.hpp.
| const Calendar & calendar | ( | ) | const |
Definition at line 97 of file fxvolcurveconfig.hpp.
| const string & fxSpotID | ( | ) | const |
| const string & fxForeignYieldCurveID | ( | ) | const |
Definition at line 100 of file fxvolcurveconfig.hpp.
| const string & fxDomesticYieldCurveID | ( | ) | const |
Definition at line 101 of file fxvolcurveconfig.hpp.
| const SmileInterpolation & smileInterpolation | ( | ) | const |
Definition at line 102 of file fxvolcurveconfig.hpp.
| const std::string & smileExtrapolation | ( | ) | const |
Definition at line 103 of file fxvolcurveconfig.hpp.
| const string & conventionsID | ( | ) | const |
Definition at line 104 of file fxvolcurveconfig.hpp.
| const std::vector< Size > & smileDelta | ( | ) | const |
Definition at line 105 of file fxvolcurveconfig.hpp.
|
overridevirtual |
Return all the market quotes required for this config.
Reimplemented from CurveConfig.
Definition at line 53 of file fxvolcurveconfig.cpp.
Here is the call graph for this function:| const string & baseVolatility1 | ( | ) | const |
Definition at line 107 of file fxvolcurveconfig.hpp.
| const string & baseVolatility2 | ( | ) | const |
Definition at line 108 of file fxvolcurveconfig.hpp.
| const string & fxIndexTag | ( | ) | const |
| const ReportConfig & reportConfig | ( | ) | const |
Definition at line 110 of file fxvolcurveconfig.hpp.
| Dimension & dimension | ( | ) |
Definition at line 115 of file fxvolcurveconfig.hpp.
| SmileInterpolation & smileInterpolation | ( | ) |
Definition at line 116 of file fxvolcurveconfig.hpp.
| string & smileExtrapolation | ( | ) |
Definition at line 117 of file fxvolcurveconfig.hpp.
| vector< string > & deltas | ( | ) |
Definition at line 118 of file fxvolcurveconfig.hpp.
| DayCounter & dayCounter | ( | ) |
Definition at line 119 of file fxvolcurveconfig.hpp.
| Calendar & calendar | ( | ) |
Definition at line 120 of file fxvolcurveconfig.hpp.
| string & fxSpotID | ( | ) |
Definition at line 121 of file fxvolcurveconfig.hpp.
| string & fxForeignYieldCurveID | ( | ) |
Definition at line 122 of file fxvolcurveconfig.hpp.
| string & fxDomesticYieldCurveID | ( | ) |
Definition at line 123 of file fxvolcurveconfig.hpp.
| string conventionsID | ( | ) |
Definition at line 124 of file fxvolcurveconfig.hpp.
| std::vector< Size > & smileDelta | ( | ) |
Definition at line 125 of file fxvolcurveconfig.hpp.
| const std::set< string > & requiredYieldCurveIDs | ( | ) | const |
Definition at line 126 of file fxvolcurveconfig.hpp.
| string & baseVolatility1 | ( | ) |
Definition at line 127 of file fxvolcurveconfig.hpp.
| string & baseVolatility2 | ( | ) |
Definition at line 128 of file fxvolcurveconfig.hpp.
| string & fxIndexTag | ( | ) |
Definition at line 129 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 285 of file fxvolcurveconfig.cpp.
Here is the caller graph for this function:
|
private |
Definition at line 135 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 136 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 137 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 138 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 139 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 140 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 141 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 142 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 143 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 144 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 145 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 146 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 147 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 148 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 149 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 150 of file fxvolcurveconfig.hpp.
|
private |
Definition at line 151 of file fxvolcurveconfig.hpp.