Cross Asset Model Parameters. More...
#include <ored/model/crossassetmodeldata.hpp>
Classes | |
struct | HandleComp |
Public Member Functions | |
Constructors | |
CrossAssetModelData () | |
Default constructor. More... | |
CrossAssetModelData (const vector< QuantLib::ext::shared_ptr< IrModelData > > &irConfigs, const vector< QuantLib::ext::shared_ptr< FxBsData > > &fxConfigs, const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > &c, Real tolerance=1e-4, const std::string &measure="LGM", const CrossAssetModel::Discretization discretization=CrossAssetModel::Discretization::Exact) | |
Detailed constructor (IR/FX only) More... | |
CrossAssetModelData (const std::vector< QuantLib::ext::shared_ptr< IrModelData > > &irConfigs, const std::vector< QuantLib::ext::shared_ptr< FxBsData > > &fxConfigs, const std::vector< QuantLib::ext::shared_ptr< EqBsData > > &eqConfigs, const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > &c, Real tolerance=1e-4, const std::string &measure="LGM", const CrossAssetModel::Discretization discretization=CrossAssetModel::Discretization::Exact) | |
Detailed constructor (IR/FX/EQ only) More... | |
CrossAssetModelData (const std::vector< QuantLib::ext::shared_ptr< IrModelData > > &irConfigs, const std::vector< QuantLib::ext::shared_ptr< FxBsData > > &fxConfigs, const std::vector< QuantLib::ext::shared_ptr< EqBsData > > &eqConfigs, const std::vector< QuantLib::ext::shared_ptr< InflationModelData > > &infConfigs, const std::vector< QuantLib::ext::shared_ptr< CrLgmData > > &crLgmConfigs, const std::vector< QuantLib::ext::shared_ptr< CrCirData > > &crCirConfigs, const std::vector< QuantLib::ext::shared_ptr< CommoditySchwartzData > > &comConfigs, const Size numberOfCreditStates, const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > &c, Real tolerance=1e-4, const std::string &measure="LGM", const CrossAssetModel::Discretization discretization=CrossAssetModel::Discretization::Exact) | |
Detailed constructor (all asset classes) More... | |
void | clear () |
Clear all vectors and maps. More... | |
void | validate () |
Check consistency of config vectors. More... | |
Inspectors | |
const string & | domesticCurrency () const |
const vector< string > & | currencies () const |
const vector< string > & | equities () const |
const vector< string > & | infIndices () const |
const vector< string > & | creditNames () const |
const vector< string > & | commodities () const |
const vector< QuantLib::ext::shared_ptr< IrModelData > > & | irConfigs () const |
const vector< QuantLib::ext::shared_ptr< FxBsData > > & | fxConfigs () const |
const vector< QuantLib::ext::shared_ptr< EqBsData > > & | eqConfigs () const |
const vector< QuantLib::ext::shared_ptr< InflationModelData > > & | infConfigs () const |
const vector< QuantLib::ext::shared_ptr< CrLgmData > > & | crLgmConfigs () const |
const vector< QuantLib::ext::shared_ptr< CrCirData > > & | crCirConfigs () const |
const vector< QuantLib::ext::shared_ptr< CommoditySchwartzData > > & | comConfigs () const |
Size | numberOfCreditStates () const |
const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > & | correlations () const |
Real | bootstrapTolerance () const |
const std::string & | measure () const |
CrossAssetModel::Discretization | discretization () const |
Setters | |
string & | domesticCurrency () |
vector< string > & | currencies () |
vector< string > & | equities () |
vector< string > & | infIndices () |
vector< string > & | creditNames () |
vector< string > & | commodities () |
vector< QuantLib::ext::shared_ptr< IrModelData > > & | irConfigs () |
vector< QuantLib::ext::shared_ptr< FxBsData > > & | fxConfigs () |
vector< QuantLib::ext::shared_ptr< EqBsData > > & | eqConfigs () |
vector< QuantLib::ext::shared_ptr< InflationModelData > > & | infConfigs () |
vector< QuantLib::ext::shared_ptr< CrLgmData > > & | crLgmConfigs () |
vector< QuantLib::ext::shared_ptr< CrCirData > > & | crCirConfigs () |
vector< QuantLib::ext::shared_ptr< CommoditySchwartzData > > & | comConfigs () |
void | setCorrelations (const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > &corrs) |
void | setCorrelations (const QuantLib::ext::shared_ptr< InstantaneousCorrelations > &corrs) |
Real & | bootstrapTolerance () |
std::string & | measure () |
CrossAssetModel::Discretization & | discretization () |
Serialisation | |
virtual void | fromXML (XMLNode *node) override |
virtual XMLNode * | toXML (XMLDocument &doc) const override |
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... | |
Operators | |
string | domesticCurrency_ |
vector< std::string > | currencies_ |
vector< std::string > | equities_ |
vector< std::string > | infindices_ |
vector< std::string > | creditNames_ |
vector< std::string > | commodities_ |
vector< QuantLib::ext::shared_ptr< IrModelData > > | irConfigs_ |
vector< QuantLib::ext::shared_ptr< FxBsData > > | fxConfigs_ |
vector< QuantLib::ext::shared_ptr< EqBsData > > | eqConfigs_ |
vector< QuantLib::ext::shared_ptr< InflationModelData > > | infConfigs_ |
vector< QuantLib::ext::shared_ptr< CrLgmData > > | crLgmConfigs_ |
vector< QuantLib::ext::shared_ptr< CrCirData > > | crCirConfigs_ |
vector< QuantLib::ext::shared_ptr< CommoditySchwartzData > > | comConfigs_ |
Size | numberOfCreditStates_ = 0 |
QuantLib::ext::shared_ptr< InstantaneousCorrelations > | correlations_ |
Real | bootstrapTolerance_ |
std::string | measure_ |
CrossAssetModel::Discretization | discretization_ |
bool | operator== (const CrossAssetModelData &rhs) |
bool | operator!= (const CrossAssetModelData &rhs) |
void | buildIrConfigs (map< string, QuantLib::ext::shared_ptr< IrModelData > > &irMap) |
helper to convert LGM data, possibly including defaults, into an IR config vector More... | |
void | buildFxConfigs (std::map< std::string, QuantLib::ext::shared_ptr< FxBsData > > &fxMap) |
helper to convert FX data, possibly including defaults, into an FX config vector More... | |
void | buildEqConfigs (std::map< std::string, QuantLib::ext::shared_ptr< EqBsData > > &eqMap) |
helper to convert EQ data, possibly including defaults, into an EQ config vector More... | |
void | buildInfConfigs (const std::map< std::string, QuantLib::ext::shared_ptr< InflationModelData > > &mp) |
helper to convert INF data, possibly including defaults, into an INF config vector More... | |
void | buildCrConfigs (std::map< std::string, QuantLib::ext::shared_ptr< CrLgmData > > &crLgmMap, std::map< std::string, QuantLib::ext::shared_ptr< CrCirData > > &crCirMap) |
helper to convert CR LGM data, possibly including defaults, into CR config vectors More... | |
void | buildComConfigs (std::map< std::string, QuantLib::ext::shared_ptr< CommoditySchwartzData > > &comMap) |
helper to convert COM data, possibly including defaulta, into a COM config vector More... | |
Cross Asset Model Parameters.
CrossAssetModelData comprises the specification of how to build and calibrate the CrossAssetModel. It contains
Definition at line 115 of file crossassetmodeldata.hpp.
Default constructor.
Definition at line 120 of file crossassetmodeldata.hpp.
CrossAssetModelData | ( | const vector< QuantLib::ext::shared_ptr< IrModelData > > & | irConfigs, |
const vector< QuantLib::ext::shared_ptr< FxBsData > > & | fxConfigs, | ||
const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > & | c, | ||
Real | tolerance = 1e-4 , |
||
const std::string & | measure = "LGM" , |
||
const CrossAssetModel::Discretization | discretization = CrossAssetModel::Discretization::Exact |
||
) |
Detailed constructor (IR/FX only)
irConfigs | Vector of IR model specifications |
fxConfigs | Vector of FX model specifications |
c | Correlation map |
tolerance | Bootstrap tolerance used in model calibration |
measure | Choice of probability measure |
discretization | Choice of discretization |
Definition at line 125 of file crossassetmodeldata.hpp.
CrossAssetModelData | ( | const std::vector< QuantLib::ext::shared_ptr< IrModelData > > & | irConfigs, |
const std::vector< QuantLib::ext::shared_ptr< FxBsData > > & | fxConfigs, | ||
const std::vector< QuantLib::ext::shared_ptr< EqBsData > > & | eqConfigs, | ||
const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > & | c, | ||
Real | tolerance = 1e-4 , |
||
const std::string & | measure = "LGM" , |
||
const CrossAssetModel::Discretization | discretization = CrossAssetModel::Discretization::Exact |
||
) |
Detailed constructor (IR/FX/EQ only)
irConfigs | Vector of IR model specifications |
fxConfigs | Vector of FX model specifications |
eqConfigs | Vector of EQ model specifications |
c | Correlation map |
tolerance | Bootstrap tolerance used in model calibration |
measure | Choice of probability measure |
discretization | Choice of discretization |
Definition at line 148 of file crossassetmodeldata.hpp.
CrossAssetModelData | ( | const std::vector< QuantLib::ext::shared_ptr< IrModelData > > & | irConfigs, |
const std::vector< QuantLib::ext::shared_ptr< FxBsData > > & | fxConfigs, | ||
const std::vector< QuantLib::ext::shared_ptr< EqBsData > > & | eqConfigs, | ||
const std::vector< QuantLib::ext::shared_ptr< InflationModelData > > & | infConfigs, | ||
const std::vector< QuantLib::ext::shared_ptr< CrLgmData > > & | crLgmConfigs, | ||
const std::vector< QuantLib::ext::shared_ptr< CrCirData > > & | crCirConfigs, | ||
const std::vector< QuantLib::ext::shared_ptr< CommoditySchwartzData > > & | comConfigs, | ||
const Size | numberOfCreditStates, | ||
const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > & | c, | ||
Real | tolerance = 1e-4 , |
||
const std::string & | measure = "LGM" , |
||
const CrossAssetModel::Discretization | discretization = CrossAssetModel::Discretization::Exact |
||
) |
Detailed constructor (all asset classes)
irConfigs | Vector of IR model specifications |
fxConfigs | Vector of FX model specifications |
eqConfigs | Vector of EQ model specifications |
infConfigs | Vector of INF model specifications |
crLgmConfigs | Vector of CR LGM model specifications |
crCirConfigs | Vector of CR CIR model specifications |
comConfigs | Vector of COM Schwartz model specifications |
numberOfCreditStates | Number of credit states |
c | Correlation map |
tolerance | Bootstrap tolerance used in model calibration |
measure | Choice of probability measure |
discretization | Choice of discretization |
Definition at line 173 of file crossassetmodeldata.hpp.
void clear | ( | ) |
Clear all vectors and maps.
Definition at line 201 of file crossassetmodeldata.cpp.
void validate | ( | ) |
Check consistency of config vectors.
Definition at line 214 of file crossassetmodeldata.cpp.
const string & domesticCurrency | ( | ) | const |
Definition at line 218 of file crossassetmodeldata.hpp.
const vector< string > & currencies | ( | ) | const |
Definition at line 219 of file crossassetmodeldata.hpp.
const vector< string > & equities | ( | ) | const |
Definition at line 220 of file crossassetmodeldata.hpp.
const vector< string > & infIndices | ( | ) | const |
Definition at line 221 of file crossassetmodeldata.hpp.
const vector< string > & creditNames | ( | ) | const |
Definition at line 222 of file crossassetmodeldata.hpp.
const vector< string > & commodities | ( | ) | const |
Definition at line 223 of file crossassetmodeldata.hpp.
const vector< QuantLib::ext::shared_ptr< IrModelData > > & irConfigs | ( | ) | const |
const vector< QuantLib::ext::shared_ptr< FxBsData > > & fxConfigs | ( | ) | const |
Definition at line 225 of file crossassetmodeldata.hpp.
const vector< QuantLib::ext::shared_ptr< EqBsData > > & eqConfigs | ( | ) | const |
Definition at line 226 of file crossassetmodeldata.hpp.
const vector< QuantLib::ext::shared_ptr< InflationModelData > > & infConfigs | ( | ) | const |
Definition at line 227 of file crossassetmodeldata.hpp.
const vector< QuantLib::ext::shared_ptr< CrLgmData > > & crLgmConfigs | ( | ) | const |
Definition at line 228 of file crossassetmodeldata.hpp.
const vector< QuantLib::ext::shared_ptr< CrCirData > > & crCirConfigs | ( | ) | const |
Definition at line 229 of file crossassetmodeldata.hpp.
const vector< QuantLib::ext::shared_ptr< CommoditySchwartzData > > & comConfigs | ( | ) | const |
Definition at line 230 of file crossassetmodeldata.hpp.
Size numberOfCreditStates | ( | ) | const |
Definition at line 231 of file crossassetmodeldata.hpp.
const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > & correlations | ( | ) | const |
Definition at line 232 of file crossassetmodeldata.hpp.
Real bootstrapTolerance | ( | ) | const |
Definition at line 235 of file crossassetmodeldata.hpp.
const std::string & measure | ( | ) | const |
Definition at line 236 of file crossassetmodeldata.hpp.
CrossAssetModel::Discretization discretization | ( | ) | const |
Definition at line 237 of file crossassetmodeldata.hpp.
string & domesticCurrency | ( | ) |
Definition at line 242 of file crossassetmodeldata.hpp.
vector< string > & currencies | ( | ) |
Definition at line 243 of file crossassetmodeldata.hpp.
vector< string > & equities | ( | ) |
Definition at line 244 of file crossassetmodeldata.hpp.
vector< string > & infIndices | ( | ) |
Definition at line 245 of file crossassetmodeldata.hpp.
vector< string > & creditNames | ( | ) |
Definition at line 246 of file crossassetmodeldata.hpp.
vector< string > & commodities | ( | ) |
Definition at line 247 of file crossassetmodeldata.hpp.
vector< QuantLib::ext::shared_ptr< IrModelData > > & irConfigs | ( | ) |
Definition at line 248 of file crossassetmodeldata.hpp.
vector< QuantLib::ext::shared_ptr< FxBsData > > & fxConfigs | ( | ) |
Definition at line 249 of file crossassetmodeldata.hpp.
vector< QuantLib::ext::shared_ptr< EqBsData > > & eqConfigs | ( | ) |
Definition at line 250 of file crossassetmodeldata.hpp.
vector< QuantLib::ext::shared_ptr< InflationModelData > > & infConfigs | ( | ) |
Definition at line 251 of file crossassetmodeldata.hpp.
vector< QuantLib::ext::shared_ptr< CrLgmData > > & crLgmConfigs | ( | ) |
Definition at line 252 of file crossassetmodeldata.hpp.
vector< QuantLib::ext::shared_ptr< CrCirData > > & crCirConfigs | ( | ) |
Definition at line 253 of file crossassetmodeldata.hpp.
vector< QuantLib::ext::shared_ptr< CommoditySchwartzData > > & comConfigs | ( | ) |
Definition at line 254 of file crossassetmodeldata.hpp.
void setCorrelations | ( | const std::map< CorrelationKey, QuantLib::Handle< QuantLib::Quote > > & | corrs | ) |
Definition at line 255 of file crossassetmodeldata.hpp.
void setCorrelations | ( | const QuantLib::ext::shared_ptr< InstantaneousCorrelations > & | corrs | ) |
Definition at line 258 of file crossassetmodeldata.hpp.
Real & bootstrapTolerance | ( | ) |
Definition at line 259 of file crossassetmodeldata.hpp.
std::string & measure | ( | ) |
Definition at line 260 of file crossassetmodeldata.hpp.
CrossAssetModel::Discretization & discretization | ( | ) |
Definition at line 261 of file crossassetmodeldata.hpp.
|
overridevirtual |
Implements XMLSerializable.
Definition at line 253 of file crossassetmodeldata.cpp.
|
overridevirtual |
Implements XMLSerializable.
Definition at line 776 of file crossassetmodeldata.cpp.
bool operator== | ( | const CrossAssetModelData & | rhs | ) |
Definition at line 131 of file crossassetmodeldata.cpp.
bool operator!= | ( | const CrossAssetModelData & | rhs | ) |
Definition at line 199 of file crossassetmodeldata.cpp.
void buildIrConfigs | ( | map< string, QuantLib::ext::shared_ptr< IrModelData > > & | irMap | ) |
helper to convert LGM data, possibly including defaults, into an IR config vector
Definition at line 574 of file crossassetmodeldata.cpp.
void buildFxConfigs | ( | std::map< std::string, QuantLib::ext::shared_ptr< FxBsData > > & | fxMap | ) |
helper to convert FX data, possibly including defaults, into an FX config vector
Definition at line 621 of file crossassetmodeldata.cpp.
void buildEqConfigs | ( | std::map< std::string, QuantLib::ext::shared_ptr< EqBsData > > & | eqMap | ) |
helper to convert EQ data, possibly including defaults, into an EQ config vector
Definition at line 650 of file crossassetmodeldata.cpp.
void buildInfConfigs | ( | const std::map< std::string, QuantLib::ext::shared_ptr< InflationModelData > > & | mp | ) |
helper to convert INF data, possibly including defaults, into an INF config vector
Definition at line 677 of file crossassetmodeldata.cpp.
void buildCrConfigs | ( | std::map< std::string, QuantLib::ext::shared_ptr< CrLgmData > > & | crLgmMap, |
std::map< std::string, QuantLib::ext::shared_ptr< CrCirData > > & | crCirMap | ||
) |
helper to convert CR LGM data, possibly including defaults, into CR config vectors
Definition at line 714 of file crossassetmodeldata.cpp.
void buildComConfigs | ( | std::map< std::string, QuantLib::ext::shared_ptr< CommoditySchwartzData > > & | comMap | ) |
helper to convert COM data, possibly including defaulta, into a COM config vector
Definition at line 749 of file crossassetmodeldata.cpp.
|
private |
Definition at line 297 of file crossassetmodeldata.hpp.
|
private |
Definition at line 298 of file crossassetmodeldata.hpp.
|
private |
Definition at line 299 of file crossassetmodeldata.hpp.
|
private |
Definition at line 300 of file crossassetmodeldata.hpp.
|
private |
Definition at line 301 of file crossassetmodeldata.hpp.
|
private |
Definition at line 302 of file crossassetmodeldata.hpp.
|
private |
Definition at line 303 of file crossassetmodeldata.hpp.
|
private |
Definition at line 304 of file crossassetmodeldata.hpp.
|
private |
Definition at line 305 of file crossassetmodeldata.hpp.
|
private |
Definition at line 306 of file crossassetmodeldata.hpp.
|
private |
Definition at line 307 of file crossassetmodeldata.hpp.
|
private |
Definition at line 308 of file crossassetmodeldata.hpp.
|
private |
Definition at line 309 of file crossassetmodeldata.hpp.
|
private |
Definition at line 310 of file crossassetmodeldata.hpp.
|
private |
Definition at line 312 of file crossassetmodeldata.hpp.
|
private |
Definition at line 313 of file crossassetmodeldata.hpp.
|
private |
Definition at line 314 of file crossassetmodeldata.hpp.
|
private |
Definition at line 315 of file crossassetmodeldata.hpp.