Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
legbuilders.cpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2018 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
23
27
28using namespace QuantExt;
29
30namespace ore {
31namespace data {
32
33Leg FixedLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
34 RequiredFixings& requiredFixings, const string& configuration,
35 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
36 Leg leg = makeFixedLeg(data, openEndDateReplacement);
37 applyIndexing(leg, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
38 addToRequiredFixings(leg, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
39 if (data.legType() == "Fixed" && !data.isNotResetXCCY()) {
40
41 QL_REQUIRE(!data.fxIndex().empty(), "FixedLegBuilder: need fx index for fx resetting leg");
42 auto fxIndex = buildFxIndex(data.fxIndex(), data.currency(), data.foreignCurrency(), engineFactory->market(),
43 configuration, true);
44
45 // If no initial notional is given, all coupons including the first period will be FX linked (i.e resettable)
46 Size j = 0;
47 if (data.notionals().size() == 0) {
48 DLOG("Building FX Resettable with unspecified domestic notional");
49 } else {
50 // given an initial amount (not a resettable period)
51 LOG("Building FX Resettable with first domestic notional specified explicitly");
52 j = 1;
53 }
54
55 for (; j < leg.size(); ++j) {
56 QuantLib::ext::shared_ptr<FixedRateCoupon> coupon = QuantLib::ext::dynamic_pointer_cast<FixedRateCoupon>(leg[j]);
57 Date fixingDate = fxIndex->fixingCalendar().advance(coupon->accrualStartDate(),
58 -static_cast<Integer>(fxIndex->fixingDays()), Days);
59 QuantLib::ext::shared_ptr<FixedRateFXLinkedNotionalCoupon> fxLinkedCoupon =
60 QuantLib::ext::make_shared<FixedRateFXLinkedNotionalCoupon>(fixingDate, data.foreignAmount(), fxIndex, coupon);
61 leg[j] = fxLinkedCoupon;
62
63 // Add the FX fixing to the required fixings
64 requiredFixings.addFixingDate(fixingDate, data.fxIndex(), fxLinkedCoupon->date());
65 }
66 }
67 return leg;
68}
69
70Leg ZeroCouponFixedLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
71 RequiredFixings& requiredFixings, const string& configuration,
72 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
73 Leg leg = makeZCFixedLeg(data);
74 applyIndexing(leg, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
75 addToRequiredFixings(leg, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
76 return leg;
77}
78
79Leg FloatingLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
80 RequiredFixings& requiredFixings, const string& configuration,
81 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
82 auto floatData = QuantLib::ext::dynamic_pointer_cast<FloatingLegData>(data.concreteLegData());
83 QL_REQUIRE(floatData, "Wrong LegType, expected Floating");
84 string indexName = floatData->index();
85 auto index = *engineFactory->market()->iborIndex(indexName, configuration);
86
87 auto ois = QuantLib::ext::dynamic_pointer_cast<OvernightIndex>(index);
88 Leg result;
89 if (ois != nullptr) {
90 QuantLib::ext::shared_ptr<OvernightIndex> idx = ois;
91 if (!floatData->historicalFixings().empty())
92 idx = QuantLib::ext::make_shared<OvernightIndexWithFixingOverride>(ois, floatData->historicalFixings());
93 result = makeOISLeg(data, idx, engineFactory, true, openEndDateReplacement);
94 } else {
95 auto bma = QuantLib::ext::dynamic_pointer_cast<QuantExt::BMAIndexWrapper>(index);
96 if (bma != nullptr)
97 result = makeBMALeg(data, bma, engineFactory, openEndDateReplacement);
98 else {
99 QuantLib::ext::shared_ptr<IborIndex> idx = index;
100 if (!floatData->historicalFixings().empty())
101 idx = QuantLib::ext::make_shared<IborIndexWithFixingOverride>(index, floatData->historicalFixings());
102 result = makeIborLeg(data, idx, engineFactory, true, openEndDateReplacement);
103 }
104 }
105 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
106 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
107
108 // handle fx resetting Ibor leg
109
110 if (data.legType() == "Floating" && !data.isNotResetXCCY()) {
111 QL_REQUIRE(!data.fxIndex().empty(), "FloatingRateLegBuilder: need fx index for fx resetting leg");
112 auto fxIndex = buildFxIndex(data.fxIndex(), data.currency(), data.foreignCurrency(), engineFactory->market(),
113 configuration, true);
114
115 // If the domestic notional value is not specified, i.e. there are no notionals specified in the leg
116 // data, then all coupons including the first will be FX linked. If the first coupon's FX fixing date
117 // is in the past, a FX fixing will be used to determine the first domestic notional. If the first
118 // coupon's FX fixing date is in the future, the first coupon's domestic notional will be determined
119 // by the FX forward rate on that future fixing date.
120
121 Size j = 0;
122 if (data.notionals().size() == 0) {
123 DLOG("Building FX Resettable with unspecified domestic notional");
124 } else {
125 // First coupon a plain floating rate coupon i.e. it is not FX linked because the initial notional is
126 // known. But, we need to add it to additionalLegs_ so that we don't miss the first coupon's ibor fixing
127 LOG("Building FX Resettable with first domestic notional specified explicitly");
128 j = 1;
129 }
130
131 // Make the necessary FX linked floating rate coupons
132 for (; j < result.size(); ++j) {
133 QuantLib::ext::shared_ptr<FloatingRateCoupon> coupon =
134 QuantLib::ext::dynamic_pointer_cast<FloatingRateCoupon>(result[j]);
135 Date fixingDate = fxIndex->fixingCalendar().advance(coupon->accrualStartDate(),
136 -static_cast<Integer>(fxIndex->fixingDays()), Days);
137 QuantLib::ext::shared_ptr<FloatingRateFXLinkedNotionalCoupon> fxLinkedCoupon =
138 QuantLib::ext::make_shared<FloatingRateFXLinkedNotionalCoupon>(fixingDate, data.foreignAmount(),
139 fxIndex, coupon);
140 // set the same pricer
141 fxLinkedCoupon->setPricer(coupon->pricer());
142 result[j] = fxLinkedCoupon;
143
144 // Add the FX fixing to the required fixings
145 requiredFixings.addFixingDate(fixingDate, data.fxIndex(), fxLinkedCoupon->date());
146 }
147 }
148
149 return result;
150}
151
152Leg CashflowLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
153 RequiredFixings& requiredFixings, const string& configuration,
154 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
155 return makeSimpleLeg(data);
156}
157
158Leg CPILegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
159 RequiredFixings& requiredFixings, const string& configuration,
160 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
161 auto cpiData = QuantLib::ext::dynamic_pointer_cast<CPILegData>(data.concreteLegData());
162 QL_REQUIRE(cpiData, "Wrong LegType, expected CPI");
163 string inflationIndexName = cpiData->index();
164 auto index = *engineFactory->market()->zeroInflationIndex(inflationIndexName, configuration);
165 Leg result = makeCPILeg(data, index, engineFactory, openEndDateReplacement);
166 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
167 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
168 return result;
169}
170
171Leg YYLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
172 RequiredFixings& requiredFixings, const string& configuration,
173 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
174 auto yyData = QuantLib::ext::dynamic_pointer_cast<YoYLegData>(data.concreteLegData());
175 QL_REQUIRE(yyData, "Wrong LegType, expected YY");
176 string inflationIndexName = yyData->index();
177 bool irregularYoY = yyData->irregularYoY();
178 Leg result;
179 if (!irregularYoY) {
180 auto index = *engineFactory->market()->yoyInflationIndex(inflationIndexName, configuration);
181 result = makeYoYLeg(data, index, engineFactory, openEndDateReplacement);
182 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
184 QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
185 } else {
186 auto index = *engineFactory->market()->zeroInflationIndex(inflationIndexName, configuration);
187 result = makeYoYLeg(data, index, engineFactory, openEndDateReplacement);
188 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
189 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
190 }
191 return result;
192}
193
194Leg CMSLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
195 RequiredFixings& requiredFixings, const string& configuration,
196 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
197 auto cmsData = QuantLib::ext::dynamic_pointer_cast<CMSLegData>(data.concreteLegData());
198 QL_REQUIRE(cmsData, "Wrong LegType, expected CMS");
199 string swapIndexName = cmsData->swapIndex();
200 auto index = *engineFactory->market()->swapIndex(swapIndexName, configuration);
201 Leg result = makeCMSLeg(data, index, engineFactory, true, openEndDateReplacement);
202 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
203 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
204 return result;
205}
206
207Leg CMBLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
208 RequiredFixings& requiredFixings, const string& configuration,
209 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
210 auto cmbData = QuantLib::ext::dynamic_pointer_cast<CMBLegData>(data.concreteLegData());
211 QL_REQUIRE(cmbData, "Wrong LegType, expected CMB");
212 string indexName = cmbData->genericBond();
213 auto index = parseConstantMaturityBondIndex(indexName);
214 Leg result = makeCMBLeg(data, engineFactory, true, openEndDateReplacement);
215 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
216 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
217 return result;
218}
219
220Leg DigitalCMSLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
221 RequiredFixings& requiredFixings, const string& configuration,
222 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
223 auto digitalCmsData = QuantLib::ext::dynamic_pointer_cast<DigitalCMSLegData>(data.concreteLegData());
224 QL_REQUIRE(digitalCmsData, "Wrong LegType, expected DigitalCMS");
225
226 auto cmsData = QuantLib::ext::dynamic_pointer_cast<CMSLegData>(digitalCmsData->underlying());
227 QL_REQUIRE(cmsData, "Incomplete DigitalCmsLeg, expected CMSLegData");
228
229 string swapIndexName = digitalCmsData->underlying()->swapIndex();
230 auto index = *engineFactory->market()->swapIndex(swapIndexName, configuration);
231 Leg result = makeDigitalCMSLeg(data, index, engineFactory, true, openEndDateReplacement);
232 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
233 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
234 return result;
235}
236
237Leg CMSSpreadLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
238 RequiredFixings& requiredFixings, const string& configuration,
239 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
240 auto cmsSpreadData = QuantLib::ext::dynamic_pointer_cast<CMSSpreadLegData>(data.concreteLegData());
241 QL_REQUIRE(cmsSpreadData, "Wrong LegType, expected CMSSpread");
242 auto index1 = *engineFactory->market()->swapIndex(cmsSpreadData->swapIndex1(), configuration);
243 auto index2 = *engineFactory->market()->swapIndex(cmsSpreadData->swapIndex2(), configuration);
244 Leg result = makeCMSSpreadLeg(data,
245 QuantLib::ext::make_shared<QuantLib::SwapSpreadIndex>(
246 "CMSSpread_" + index1->familyName() + "_" + index2->familyName(), index1, index2),
247 engineFactory, true, openEndDateReplacement);
248 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
249 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
250 return result;
251}
252
253Leg DigitalCMSSpreadLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
254 RequiredFixings& requiredFixings, const string& configuration,
255 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
256 auto digitalCmsSpreadData = QuantLib::ext::dynamic_pointer_cast<DigitalCMSSpreadLegData>(data.concreteLegData());
257 QL_REQUIRE(digitalCmsSpreadData, "Wrong LegType, expected DigitalCMSSpread");
258
259 auto cmsSpreadData = QuantLib::ext::dynamic_pointer_cast<CMSSpreadLegData>(digitalCmsSpreadData->underlying());
260 QL_REQUIRE(cmsSpreadData, "Incomplete DigitalCmsSpread Leg, expected CMSSpread data");
261
262 auto index1 = *engineFactory->market()->swapIndex(cmsSpreadData->swapIndex1(), configuration);
263 auto index2 = *engineFactory->market()->swapIndex(cmsSpreadData->swapIndex2(), configuration);
264
265 Leg result =
267 QuantLib::ext::make_shared<QuantLib::SwapSpreadIndex>(
268 "CMSSpread_" + index1->familyName() + "_" + index2->familyName(), index1, index2),
269 engineFactory, openEndDateReplacement);
270 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
271 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
272 return result;
273}
274
275Leg EquityLegBuilder::buildLeg(const LegData& data, const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
276 RequiredFixings& requiredFixings, const string& configuration,
277 const QuantLib::Date& openEndDateReplacement, const bool useXbsCurves) const {
278 auto eqData = QuantLib::ext::dynamic_pointer_cast<EquityLegData>(data.concreteLegData());
279 QL_REQUIRE(eqData, "Wrong LegType, expected Equity");
280 string eqName = eqData->eqName();
281 auto eqCurve = *engineFactory->market()->equityCurve(eqName, configuration);
282
283 // A little hacky but ensures for a dividend swap the swap value doesn't move equity price
284 if (eqData->returnType() == EquityReturnType::Dividend) {
285 Real spotVal = eqCurve->equitySpot()->value();
286 Handle<Quote> divSpot = Handle<Quote>(QuantLib::ext::make_shared<SimpleQuote>(spotVal));
287 eqCurve = eqCurve->clone(divSpot, eqCurve->equityForecastCurve(), eqCurve->equityDividendCurve());
288 }
289
290 Currency dataCurrency = parseCurrencyWithMinors(data.currency());
291 Currency eqCurrency;
292 // Set the equity currency if provided
293 if (!eqData->eqCurrency().empty())
294 eqCurrency = parseCurrencyWithMinors(eqData->eqCurrency());
295
296 if (eqCurve->currency().empty()) {
297 WLOG("No equity currency set in EquityIndex for equity " << eqCurve->name());
298 } else {
299 // check if it equity currency not set, use from market else check if it matches what is in market
300 if (!eqCurrency.empty())
301 QL_REQUIRE(eqCurve->currency() == eqCurrency,
302 "Equity Currency provided does not match currency of Equity Curve");
303 else
304 eqCurrency = eqCurve->currency();
305 }
306
307 QuantLib::ext::shared_ptr<QuantExt::FxIndex> fxIndex = nullptr;
308 // if equity currency differs from the leg currency we need an FxIndex
309 if (!eqCurrency.empty() && dataCurrency != eqCurrency) {
310 QL_REQUIRE(eqData->fxIndex() != "",
311 "No FxIndex - if equity currency differs from leg currency an FxIndex must be provided");
312
313 // An extra check, this ensures that the equity currency provided to use in the FX Index, matches that in
314 // equity curves in the market, this is required as future cashflows will be in the equity curve currency
315 if (!eqCurve->currency().empty() && !eqCurrency.empty()) {
316 QL_REQUIRE(eqCurve->currency() == eqCurrency,
317 "Equity Currency provided does not match currency of Equity Curve");
318 }
319
320 fxIndex = buildFxIndex(eqData->fxIndex(), data.currency(), eqCurrency.code(), engineFactory->market(),
321 configuration, useXbsCurves);
322 }
323
324 Leg result = makeEquityLeg(data, eqCurve, fxIndex, openEndDateReplacement);
325 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
326 return result;
327}
328
329} // namespace data
330} // namespace ore
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Definition: legbuilders.cpp:33
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Definition: legbuilders.cpp:79
Serializable object holding leg data.
Definition: legdata.hpp:844
void addFixingDate(const QuantLib::Date &fixingDate, const std::string &indexName, const QuantLib::Date &payDate=Date::maxDate(), const bool alwaysAddIfPaysOnSettlement=false, const bool mandatoryFixing=true)
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Leg buildLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
Definition: legbuilders.cpp:70
Currency parseCurrencyWithMinors(const string &s)
Convert text to QuantLib::Currency.
Definition: parsers.cpp:310
QuantLib::ext::shared_ptr< ConstantMaturityBondIndex > parseConstantMaturityBondIndex(const string &name)
Convert std::string to QuantExt::ConstantMaturityBondIndex.
Leg Builders.
leg data model and serialization
@ data
Definition: log.hpp:77
#define LOG(text)
Logging Macro (Level = Notice)
Definition: log.hpp:552
#define DLOG(text)
Logging Macro (Level = Debug)
Definition: log.hpp:554
#define WLOG(text)
Logging Macro (Level = Warning)
Definition: log.hpp:550
market data related utilties
QuantLib::Date fixingDate(const QuantLib::Date &d, const QuantLib::Period obsLag, const QuantLib::Frequency freq, bool interpolated)
Leg makeOISLeg(const LegData &data, const QuantLib::ext::shared_ptr< OvernightIndex > &index, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1336
Leg makeDigitalCMSLeg(const LegData &data, const QuantLib::ext::shared_ptr< QuantLib::SwapIndex > &swapIndex, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:2105
Leg makeSimpleLeg(const LegData &data)
Definition: legdata.cpp:934
void applyIndexing(Leg &leg, const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const QuantLib::Date &openEndDateReplacement, const bool useXbsCurves)
Definition: legdata.cpp:2633
Leg makeBMALeg(const LegData &data, const QuantLib::ext::shared_ptr< QuantExt::BMAIndexWrapper > &indexWrapper, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1493
void addToRequiredFixings(const QuantLib::Leg &leg, const QuantLib::ext::shared_ptr< FixingDateGetter > &fixingDateGetter)
Leg makeCMBLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1984
Leg makeYoYLeg(const LegData &data, const QuantLib::ext::shared_ptr< InflationIndex > &index, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1766
Leg makeCMSSpreadLeg(const LegData &data, const QuantLib::ext::shared_ptr< QuantLib::SwapSpreadIndex > &swapSpreadIndex, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:2187
Leg makeDigitalCMSSpreadLeg(const LegData &data, const QuantLib::ext::shared_ptr< QuantLib::SwapSpreadIndex > &swapSpreadIndex, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:2260
Leg makeCPILeg(const LegData &data, const QuantLib::ext::shared_ptr< ZeroInflationIndex > &index, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1616
Leg makeCMSLeg(const LegData &data, const QuantLib::ext::shared_ptr< QuantLib::SwapIndex > &swapIndex, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1919
Leg makeEquityLeg(const LegData &data, const QuantLib::ext::shared_ptr< EquityIndex2 > &equityCurve, const QuantLib::ext::shared_ptr< QuantExt::FxIndex > &fxIndex, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:2352
Leg makeZCFixedLeg(const LegData &data, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1049
Leg makeIborLeg(const LegData &data, const QuantLib::ext::shared_ptr< IborIndex > &index, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1102
Leg makeFixedLeg(const LegData &data, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:950
QuantLib::ext::shared_ptr< QuantExt::FxIndex > buildFxIndex(const string &fxIndex, const string &domestic, const string &foreign, const QuantLib::ext::shared_ptr< Market > &market, const string &configuration, bool useXbsCurves)
Definition: marketdata.cpp:137
Serializable Credit Default Swap.
Definition: namespaces.docs:23
Reference data model and serialization.