Market Implementation. More...
#include <ored/marketdata/marketimpl.hpp>
Public Member Functions | |
MarketImpl (const bool handlePseudoCurrencies) | |
Market interface | |
Date | asofDate () const override |
Get the asof Date. More... | |
Handle< YieldTermStructure > | yieldCurve (const YieldCurveType &type, const string &ccy, const string &configuration=Market::defaultConfiguration) const override |
Yield Curves. More... | |
Handle< YieldTermStructure > | discountCurveImpl (const string &ccy, const string &configuration=Market::defaultConfiguration) const override |
Handle< YieldTermStructure > | yieldCurve (const string &name, const string &configuration=Market::defaultConfiguration) const override |
Handle< IborIndex > | iborIndex (const string &indexName, const string &configuration=Market::defaultConfiguration) const override |
Handle< SwapIndex > | swapIndex (const string &indexName, const string &configuration=Market::defaultConfiguration) const override |
Handle< QuantLib::SwaptionVolatilityStructure > | swaptionVol (const string &key, const string &configuration=Market::defaultConfiguration) const override |
Swaptions. More... | |
string | shortSwapIndexBase (const string &key, const string &configuration=Market::defaultConfiguration) const override |
string | swapIndexBase (const string &key, const string &configuration=Market::defaultConfiguration) const override |
Handle< QuantLib::SwaptionVolatilityStructure > | yieldVol (const string &securityID, const string &configuration=Market::defaultConfiguration) const override |
Yield volatility. More... | |
QuantLib::Handle< QuantExt::FxIndex > | fxIndexImpl (const string &fxIndex, const string &configuration=Market::defaultConfiguration) const override |
FX. More... | |
Handle< Quote > | fxRateImpl (const string &ccypair, const string &configuration=Market::defaultConfiguration) const override |
Handle< Quote > | fxSpotImpl (const string &ccypair, const string &configuration=Market::defaultConfiguration) const override |
Handle< BlackVolTermStructure > | fxVolImpl (const string &ccypair, const string &configuration=Market::defaultConfiguration) const override |
Handle< QuantExt::CreditCurve > | defaultCurve (const string &, const string &configuration=Market::defaultConfiguration) const override |
Default Curves and Recovery Rates. More... | |
Handle< Quote > | recoveryRate (const string &, const string &configuration=Market::defaultConfiguration) const override |
Handle< QuantExt::CreditVolCurve > | cdsVol (const string &name, const string &configuration=Market::defaultConfiguration) const override |
CDS volatilities. More... | |
Handle< QuantExt::BaseCorrelationTermStructure > | baseCorrelation (const string &name, const string &configuration=Market::defaultConfiguration) const override |
Base correlation structures. More... | |
Handle< OptionletVolatilityStructure > | capFloorVol (const string &key, const string &configuration=Market::defaultConfiguration) const override |
CapFloor volatilities. More... | |
std::pair< string, QuantLib::Period > | capFloorVolIndexBase (const string &key, const string &configuration=Market::defaultConfiguration) const override |
Handle< QuantExt::YoYOptionletVolatilitySurface > | yoyCapFloorVol (const string &name, const string &configuration=Market::defaultConfiguration) const override |
YoY Inflation CapFloor volatilities. More... | |
virtual Handle< ZeroInflationIndex > | zeroInflationIndex (const string &indexName, const string &configuration=Market::defaultConfiguration) const override |
Inflation Indexes. More... | |
virtual Handle< YoYInflationIndex > | yoyInflationIndex (const string &indexName, const string &configuration=Market::defaultConfiguration) const override |
virtual Handle< CPIVolatilitySurface > | cpiInflationCapFloorVolatilitySurface (const string &indexName, const string &configuration=Market::defaultConfiguration) const override |
Inflation Cap Floor Volatility Surfaces. More... | |
Handle< Quote > | equitySpot (const string &eqName, const string &configuration=Market::defaultConfiguration) const override |
Equity curves. More... | |
Handle< QuantExt::EquityIndex2 > | equityCurve (const string &eqName, const string &configuration=Market::defaultConfiguration) const override |
Handle< YieldTermStructure > | equityDividendCurve (const string &eqName, const string &configuration=Market::defaultConfiguration) const override |
Handle< BlackVolTermStructure > | equityVol (const string &eqName, const string &configuration=Market::defaultConfiguration) const override |
Equity volatilities. More... | |
Handle< YieldTermStructure > | equityForecastCurve (const string &eqName, const string &configuration=Market::defaultConfiguration) const override |
Equity forecasting curves. More... | |
Handle< Quote > | securitySpread (const string &securityID, const string &configuration=Market::defaultConfiguration) const override |
Bond Spreads. More... | |
Handle< QuantExt::InflationIndexObserver > | baseCpis (const string &index, const string &configuration=Market::defaultConfiguration) const |
Cpi Base Quotes. More... | |
QuantLib::Handle< QuantExt::PriceTermStructure > | commodityPriceCurve (const string &commodityName, const string &configuration=Market::defaultConfiguration) const override |
Commodity curves. More... | |
QuantLib::Handle< QuantExt::CommodityIndex > | commodityIndex (const std::string &commodityName, const std::string &configuration=Market::defaultConfiguration) const override |
Commodity index. More... | |
QuantLib::Handle< QuantLib::BlackVolTermStructure > | commodityVolatility (const string &commodityName, const string &configuration=Market::defaultConfiguration) const override |
Commodity volatility. More... | |
Handle< QuantExt::CorrelationTermStructure > | correlationCurve (const string &index1, const string &index2, const string &configuration=Market::defaultConfiguration) const override |
Correlation curves. More... | |
Conditional Prepayment Rates | |
QuantLib::Handle< Quote > | cpr (const string &securityID, const string &configuration=Market::defaultConfiguration) const override |
![]() | |
Market (const bool handlePseudoCurrencies) | |
Constructor. More... | |
virtual | ~Market () |
Destructor. More... | |
virtual Date | asofDate () const =0 |
Get the asof Date. More... | |
Handle< YieldTermStructure > | discountCurve (const string &ccy, const string &configuration=Market::defaultConfiguration) const |
QuantLib::Handle< QuantExt::FxIndex > | fxIndex (const string &fxIndex, const string &configuration=Market::defaultConfiguration) const |
Handle< Quote > | fxRate (const string &ccypair, const string &configuration=Market::defaultConfiguration) const |
Handle< Quote > | fxSpot (const string &ccypair, const string &configuration=Market::defaultConfiguration) const |
Handle< BlackVolTermStructure > | fxVol (const string &ccypair, const string &configuration=Market::defaultConfiguration) const |
string | commodityCurveLookup (const string &pm) const |
bool | handlePseudoCurrencies () const |
Disable copying | |
Date | asof_ |
QuantLib::ext::shared_ptr< FXTriangulation > | fx_ |
map< tuple< string, YieldCurveType, string >, Handle< YieldTermStructure > > | yieldCurves_ |
map< pair< string, string >, Handle< IborIndex > > | iborIndices_ |
map< pair< string, string >, Handle< SwapIndex > > | swapIndices_ |
map< pair< string, string >, Handle< QuantLib::SwaptionVolatilityStructure > > | swaptionCurves_ |
map< pair< string, string >, pair< string, string > > | swaptionIndexBases_ |
map< pair< string, string >, Handle< QuantLib::SwaptionVolatilityStructure > > | yieldVolCurves_ |
map< pair< string, string >, Handle< BlackVolTermStructure > > | fxVols_ |
map< pair< string, string >, Handle< QuantExt::CreditCurve > > | defaultCurves_ |
map< pair< string, string >, Handle< QuantExt::CreditVolCurve > > | cdsVols_ |
map< pair< string, string >, Handle< QuantExt::BaseCorrelationTermStructure > > | baseCorrelations_ |
map< pair< string, string >, Handle< Quote > > | recoveryRates_ |
map< pair< string, string >, Handle< OptionletVolatilityStructure > > | capFloorCurves_ |
map< pair< string, string >, std::pair< string, QuantLib::Period > > | capFloorIndexBase_ |
map< pair< string, string >, Handle< YoYOptionletVolatilitySurface > > | yoyCapFloorVolSurfaces_ |
map< pair< string, string >, Handle< ZeroInflationIndex > > | zeroInflationIndices_ |
map< pair< string, string >, Handle< YoYInflationIndex > > | yoyInflationIndices_ |
map< pair< string, string >, Handle< CPIVolatilitySurface > > | cpiInflationCapFloorVolatilitySurfaces_ |
map< pair< string, string >, Handle< Quote > > | equitySpots_ |
map< pair< string, string >, Handle< BlackVolTermStructure > > | equityVols_ |
map< pair< string, string >, Handle< Quote > > | securitySpreads_ |
map< pair< string, string >, Handle< QuantExt::InflationIndexObserver > > | baseCpis_ |
map< tuple< string, string, string >, Handle< QuantExt::CorrelationTermStructure > > | correlationCurves_ |
map< pair< string, string >, QuantLib::Handle< QuantExt::CommodityIndex > > | commodityIndices_ |
map< pair< string, string >, QuantLib::Handle< QuantLib::BlackVolTermStructure > > | commodityVols_ |
map< pair< string, string >, QuantLib::Handle< QuantExt::EquityIndex2 > > | equityCurves_ |
map< pair< string, string >, Handle< Quote > > | cprs_ |
map< string, std::set< QuantLib::ext::shared_ptr< TermStructure > > > | refreshTs_ |
MarketImpl (const MarketImpl &)=delete | |
MarketImpl & | operator= (const MarketImpl &)=delete |
void | refresh (const string &configuration=Market::defaultConfiguration) override |
Send an explicit update() call to all term structures. More... | |
virtual void | require (const MarketObject o, const string &name, const string &configuration, const bool forceBuild=false) const |
void | addSwapIndex (const string &swapindex, const string &discountIndex, const string &configuration=Market::defaultConfiguration) const |
add a swap index to the market More... | |
pair< string, string > | swapIndexBases (const string &key, const string &configuration=Market::defaultConfiguration) const |
Additional Inherited Members | |
![]() | |
static const string | defaultConfiguration = "default" |
Default configuration label. More... | |
static const string | inCcyConfiguration = "inccy" |
InCcy configuration label. More... | |
![]() | |
bool | handlePseudoCurrencies_ = false |
Market Implementation.
The MarketImpl class differs from the Market base class in that it contains concrete maps of term structures, and it implements the interface.
Definition at line 53 of file marketimpl.hpp.
|
explicit |
Definition at line 55 of file marketimpl.hpp.
|
delete |
|
overridevirtual |
|
overridevirtual |
Yield Curves.
Implements Market.
Definition at line 74 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 96 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 102 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 107 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 112 of file marketimpl.cpp.
|
overridevirtual |
Swaptions.
Implements Market.
Definition at line 117 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 184 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 188 of file marketimpl.cpp.
|
overridevirtual |
Yield volatility.
Implements Market.
Definition at line 192 of file marketimpl.cpp.
|
overridevirtual |
FX.
Implements Market.
Definition at line 199 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 205 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 212 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 218 of file marketimpl.cpp.
|
overridevirtual |
Default Curves and Recovery Rates.
Implements Market.
Definition at line 245 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 250 of file marketimpl.cpp.
|
overridevirtual |
CDS volatilities.
Implements Market.
Definition at line 257 of file marketimpl.cpp.
|
overridevirtual |
Base correlation structures.
Implements Market.
Definition at line 263 of file marketimpl.cpp.
|
overridevirtual |
CapFloor volatilities.
Implements Market.
Definition at line 269 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 302 of file marketimpl.cpp.
|
overridevirtual |
YoY Inflation CapFloor volatilities.
Implements Market.
Definition at line 336 of file marketimpl.cpp.
|
overridevirtual |
Inflation Indexes.
Implements Market.
Definition at line 342 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 347 of file marketimpl.cpp.
|
overridevirtual |
Inflation Cap Floor Volatility Surfaces.
Implements Market.
Definition at line 352 of file marketimpl.cpp.
|
overridevirtual |
Equity curves.
Implements Market.
Definition at line 359 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 364 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 369 of file marketimpl.cpp.
|
overridevirtual |
Equity volatilities.
Implements Market.
Definition at line 375 of file marketimpl.cpp.
|
overridevirtual |
Equity forecasting curves.
Implements Market.
Definition at line 380 of file marketimpl.cpp.
|
overridevirtual |
Bond Spreads.
Implements Market.
Definition at line 385 of file marketimpl.cpp.
Handle< QuantExt::InflationIndexObserver > baseCpis | ( | const string & | index, |
const string & | configuration = Market::defaultConfiguration |
||
) | const |
Cpi Base Quotes.
Definition at line 390 of file marketimpl.cpp.
|
overridevirtual |
Commodity curves.
Implements Market.
Definition at line 395 of file marketimpl.cpp.
|
overridevirtual |
Commodity index.
Implements Market.
Definition at line 400 of file marketimpl.cpp.
|
overridevirtual |
Commodity volatility.
Implements Market.
Definition at line 405 of file marketimpl.cpp.
|
overridevirtual |
Correlation curves.
Implements Market.
Definition at line 411 of file marketimpl.cpp.
|
overridevirtual |
Implements Market.
Definition at line 468 of file marketimpl.cpp.
|
delete |
|
overridevirtual |
Send an explicit update() call to all term structures.
Reimplemented from Market.
Definition at line 513 of file marketimpl.cpp.
|
protectedvirtual |
Require a market object, this can be used in derived classes to build objects lazily. If the method is not overwritten in a derived class, it is assumed that the class builds all market object upfront.
For FXVols and Correlations the require is not 'hard', e.g. both EURUSD and USDEUR might be required for FXVols, but only one of them is expected to be actually built (the other one is then constructed on the fly from the first one). Therefore no error should be thrown in the implementation of require(), if an object is ultimately not found, an appropriate error will be thrown from this class.
An object is required for a single configuration. If it can't be built for this configuration, it should be tried to be built for the "default" configuration instead, because this is used as a fallback.
Notice that correlation curves are required with '&' as a delimiter between the indexes.
Reimplemented in TodaysMarket.
Definition at line 201 of file marketimpl.hpp.
|
protected |
add a swap index to the market
Definition at line 473 of file marketimpl.cpp.
|
private |
Definition at line 151 of file marketimpl.cpp.
|
protected |
Definition at line 204 of file marketimpl.hpp.
|
protected |
Definition at line 206 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 208 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 209 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 210 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 211 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 212 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 213 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 214 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 215 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 216 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 217 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 218 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 219 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 220 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 221 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 222 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 223 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 224 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 225 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 226 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 227 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 228 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 229 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 230 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 231 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 232 of file marketimpl.hpp.
|
mutableprotected |
Definition at line 233 of file marketimpl.hpp.
|
protected |
Definition at line 240 of file marketimpl.hpp.