Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
oredtestmarket.cpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
20
21#include <boost/make_shared.hpp>
22#include <boost/test/unit_test.hpp>
23#include <iostream>
24#include <ql/indexes/inflation/ukrpi.hpp>
25#include <ql/termstructures/inflation/inflationhelpers.hpp>
26#include <ql/termstructures/inflation/piecewiseyoyinflationcurve.hpp>
27#include <ql/termstructures/inflation/piecewisezeroinflationcurve.hpp>
28#include <ql/termstructures/volatility/equityfx/blackconstantvol.hpp>
29#include <ql/termstructures/volatility/equityfx/blackvariancecurve.hpp>
30#include <ql/termstructures/volatility/optionlet/constantoptionletvol.hpp>
31#include <ql/termstructures/volatility/swaption/swaptionconstantvol.hpp>
32#include <ql/termstructures/volatility/swaption/swaptionvolcube.hpp>
33#include <ql/termstructures/volatility/swaption/swaptionvolmatrix.hpp>
40
43using QuantExt::DefaultProbabilityHelper;
46
47OredTestMarket::OredTestMarket(Date asof, bool swapVolCube) : MarketImpl(false) {
48 asof_ = asof;
49
50 QuantLib::ext::shared_ptr<Conventions> conventions = QuantLib::ext::make_shared<Conventions>();
51
52 // add conventions
53 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexEURConv(
54 new ore::data::SwapIndexConvention("EUR-CMS-2Y", "EUR-6M-SWAP-CONVENTIONS"));
55 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexEURLongConv(
56 new ore::data::SwapIndexConvention("EUR-CMS-30Y", "EUR-6M-SWAP-CONVENTIONS"));
57 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexUSDConv(
58 new ore::data::SwapIndexConvention("USD-CMS-2Y", "USD-3M-SWAP-CONVENTIONS"));
59 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexUSDLongConv(
60 new ore::data::SwapIndexConvention("USD-CMS-30Y", "USD-3M-SWAP-CONVENTIONS"));
61 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexGBPConv(
62 new ore::data::SwapIndexConvention("GBP-CMS-2Y", "GBP-3M-SWAP-CONVENTIONS"));
63 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexGBPLongConv(
64 new ore::data::SwapIndexConvention("GBP-CMS-30Y", "GBP-6M-SWAP-CONVENTIONS"));
65 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexCHFConv(
66 new ore::data::SwapIndexConvention("CHF-CMS-2Y", "CHF-3M-SWAP-CONVENTIONS"));
67 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexCHFLongConv(
68 new ore::data::SwapIndexConvention("CHF-CMS-30Y", "CHF-6M-SWAP-CONVENTIONS"));
69 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexJPYConv(
70 new ore::data::SwapIndexConvention("JPY-CMS-2Y", "JPY-LIBOR-6M-SWAP-CONVENTIONS"));
71 QuantLib::ext::shared_ptr<ore::data::Convention> swapIndexJPYLongConv(
72 new ore::data::SwapIndexConvention("JPY-CMS-30Y", "JPY-LIBOR-6M-SWAP-CONVENTIONS"));
73
74 conventions->add(swapIndexEURConv);
75 conventions->add(swapIndexEURLongConv);
76 conventions->add(swapIndexUSDConv);
77 conventions->add(swapIndexUSDLongConv);
78 conventions->add(swapIndexGBPConv);
79 conventions->add(swapIndexGBPLongConv);
80 conventions->add(swapIndexCHFConv);
81 conventions->add(swapIndexCHFLongConv);
82 conventions->add(swapIndexJPYConv);
83 conventions->add(swapIndexJPYLongConv);
84
85 QuantLib::ext::shared_ptr<ore::data::Convention> swapEURConv(new ore::data::IRSwapConvention(
86 "EUR-6M-SWAP-CONVENTIONS", "TARGET", "Annual", "MF", "30/360", "EUR-EURIBOR-6M"));
87 QuantLib::ext::shared_ptr<ore::data::Convention> swapUSDConv(
88 new ore::data::IRSwapConvention("USD-3M-SWAP-CONVENTIONS", "US", "Semiannual", "MF", "30/360", "USD-LIBOR-3M"));
89 QuantLib::ext::shared_ptr<ore::data::Convention> swapGBPConv(
90 new ore::data::IRSwapConvention("GBP-3M-SWAP-CONVENTIONS", "UK", "Semiannual", "MF", "A365", "GBP-LIBOR-3M"));
91 QuantLib::ext::shared_ptr<ore::data::Convention> swapGBPLongConv(
92 new ore::data::IRSwapConvention("GBP-6M-SWAP-CONVENTIONS", "UK", "Semiannual", "MF", "A365", "GBP-LIBOR-6M"));
93 QuantLib::ext::shared_ptr<ore::data::Convention> swapCHFConv(
94 new ore::data::IRSwapConvention("CHF-3M-SWAP-CONVENTIONS", "ZUB", "Annual", "MF", "30/360", "CHF-LIBOR-3M"));
95 QuantLib::ext::shared_ptr<ore::data::Convention> swapCHFLongConv(
96 new ore::data::IRSwapConvention("CHF-6M-SWAP-CONVENTIONS", "ZUB", "Annual", "MF", "30/360", "CHF-LIBOR-6M"));
97 QuantLib::ext::shared_ptr<ore::data::Convention> swapJPYConv(new ore::data::IRSwapConvention(
98 "JPY-LIBOR-6M-SWAP-CONVENTIONS", "JP", "Semiannual", "MF", "A365", "JPY-LIBOR-6M"));
99
100 conventions->add(swapEURConv);
101 conventions->add(swapUSDConv);
102 conventions->add(swapGBPConv);
103 conventions->add(swapGBPLongConv);
104 conventions->add(swapCHFConv);
105 conventions->add(swapCHFLongConv);
106 conventions->add(swapJPYConv);
107
108 InstrumentConventions::instance().setConventions(conventions);
109
110 // build discount
111 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::Discount, "EUR")] = flatRateYts(0.02);
112 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::Discount, "USD")] = flatRateYts(0.03);
113 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::Discount, "GBP")] = flatRateYts(0.04);
114 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::Discount, "CHF")] = flatRateYts(0.01);
115 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::Discount, "JPY")] = flatRateYts(0.005);
116 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::Discount, "CAD")] = flatRateYts(0.005);
117 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::Discount, "SEK")] = flatRateYts(0.005);
118
119 // build ibor indices
120 vector<pair<string, Real>> indexData = {
121 {"EUR-EONIA", 0.01}, {"EUR-EURIBOR-3M", 0.015}, {"EUR-EURIBOR-6M", 0.02}, {"USD-FedFunds", 0.01},
122 {"USD-LIBOR-1M", 0.02}, {"USD-LIBOR-3M", 0.03}, {"USD-LIBOR-6M", 0.05}, {"GBP-SONIA", 0.01},
123 {"GBP-LIBOR-3M", 0.03}, {"GBP-LIBOR-6M", 0.04}, {"CHF-LIBOR-3M", 0.01}, {"CHF-TOIS", 0.02},
124 {"CHF-LIBOR-6M", 0.02}, {"JPY-LIBOR-6M", 0.01}, {"JPY-TONAR", 0.01}, {"JPY-LIBOR-3M", 0.01},
125 {"CAD-CDOR-3M", 0.02}, {"CAD-CORRA", 0.01}, {"SEK-STIBOR-3M", 0.02}};
126
127 for (auto id : indexData) {
128 Handle<IborIndex> h(parseIborIndex(id.first, flatRateYts(id.second)));
129 iborIndices_[make_pair(Market::defaultConfiguration, id.first)] = h;
130
131 // set up dummy fixings for the past 400 days
132 for (Date d = asof - 400; d < asof; d++) {
133 if (h->isValidFixingDate(d))
134 h->addFixing(d, 0.01);
135 }
136 }
137
138 // swap index
139 addSwapIndex("EUR-CMS-2Y", "EUR-EONIA", Market::defaultConfiguration);
140 addSwapIndex("EUR-CMS-30Y", "EUR-EONIA", Market::defaultConfiguration);
141 addSwapIndex("USD-CMS-2Y", "USD-FedFunds", Market::defaultConfiguration);
142 addSwapIndex("USD-CMS-30Y", "USD-FedFunds", Market::defaultConfiguration);
143 addSwapIndex("GBP-CMS-2Y", "GBP-SONIA", Market::defaultConfiguration);
144 addSwapIndex("GBP-CMS-30Y", "GBP-SONIA", Market::defaultConfiguration);
145 addSwapIndex("CHF-CMS-2Y", "CHF-LIBOR-6M", Market::defaultConfiguration);
146 addSwapIndex("CHF-CMS-30Y", "CHF-LIBOR-6M", Market::defaultConfiguration);
147 addSwapIndex("JPY-CMS-2Y", "JPY-LIBOR-6M", Market::defaultConfiguration);
148 addSwapIndex("JPY-CMS-30Y", "JPY-LIBOR-6M", Market::defaultConfiguration);
149
150 // add fx rates
151 std::map<std::string, QuantLib::Handle<QuantLib::Quote>> quotes;
152 quotes["EURUSD"] = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(1.2));
153 quotes["EURGBP"] = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(0.8));
154 quotes["EURCHF"] = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(1.0));
155 quotes["EURCAD"] = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(1.0));
156 quotes["EURSEK"] = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(1.0));
157 quotes["EURJPY"] = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(128.0));
158 fx_ = QuantLib::ext::make_shared<FXTriangulation>(quotes);
159
160 // build fx vols
161 fxVols_[make_pair(Market::defaultConfiguration, "EURUSD")] = flatRateFxv(0.12);
162 fxVols_[make_pair(Market::defaultConfiguration, "EURGBP")] = flatRateFxv(0.15);
163 fxVols_[make_pair(Market::defaultConfiguration, "EURCHF")] = flatRateFxv(0.15);
164 fxVols_[make_pair(Market::defaultConfiguration, "EURJPY")] = flatRateFxv(0.15);
165 fxVols_[make_pair(Market::defaultConfiguration, "GBPCHF")] = flatRateFxv(0.15);
166 // Add Equity Spots
167 equitySpots_[make_pair(Market::defaultConfiguration, "SP5")] =
168 Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(2147.56));
169 equitySpots_[make_pair(Market::defaultConfiguration, "Lufthansa")] =
170 Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(12.75));
171
172 equityVols_[make_pair(Market::defaultConfiguration, "SP5")] = flatRateFxv(0.2514);
173 equityVols_[make_pair(Market::defaultConfiguration, "Lufthansa")] = flatRateFxv(0.30);
174
175 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::EquityDividend, "SP5")] = flatRateDiv(0.01);
176 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::EquityDividend, "Lufthansa")] =
177 flatRateDiv(0.0);
178
179 equityCurves_[make_pair(Market::defaultConfiguration, "SP5")] = Handle<EquityIndex2>(QuantLib::ext::make_shared<EquityIndex2>(
180 "SP5", UnitedStates(UnitedStates::Settlement), parseCurrency("USD"), equitySpot("SP5"), yieldCurve(YieldCurveType::Discount, "USD"),
181 yieldCurve(YieldCurveType::EquityDividend, "SP5")));
182 equityCurves_[make_pair(Market::defaultConfiguration, "Lufthansa")] =
183 Handle<EquityIndex2>(QuantLib::ext::make_shared<EquityIndex2>(
184 "Lufthansa", TARGET(), parseCurrency("EUR"), equitySpot("Lufthansa"),
185 yieldCurve(YieldCurveType::Discount, "EUR"), yieldCurve(YieldCurveType::EquityDividend, "Lufthansa")));
186
187 swaptionIndexBases_[make_pair(Market::defaultConfiguration, "EUR")] = std::make_pair("EUR-CMS-2Y", "EUR-CMS-30Y");
188 swaptionIndexBases_[make_pair(Market::defaultConfiguration, "USD")] = std::make_pair("USD-CMS-2Y", "USD-CMS-30Y");
189 swaptionIndexBases_[make_pair(Market::defaultConfiguration, "GBP")] = std::make_pair("GBP-CMS-2Y", "GBP-CMS-30Y");
190 swaptionIndexBases_[make_pair(Market::defaultConfiguration, "CHF")] = std::make_pair("CHF-CMS-2Y", "CHF-CMS-30Y");
191 swaptionIndexBases_[make_pair(Market::defaultConfiguration, "JPY")] = std::make_pair("JPY-CMS-2Y", "JPY-CMS-30Y");
192
193 // build swaption vols
194
195 if (swapVolCube) {
196 vector<Real> shiftStrikes = {-0.02, -0.01, -0.005, -0.0025, 0.0, 0.0025, 0.005, 0.01, 0.02};
197 vector<Period> optionTenors = {2 * Weeks, 1 * Months, 3 * Months, 6 * Months, 1 * Years, 2 * Years,
198 3 * Years, 5 * Years, 10 * Years, 15 * Years, 20 * Years, 30 * Years};
199 vector<Period> swapTenors = {1 * Years, 2 * Years, 3 * Years, 4 * Years, 5 * Years,
200 7 * Years, 10 * Years, 15 * Years, 20 * Years, 30 * Years};
201 DayCounter dc = Actual365Fixed();
202 Calendar cal = TARGET();
203 BusinessDayConvention bdc = Following;
204 vector<vector<Handle<Quote>>> parQuotes(
205 optionTenors.size(),
206 vector<Handle<Quote>>(swapTenors.size(), Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(0.02))));
207
208 vector<vector<Real>> shift(optionTenors.size(), vector<Real>(swapTenors.size(), 0.0));
209 vector<string> ccys = {"USD", "JPY"};
210 QuantLib::ext::shared_ptr<SwaptionVolatilityStructure> atm(new SwaptionVolatilityMatrix(
211 asof_, cal, bdc, optionTenors, swapTenors, parQuotes, dc, true, QuantLib::Normal, shift));
212
213 Handle<SwaptionVolatilityStructure> hATM(atm);
214 vector<vector<Handle<Quote>>> cubeQuotes(
215 optionTenors.size() * swapTenors.size(),
216 vector<Handle<Quote>>(shiftStrikes.size(), Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(0.02))));
217
218 for (auto name : ccys) {
219 Handle<SwapIndex> si = swapIndex(swapIndexBase(name));
220 Handle<SwapIndex> ssi = swapIndex(shortSwapIndexBase(name));
221
222 QuantLib::ext::shared_ptr<SwaptionVolatilityCube> tmp(new QuantExt::SwaptionVolCube2(
223 hATM, optionTenors, swapTenors, shiftStrikes, cubeQuotes, *si, *ssi, false, true, false));
224 tmp->enableExtrapolation();
225
226 Handle<SwaptionVolatilityStructure> svp =
227 Handle<SwaptionVolatilityStructure>(QuantLib::ext::make_shared<SwaptionVolCubeWithATM>(tmp));
229 }
230
231 } else {
237 }
238
239 // build cap/floor vol structures
240 capFloorCurves_[make_pair(Market::defaultConfiguration, "EUR")] = flatRateCvs(0.0050, Normal);
241 capFloorCurves_[make_pair(Market::defaultConfiguration, "USD")] = flatRateCvs(0.0060, Normal);
242 capFloorCurves_[make_pair(Market::defaultConfiguration, "GBP")] = flatRateCvs(0.0055, Normal);
243 capFloorCurves_[make_pair(Market::defaultConfiguration, "CHF")] = flatRateCvs(0.0045, Normal);
244 capFloorCurves_[make_pair(Market::defaultConfiguration, "JPY")] = flatRateCvs(0.0040, Normal);
245
246 // build default curves
249 defaultCurves_[make_pair(Market::defaultConfiguration, "BondIssuer1")] = flatRateDcs(0.0);
250
251 recoveryRates_[make_pair(Market::defaultConfiguration, "dc")] = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(0.4));
253 Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(0.4));
254 recoveryRates_[make_pair(Market::defaultConfiguration, "BondIssuer1")] =
255 Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(0.4));
256
257 yieldCurves_[make_tuple(Market::defaultConfiguration, YieldCurveType::Yield, "BondCurve1")] = flatRateYts(0.05);
258
260 Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(0.0));
261
262 cdsVols_[make_pair(Market::defaultConfiguration, "dc")] =
263 Handle<QuantExt::CreditVolCurve>(QuantLib::ext::make_shared<QuantExt::CreditVolCurveWrapper>(flatRateFxv(0.12)));
264}
265
266Handle<YieldTermStructure> OredTestMarket::flatRateYts(Real forward) {
267 QuantLib::ext::shared_ptr<YieldTermStructure> yts(
268 new FlatForward(Settings::instance().evaluationDate(), forward, ActualActual(ActualActual::ISDA)));
269 return Handle<YieldTermStructure>(yts);
270}
271
272Handle<YieldTermStructure> OredTestMarket::flatRateDiv(Real dividend) {
273 QuantLib::ext::shared_ptr<YieldTermStructure> yts(
274 new FlatForward(Settings::instance().evaluationDate(), dividend, ActualActual(ActualActual::ISDA)));
275 return Handle<YieldTermStructure>(yts);
276}
277
278Handle<BlackVolTermStructure> OredTestMarket::flatRateFxv(Volatility forward) {
279 QuantLib::ext::shared_ptr<BlackVolTermStructure> fxv(
280 new BlackConstantVol(Settings::instance().evaluationDate(), NullCalendar(), forward, Actual365Fixed()));
281 return Handle<BlackVolTermStructure>(fxv);
282}
283
284Handle<QuantLib::SwaptionVolatilityStructure> OredTestMarket::flatRateSvs(Volatility forward, VolatilityType type,
285 Real shift) {
286 QuantLib::ext::shared_ptr<QuantLib::SwaptionVolatilityStructure> svs(
287 new QuantLib::ConstantSwaptionVolatility(Settings::instance().evaluationDate(), NullCalendar(),
288 ModifiedFollowing, forward, Actual365Fixed(), type, shift));
289 return Handle<QuantLib::SwaptionVolatilityStructure>(svs);
290}
291
292Handle<QuantExt::CreditCurve> OredTestMarket::flatRateDcs(Volatility forward) {
293 QuantLib::ext::shared_ptr<DefaultProbabilityTermStructure> dcs(new FlatHazardRate(asof_, forward, ActualActual(ActualActual::ISDA)));
294 return Handle<QuantExt::CreditCurve>(
295 QuantLib::ext::make_shared<QuantExt::CreditCurve>(Handle<DefaultProbabilityTermStructure>(dcs)));
296}
297
298Handle<OptionletVolatilityStructure> OredTestMarket::flatRateCvs(Volatility vol, VolatilityType type, Real shift) {
299 QuantLib::ext::shared_ptr<OptionletVolatilityStructure> ts(new QuantLib::ConstantOptionletVolatility(
300 Settings::instance().evaluationDate(), NullCalendar(), ModifiedFollowing, vol, ActualActual(ActualActual::ISDA), type, shift));
301 return Handle<OptionletVolatilityStructure>(ts);
302}
Handle< OptionletVolatilityStructure > flatRateCvs(Volatility vol, VolatilityType type=Normal, Real shift=0.0)
Handle< QuantExt::CreditCurve > flatRateDcs(Volatility forward)
Handle< YieldTermStructure > flatRateYts(Real forward)
OredTestMarket(Date asof, bool swapVolCube=false)
Handle< BlackVolTermStructure > flatRateFxv(Volatility forward)
Handle< QuantLib::SwaptionVolatilityStructure > flatRateSvs(Volatility forward, VolatilityType type=ShiftedLognormal, Real shift=0.0)
Handle< YieldTermStructure > flatRateDiv(Real dividend)
Container for storing Interest Rate Swap conventions.
static const string defaultConfiguration
Default configuration label.
Definition: market.hpp:296
Market Implementation.
Definition: marketimpl.hpp:53
map< pair< string, string >, Handle< OptionletVolatilityStructure > > capFloorCurves_
Definition: marketimpl.hpp:219
string shortSwapIndexBase(const string &key, const string &configuration=Market::defaultConfiguration) const override
Definition: marketimpl.cpp:184
string swapIndexBase(const string &key, const string &configuration=Market::defaultConfiguration) const override
Definition: marketimpl.cpp:188
map< pair< string, string >, QuantLib::Handle< QuantExt::EquityIndex2 > > equityCurves_
Definition: marketimpl.hpp:232
map< pair< string, string >, Handle< BlackVolTermStructure > > fxVols_
Definition: marketimpl.hpp:214
QuantLib::ext::shared_ptr< FXTriangulation > fx_
Definition: marketimpl.hpp:206
map< tuple< string, YieldCurveType, string >, Handle< YieldTermStructure > > yieldCurves_
Definition: marketimpl.hpp:208
map< pair< string, string >, Handle< QuantExt::CreditCurve > > defaultCurves_
Definition: marketimpl.hpp:215
map< pair< string, string >, Handle< IborIndex > > iborIndices_
Definition: marketimpl.hpp:209
map< pair< string, string >, Handle< QuantExt::CreditVolCurve > > cdsVols_
Definition: marketimpl.hpp:216
map< pair< string, string >, Handle< Quote > > equitySpots_
Definition: marketimpl.hpp:225
map< pair< string, string >, Handle< QuantLib::SwaptionVolatilityStructure > > swaptionCurves_
Definition: marketimpl.hpp:211
map< pair< string, string >, Handle< Quote > > recoveryRates_
Definition: marketimpl.hpp:218
Handle< Quote > equitySpot(const string &eqName, const string &configuration=Market::defaultConfiguration) const override
Equity curves.
Definition: marketimpl.cpp:359
Handle< SwapIndex > swapIndex(const string &indexName, const string &configuration=Market::defaultConfiguration) const override
Definition: marketimpl.cpp:112
map< pair< string, string >, pair< string, string > > swaptionIndexBases_
Definition: marketimpl.hpp:212
map< pair< string, string >, Handle< BlackVolTermStructure > > equityVols_
Definition: marketimpl.hpp:226
map< pair< string, string >, Handle< Quote > > securitySpreads_
Definition: marketimpl.hpp:227
Handle< YieldTermStructure > yieldCurve(const YieldCurveType &type, const string &ccy, const string &configuration=Market::defaultConfiguration) const override
Yield Curves.
Definition: marketimpl.cpp:74
void addSwapIndex(const string &swapindex, const string &discountIndex, const string &configuration=Market::defaultConfiguration) const
add a swap index to the market
Definition: marketimpl.cpp:473
Container for storing Swap Index conventions.
QuantLib::ext::shared_ptr< IborIndex > parseIborIndex(const string &s, const Handle< YieldTermStructure > &h)
Convert std::string to QuantLib::IborIndex.
Currency parseCurrency(const string &s)
Convert text to QuantLib::Currency.
Definition: parsers.cpp:290
string name