27#include <ql/experimental/inflation/cpicapfloortermpricesurface.hpp>
28#include <ql/experimental/inflation/yoycapfloortermpricesurface.hpp>
29#include <ql/indexes/iborindex.hpp>
30#include <ql/indexes/inflationindex.hpp>
31#include <ql/indexes/swapindex.hpp>
32#include <ql/quote.hpp>
33#include <ql/termstructures/defaulttermstructure.hpp>
34#include <ql/termstructures/volatility/equityfx/blackvoltermstructure.hpp>
35#include <ql/termstructures/volatility/inflation/cpivolatilitystructure.hpp>
36#include <ql/termstructures/volatility/optionlet/optionletvolatilitystructure.hpp>
37#include <ql/termstructures/volatility/swaption/swaptionvolstructure.hpp>
38#include <ql/termstructures/yieldtermstructure.hpp>
39#include <ql/time/date.hpp>
40#include <ql/termstructures/volatility/inflation/yoyinflationoptionletvolatilitystructure.hpp>
51#include <boost/thread/shared_mutex.hpp>
52#include <boost/thread/locks.hpp>
124 const std::map<string, string>& pricingEngineGlobalParameters = std::map<string, string>());
128 :
public Singleton<GlobalPseudoCurrencyMarketParameters, std::integral_constant<bool, true>> {
133 boost::shared_lock<boost::shared_mutex> lock(mutex_);
138 boost::unique_lock<boost::shared_mutex> lock(mutex_);
141 void set(
const std::map<string, string>& pegp) {
142 boost::unique_lock<boost::shared_mutex> lock(mutex_);
180 virtual Handle<YieldTermStructure>
185 virtual Handle<IborIndex>
iborIndex(
const string& indexName,
187 virtual Handle<SwapIndex>
swapIndex(
const string& indexName,
193 virtual Handle<SwaptionVolatilityStructure>
203 virtual Handle<SwaptionVolatilityStructure>
209 QuantLib::Handle<QuantExt::FxIndex>
fxIndex(
const string&
fxIndex,
211 virtual QuantLib::Handle<QuantExt::FxIndex>
221 Handle<BlackVolTermStructure>
fxVol(
const string& ccypair,
223 virtual Handle<BlackVolTermStructure>
229 virtual Handle<QuantExt::CreditCurve>
237 virtual Handle<QuantExt::CreditVolCurve>
243 virtual Handle<QuantExt::BaseCorrelationTermStructure>
249 virtual Handle<OptionletVolatilityStructure>
253 virtual std::pair<std::string, QuantLib::Period>
259 virtual Handle<QuantExt::YoYOptionletVolatilitySurface>
264 virtual Handle<ZeroInflationIndex>
266 virtual Handle<YoYInflationIndex>
270 virtual Handle<CPIVolatilitySurface>
278 virtual Handle<YieldTermStructure>
280 virtual Handle<YieldTermStructure>
282 virtual Handle<QuantExt::EquityIndex2>
288 virtual Handle<BlackVolTermStructure>
309 virtual QuantLib::Handle<QuantExt::PriceTermStructure>
313 virtual QuantLib::Handle<QuantExt::CommodityIndex>
commodityIndex(
const std::string& commodityName,
319 virtual QuantLib::Handle<QuantLib::BlackVolTermStructure>
326 virtual QuantLib::Handle<QuantExt::CorrelationTermStructure>
332 virtual Handle<Quote>
cpr(
const string& securityID,
347 mutable std::map<string, Handle<BlackVolTermStructure>>
volCache_;
351 mutable std::map<std::pair<string, string>, QuantLib::Handle<QuantExt::FxIndex>>
fxIndicesCache_;
354 Handle<Quote>
getFxBaseQuote(
const string& ccy,
const string& config)
const;
356 Handle<BlackVolTermStructure>
getVolatility(
const string& ccy,
const string& config)
const;
Wrapper class for building Swaption volatility structures.
Wrapper class for building Equity curves (spot quote, yield term structure, risk free IR term structu...
Singleton to store Global parameters, this should be initialised at some point with PEGP.
GlobalPseudoCurrencyMarketParameters()
void set(const PseudoCurrencyMarketParameters ¶ms)
void set(const std::map< string, string > &pegp)
boost::shared_mutex mutex_
PseudoCurrencyMarketParameters params_
virtual Handle< QuantExt::CreditCurve > defaultCurve(const string &, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< CPIVolatilitySurface > cpiInflationCapFloorVolatilitySurface(const string &indexName, const string &configuration=Market::defaultConfiguration) const =0
CPI Inflation Cap Floor Volatility Surfaces.
virtual Handle< Quote > equitySpot(const string &eqName, const string &configuration=Market::defaultConfiguration) const =0
Handle< Quote > fxSpot(const string &ccypair, const string &configuration=Market::defaultConfiguration) const
static const string inCcyConfiguration
InCcy configuration label.
virtual QuantLib::Handle< QuantLib::BlackVolTermStructure > commodityVolatility(const std::string &commodityName, const std::string &configuration=Market::defaultConfiguration) const =0
virtual Handle< OptionletVolatilityStructure > capFloorVol(const string &key, const string &configuration=Market::defaultConfiguration) const =0
std::map< std::pair< string, string >, QuantLib::Handle< QuantExt::FxIndex > > fxIndicesCache_
std::map< string, Handle< BlackVolTermStructure > > volCache_
virtual Handle< Quote > securitySpread(const string &securityID, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< Quote > cpr(const string &securityID, const string &configuration=Market::defaultConfiguration) const =0
std::map< string, Handle< YieldTermStructure > > discountCurveCache_
Handle< Quote > fxRate(const string &ccypair, const string &configuration=Market::defaultConfiguration) const
virtual string swapIndexBase(const string &key, const string &configuration=Market::defaultConfiguration) const =0
virtual ~Market()
Destructor.
bool handlePseudoCurrencies_
virtual QuantLib::Handle< QuantExt::PriceTermStructure > commodityPriceCurve(const std::string &commodityName, const std::string &configuration=Market::defaultConfiguration) const =0
virtual Handle< YieldTermStructure > equityForecastCurve(const string &eqName, const string &configuration=Market::defaultConfiguration) const =0
std::map< string, Handle< Quote > > fxRateCache_
virtual Handle< SwaptionVolatilityStructure > yieldVol(const string &securityID, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< QuantExt::BaseCorrelationTermStructure > baseCorrelation(const string &, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< QuantExt::YoYOptionletVolatilitySurface > yoyCapFloorVol(const string &indexName, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< ZeroInflationIndex > zeroInflationIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const =0
Inflation Indexes.
Handle< BlackVolTermStructure > fxVol(const string &ccypair, const string &configuration=Market::defaultConfiguration) const
Handle< BlackVolTermStructure > getVolatility(const string &ccy, const string &config) const
virtual Handle< Quote > recoveryRate(const string &, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< IborIndex > iborIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< YieldTermStructure > discountCurveImpl(const string &ccy, const string &configuration=Market::defaultConfiguration) const =0
virtual QuantLib::Handle< QuantExt::CorrelationTermStructure > correlationCurve(const std::string &index1, const std::string &index2, const std::string &configuration=Market::defaultConfiguration) const =0
virtual Handle< QuantExt::CreditVolCurve > cdsVol(const string &, const string &configuration=Market::defaultConfiguration) const =0
virtual std::pair< std::string, QuantLib::Period > capFloorVolIndexBase(const string &key, const string &configuration=Market::defaultConfiguration) const =0
string commodityCurveLookup(const string &pm) const
virtual void refresh(const string &)
Refresh term structures for a given configuration.
QuantLib::Handle< QuantExt::FxIndex > fxIndex(const string &fxIndex, const string &configuration=Market::defaultConfiguration) const
virtual Handle< SwapIndex > swapIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< SwaptionVolatilityStructure > swaptionVol(const string &key, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< BlackVolTermStructure > equityVol(const string &eqName, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< YieldTermStructure > yieldCurve(const YieldCurveType &type, const string &name, const string &configuration=Market::defaultConfiguration) const =0
static const string defaultConfiguration
Default configuration label.
virtual string shortSwapIndexBase(const string &key, const string &configuration=Market::defaultConfiguration) const =0
bool handlePseudoCurrencies() const
virtual Date asofDate() const =0
Get the asof Date.
virtual Handle< Quote > fxSpotImpl(const string &ccypair, const string &configuration=Market::defaultConfiguration) const =0
virtual QuantLib::Handle< QuantExt::FxIndex > fxIndexImpl(const string &fxIndex, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< YoYInflationIndex > yoyInflationIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< Quote > fxRateImpl(const string &ccypair, const string &configuration=Market::defaultConfiguration) const =0
Handle< Quote > getFxSpotBaseQuote(const string &ccy, const string &config) const
string getCorrelationIndexName(const string &ccy) const
virtual QuantLib::Handle< QuantExt::CommodityIndex > commodityIndex(const std::string &commodityName, const std::string &configuration=Market::defaultConfiguration) const =0
virtual Handle< YieldTermStructure > equityDividendCurve(const string &eqName, const string &configuration=Market::defaultConfiguration) const =0
Market(const bool handlePseudoCurrencies)
Constructor.
virtual Handle< YieldTermStructure > yieldCurve(const string &name, const string &configuration=Market::defaultConfiguration) const =0
virtual Handle< QuantExt::EquityIndex2 > equityCurve(const string &eqName, const string &configuration=Market::defaultConfiguration) const =0
Handle< Quote > getFxBaseQuote(const string &ccy, const string &config) const
virtual Handle< BlackVolTermStructure > fxVolImpl(const string &ccypair, const string &configuration=Market::defaultConfiguration) const =0
std::map< string, Handle< Quote > > spotCache_
Handle< YieldTermStructure > discountCurve(const string &ccy, const string &configuration=Market::defaultConfiguration) const
Wrapper class for holding Bond Spread and recovery rate quotes.
Wrapper class for building yield term structures.
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
PseudoCurrencyMarketParameters buildPseudoCurrencyMarketParameters(const std::map< string, string > &pegp)
Function to build parameters from PricingEngine GlobalParametrs.
@ YoYInflationCapFloorVol
@ ZeroInflationCapFloorVol
Serializable Credit Default Swap.
Struct to store parameters for commodities to be treatred as pseudo currencies.
std::map< string, string > curves