21#include <boost/make_shared.hpp>
35#include <ql/math/interpolations/flatextrapolation2d.hpp>
36#include <ql/quotes/simplequote.hpp>
37#include <ql/termstructures/credit/flathazardrate.hpp>
38#include <ql/termstructures/credit/piecewisedefaultcurve.hpp>
39#include <ql/termstructures/credit/defaultprobabilityhelpers.hpp>
40#include <ql/termstructures/yield/piecewiseyieldcurve.hpp>
41#include <ql/termstructures/yield/ratehelpers.hpp>
42#include <ql/termstructures/volatility/equityfx/blackconstantvol.hpp>
43#include <ql/termstructures/volatility/inflation/constantcpivolatility.hpp>
44#include <ql/termstructures/volatility/optionlet/constantoptionletvol.hpp>
45#include <ql/termstructures/volatility/swaption/swaptionconstantvol.hpp>
46#include <ql/termstructures/voltermstructure.hpp>
47#include <ql/termstructures/yield/flatforward.hpp>
48#include <ql/time/calendars/nullcalendar.hpp>
49#include <ql/time/calendars/target.hpp>
50#include <ql/time/daycounters/actualactual.hpp>
51#include <ql/time/daycounters/actual360.hpp>
69 Handle<YieldTermStructure>
flatRateYts(Real forward);
71 Handle<YieldTermStructure>
flatRateDiv(Real dividend);
72 Handle<QuantLib::SwaptionVolatilityStructure>
flatRateSvs(
Volatility forward, VolatilityType type = ShiftedLognormal,
75 Handle<OptionletVolatilityStructure>
flatRateCvs(
Volatility vol, VolatilityType type = Normal, Real shift = 0.0);
76 Handle<QuantExt::CorrelationTermStructure>
flatCorrelation(Real correlation = 0.0);
77 Handle<CPICapFloorTermPriceSurface>
flatRateCps(Handle<ZeroInflationIndex> infIndex,
78 const std::vector<Rate> cStrikes, std::vector<Rate> fStrikes,
79 std::vector<Period> cfMaturities, Matrix cPrice, Matrix fPrice);
82 QuantLib::ext::shared_ptr<ZeroInflationIndex> ii,
83 Handle<YieldTermStructure> yts);
85 QuantLib::ext::shared_ptr<YoYInflationIndex> ii,
86 Handle<YieldTermStructure> yts);
137 const map<string, vector<QuantLib::ext::shared_ptr<QuantExt::DefaultProbabilityHelper>>>&
defaultRateHelpersMap()
const {
168 void createDiscountCurve(
const string& ccy,
const vector<string>& parInst,
const vector<Period>& parTenor,
169 const vector<Real>& parRates);
172 const vector<Period>& parTenor,
const vector<Real>& parRates);
175 const vector<Period>& parTenor,
const vector<Real>& parRates);
177 void createIborIndex(
const string& idxName,
const vector<string>& parInst,
const vector<Period>& parTenor,
178 const vector<Real>& parRates,
bool singleCurve);
180 void createDefaultCurve(
const string& name,
const string& ccy,
const vector<string>& parInst,
181 const vector<Period>& parTenor,
const vector<Real>& parRates);
183 void createCdsVolCurve(
const string& name,
const vector<Period>& parTenor,
const vector<Real>& parRates);
184 void createEquityVolCurve(
const string& name,
const string& ccy,
const vector<Period>& parTenor,
185 const vector<Real>& parRates);
186 void createBaseCorrel(
const string& name,
const vector<Period>& tenors,
const vector<string>& lossLevel,
187 const vector<Real> quotes);
189 const vector<Period>& swapTenors,
const vector<Real>& strikeSpreads,
190 const vector<Real>& parRates);
192 const vector<Real>& parRates,
bool singleCurve);
193 void createYoYInflationIndex(
const string& idxName,
const vector<string>& parInst,
const vector<Period>& parTenor,
194 const vector<Real>& parRates,
bool singleCurve);
196 Handle<YieldTermStructure>
flatRateYts(Real forward);
197 Handle<BlackVolTermStructure>
flatRateFxv(Volatility forward);
198 Handle<QuantLib::SwaptionVolatilityStructure>
flatRateSvs(Volatility forward,
199 VolatilityType type = ShiftedLognormal, Real shift = 0.0);
200 Handle<DefaultProbabilityTermStructure>
flatRateDcs(Volatility forward);
201 Handle<OptionletVolatilityStructure>
flatRateCvs(Volatility vol, VolatilityType type = Normal, Real shift = 0.0);
225 static QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarketParameters>
228 static QuantLib::ext::shared_ptr<ore::analytics::SensitivityScenarioData>
231 static QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarketParameters>
setupSimMarketData2();
233 static QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarketParameters>
setupSimMarketData5();
Static class to allow for easy construction of configuration objects for use within tests.
static QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > setupSensitivityScenarioData(bool hasSwapVolCube=false, bool hasYYCapVols=false, bool parConversion=false)
SensitivityScenarioData instance.
static QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > setupSimMarketData2()
ScenarioSimMarketParameters instance, 2 currencies.
static QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > setupSensitivityScenarioData2()
SensitivityScenarioData instance, 2 currencies.
static QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > setupSensitivityScenarioData5()
SensitivityScenarioData instance, 5 currencies.
static void setConventions()
Set Conventions.
static void setConventions2()
static QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > setupSensitivityScenarioData2b()
SensitivityScenarioData instance, 2 currencies, shifts more granular than base curve.
static QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > setupSimMarketData(bool hasSwapVolCube=false, bool hasYYCapVols=false)
ScenarioSimMarketParameters instance.
static QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > setupSimMarketData5()
ScenarioSimMarketParameters instance, 5 currencies.
Simple flat market setup to be used in the test suite.
Handle< YoYInflationIndex > makeYoYInflationIndex(string index, vector< Date > dates, vector< Rate > rates, QuantLib::ext::shared_ptr< YoYInflationIndex > ii, Handle< YieldTermStructure > yts)
Handle< CPICapFloorTermPriceSurface > flatRateCps(Handle< ZeroInflationIndex > infIndex, const std::vector< Rate > cStrikes, std::vector< Rate > fStrikes, std::vector< Period > cfMaturities, Matrix cPrice, Matrix fPrice)
Handle< YoYInflationTermStructure > flatYoYInflationCurve(Real inflationRate, Rate nominalRate)
Handle< YoYOptionletVolatilitySurface > flatYoYOptionletVolatilitySurface(Real normalVol)
Handle< OptionletVolatilityStructure > flatRateCvs(Volatility vol, VolatilityType type=Normal, Real shift=0.0)
Handle< ZeroInflationIndex > makeZeroInflationIndex(string index, vector< Date > dates, vector< Rate > rates, QuantLib::ext::shared_ptr< ZeroInflationIndex > ii, Handle< YieldTermStructure > yts)
Handle< QuantLib::CPIVolatilitySurface > flatCpiVolSurface(Volatility v)
Handle< QuantExt::CreditCurve > flatRateDcs(Volatility forward)
Handle< QuantExt::CorrelationTermStructure > flatCorrelation(Real correlation=0.0)
Handle< ZeroInflationTermStructure > flatZeroInflationCurve(Real inflationRate, Rate nominalRate)
Handle< YieldTermStructure > flatRateYts(Real forward)
Handle< BlackVolTermStructure > flatRateFxv(Volatility forward)
Handle< QuantLib::SwaptionVolatilityStructure > flatRateSvs(Volatility forward, VolatilityType type=ShiftedLognormal, Real shift=0.0)
Handle< YieldTermStructure > flatRateDiv(Real dividend)
map< string, vector< Period > > swaptionVolRateHelperSwapTenorsMap_
const map< string, vector< QuantLib::ext::shared_ptr< RateHelper > > > & indexCurveRateHelpersMap() const
map< string, vector< Handle< Quote > > > discountRateHelperValuesMap_
void createIborIndex(const string &idxName, const vector< string > &parInst, const vector< Period > &parTenor, const vector< Real > &parRates, bool singleCurve)
map< string, vector< Period > > equityForecastRateHelperTenorsMap_
map< string, vector< Handle< Quote > > > equityForecastRateHelperValuesMap_
map< string, vector< string > > baseCorrLossLevelsMap_
map< string, vector< Handle< Quote > > > defaultRateHelperValuesMap_
map< string, vector< Handle< Quote > > > baseCorrRateHelperValuesMap_
const map< string, vector< Handle< Quote > > > & baseCorrRateHelperValuesMap() const
map< string, vector< Period > > equityVolRateHelperTenorsMap_
const map< string, vector< Period > > & defaultRateHelperTenorsMap() const
const map< string, vector< Period > > & zeroInflationRateHelperTenorsMap() const
const map< string, vector< Period > > & yoyInflationRateHelperTenorsMap() const
map< string, vector< Period > > zeroInflationRateHelperTenorsMap_
map< string, vector< Handle< Quote > > > zeroInflationRateHelperValuesMap_
const map< string, vector< Period > > & equityForecastRateHelperTenorsMap() const
const map< string, vector< Handle< Quote > > > & discountRateHelperValuesMap() const
void createDiscountCurve(const string &ccy, const vector< string > &parInst, const vector< Period > &parTenor, const vector< Real > &parRates)
map< string, vector< QuantLib::ext::shared_ptr< QuantExt::DefaultProbabilityHelper > > > defaultRateHelpersMap_
map< string, vector< string > > indexCurveRateHelperInstMap_
const map< string, vector< string > > & zeroInflationRateHelperInstMap() const
map< string, vector< Handle< Quote > > > indexCurveRateHelperValuesMap_
map< string, vector< Period > > baseCorrRateHelperTenorsMap_
const map< string, vector< Period > > & indexCurveRateHelperTenorsMap() const
const map< string, vector< QuantLib::ext::shared_ptr< RateHelper > > > & discountRateHelpersMap() const
const map< string, vector< Handle< Quote > > > & cdsVolRateHelperValuesMap() const
map< string, vector< string > > discountRateHelperInstMap_
map< string, vector< string > > equityForecastRateHelperInstMap_
const map< string, vector< string > > & equityForecastRateHelpersInstMap() const
map< string, vector< Period > > swaptionVolRateHelperTenorsMap_
Handle< OptionletVolatilityStructure > flatRateCvs(Volatility vol, VolatilityType type=Normal, Real shift=0.0)
void createCdsVolCurve(const string &name, const vector< Period > &parTenor, const vector< Real > &parRates)
const map< string, vector< QuantLib::ext::shared_ptr< QuantExt::DefaultProbabilityHelper > > > & defaultRateHelpersMap() const
void createXccyDiscountCurve(const string &ccy, const string &baseCcy, const vector< string > &parInst, const vector< Period > &parTenor, const vector< Real > &parRates)
const map< string, vector< Handle< Quote > > > & zeroInflationRateHelperValuesMap() const
const map< string, vector< Period > > & equityVolRateHelperTenorsMap() const
const map< string, vector< string > > & defaultRateHelpersInstMap() const
map< string, vector< Period > > cdsVolRateHelperTenorsMap_
const map< string, vector< string > > & indexCurveRateHelperInstMap() const
map< string, vector< QuantLib::ext::shared_ptr< RateHelper > > > discountRateHelpersMap_
Handle< YieldTermStructure > flatRateYts(Real forward)
const map< string, vector< Handle< Quote > > > & equityForecastRateHelperValuesMap() const
map< string, vector< string > > zeroInflationRateHelperInstMap_
map< string, vector< Period > > defaultRateHelperTenorsMap_
void createEquityForecastCurve(const string &name, const string &ccy, const vector< string > &parInst, const vector< Period > &parTenor, const vector< Real > &parRates)
const map< string, vector< Period > > & cdsVolRateHelperTenorsMap() const
map< string, vector< Period > > discountRateHelperTenorsMap_
map< string, vector< string > > defaultRateHelperInstMap_
const map< string, vector< Handle< Quote > > > & indexCurveRateHelperValuesMap() const
void createEquityVolCurve(const string &name, const string &ccy, const vector< Period > &parTenor, const vector< Real > &parRates)
Handle< DefaultProbabilityTermStructure > flatRateDcs(Volatility forward)
const map< string, vector< Period > > & baseCorrRateHelperTenorsMap() const
map< string, vector< QuantLib::ext::shared_ptr< RateHelper > > > indexCurveRateHelpersMap_
const map< string, vector< string > > & discountRateHelpersInstMap() const
map< string, vector< Handle< Quote > > > equityVolRateHelperValuesMap_
const map< string, vector< Period > > & swaptionVolRateHelperSwapTenorsMap() const
void createBaseCorrel(const string &name, const vector< Period > &tenors, const vector< string > &lossLevel, const vector< Real > quotes)
map< string, vector< Period > > indexCurveRateHelperTenorsMap_
void createYoYInflationIndex(const string &idxName, const vector< string > &parInst, const vector< Period > &parTenor, const vector< Real > &parRates, bool singleCurve)
Handle< BlackVolTermStructure > flatRateFxv(Volatility forward)
const map< string, vector< Handle< Quote > > > & swaptionVolRateHelperValuesMap() const
const map< string, vector< Period > > & swaptionVolRateHelperTenorsMap() const
const map< string, vector< Handle< Quote > > > & equityVolRateHelperValuesMap() const
map< string, vector< Period > > yoyInflationRateHelperTenorsMap_
const map< string, vector< string > > & yoyInflationRateHelperInstMap() const
map< string, vector< Handle< Quote > > > cdsVolRateHelperValuesMap_
map< string, vector< string > > yoyInflationRateHelperInstMap_
void createDefaultCurve(const string &name, const string &ccy, const vector< string > &parInst, const vector< Period > &parTenor, const vector< Real > &parRates)
const map< string, vector< QuantLib::ext::shared_ptr< RateHelper > > > & equityForecastRateHelpersMap() const
Handle< QuantLib::SwaptionVolatilityStructure > flatRateSvs(Volatility forward, VolatilityType type=ShiftedLognormal, Real shift=0.0)
void createSwaptionVolCurve(const string &name, const vector< Period > &optionTenors, const vector< Period > &swapTenors, const vector< Real > &strikeSpreads, const vector< Real > &parRates)
const map< string, vector< Handle< Quote > > > & defaultRateHelperValuesMap() const
const map< string, vector< string > > & baseCorrLossLevelsMap() const
map< string, vector< Handle< Quote > > > yoyInflationRateHelperValuesMap_
map< string, vector< QuantLib::ext::shared_ptr< RateHelper > > > equityForecastRateHelpersMap_
const map< string, vector< Period > > & discountRateHelperTenorsMap() const
void createZeroInflationIndex(const string &idxName, const vector< string > &parInst, const vector< Period > &parTenor, const vector< Real > &parRates, bool singleCurve)
const map< string, vector< Handle< Quote > > > & yoyInflationRateHelperValuesMap() const
map< string, vector< Handle< Quote > > > swaptionVolRateHelperValuesMap_
A class to hold Scenario parameters for scenarioSimMarket.
A class to hold the parametrisation for building sensitivity scenarios.