38 auto it = leg.begin();
39 while (it != leg.end()) {
40 auto cf = QuantLib::ext::dynamic_pointer_cast<QuantExt::BondTRSCashFlow>(*it);
42 if (cf->fixingEndDate() < issueDate) {
45 }
else if (cf->fixingStartDate() < issueDate)
46 cf->setFixingStartDate(issueDate);
52Leg
makeBondTRSLeg(
const std::vector<Date>& valuationDates,
const std::vector<Date>& paymentDates,
54 QuantLib::ext::shared_ptr<QuantExt::FxIndex> fxIndex) {
64 boost::shared_lock<boost::shared_mutex> lock(
mutex_);
66 QL_REQUIRE(b !=
builders_.end(),
"TrsUnderlyingBuilderFactory::getBuilder(" << tradeType <<
"): no builder found");
71 const QuantLib::ext::shared_ptr<TrsUnderlyingBuilder>& builder,
72 const bool allowOverwrite) {
73 boost::unique_lock<boost::shared_mutex> locK(
mutex_);
74 QL_REQUIRE(
builders_.insert(std::make_pair(tradeType, builder)).second || allowOverwrite,
75 "TrsUnderlyingBuidlerFactory::addBuilder(" << tradeType <<
"): builder for key already exists.");
79 const std::string& parentId,
const QuantLib::ext::shared_ptr<Trade>& underlying,
const std::vector<Date>& valuationDates,
80 const std::vector<Date>& paymentDates,
const std::string& fundingCurrency,
81 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory, QuantLib::ext::shared_ptr<QuantLib::Index>& underlyingIndex,
82 Real& underlyingMultiplier, std::map<std::string, double>& indexQuantities,
83 std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices, Real& initialPrice,
84 std::string& assetCurrency, std::string& creditRiskCurrency,
85 std::map<std::string, SimmCreditQualifierMapping>& creditQualifierMapping, Date&
maturity,
86 const std::function<QuantLib::ext::shared_ptr<QuantExt::FxIndex>(
87 const QuantLib::ext::shared_ptr<Market> market,
const std::string& configuration,
const std::string& domestic,
88 const std::string& foreign, std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices)>&
90 const std::string& underlyingDerivativeId,
RequiredFixings& fixings, std::vector<Leg>& returnLegs)
const {
91 auto t = QuantLib::ext::dynamic_pointer_cast<ore::data::Bond>(underlying);
92 QL_REQUIRE(t,
"could not cast to ore::data::Bond, this is unexpected");
93 auto qlBond = QuantLib::ext::dynamic_pointer_cast<QuantLib::Bond>(underlying->instrument()->qlInstrument());
94 QL_REQUIRE(qlBond,
"expected QuantLib::Bond, could not cast");
95 BondIndexBuilder bondIndexBuilder(*t,
true,
false, NullCalendar(),
true, engineFactory);
96 underlyingIndex = bondIndexBuilder.
bondIndex();
98 underlyingMultiplier = t->bondData().bondNotional();
99 indexQuantities[underlyingIndex->name()] = underlyingMultiplier;
101 if (initialPrice != Null<Real>())
102 initialPrice = qlBond->notional(valuationDates.front()) * bondIndexBuilder.
priceAdjustment(initialPrice);
104 assetCurrency = t->bondData().currency();
106 auto fxIndex = getFxIndex(engineFactory->market(), engineFactory->configuration(
MarketContext::pricing), assetCurrency,
107 fundingCurrency, fxIndices);
114 returnLegs.push_back(leg);
117 if (!t->bondData().creditCurveId().empty())
118 creditRiskCurrency = t->bondData().currency();
121 creditQualifierMapping[t->bondData().creditCurveId()] =
128 const std::string& parentId,
const QuantLib::ext::shared_ptr<Trade>& underlying,
const std::vector<Date>& valuationDates,
129 const std::vector<Date>& paymentDates,
const std::string& fundingCurrency,
130 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory, QuantLib::ext::shared_ptr<QuantLib::Index>& underlyingIndex,
131 Real& underlyingMultiplier, std::map<std::string, double>& indexQuantities,
132 std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices, Real& initialPrice,
133 std::string& assetCurrency, std::string& creditRiskCurrency,
134 std::map<std::string, SimmCreditQualifierMapping>& creditQualifierMapping, Date&
maturity,
135 const std::function<QuantLib::ext::shared_ptr<QuantExt::FxIndex>(
136 const QuantLib::ext::shared_ptr<Market> market,
const std::string& configuration,
const std::string& domestic,
137 const std::string& foreign, std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices)>&
139 const std::string& underlyingDerivativeId,
RequiredFixings& fixings, std::vector<Leg>& returnLegs)
const {
140 auto t = QuantLib::ext::dynamic_pointer_cast<ore::data::ForwardBond>(underlying);
141 QL_REQUIRE(t,
"could not cast to ore::data::ForwardBond, this is unexpected");
142 auto qlBond = QuantLib::ext::dynamic_pointer_cast<QuantExt::ForwardBond>(underlying->instrument()->qlInstrument());
143 QL_REQUIRE(qlBond,
"expected QuantExt::ForwardBond, could not cast");
144 auto futuresIndex = QuantLib::ext::make_shared<QuantExt::BondFuturesIndex>(
145 parseDate(t->fwdMaturityDate()), t->bondData().securityId(),
true,
false, NullCalendar(), qlBond->underlying());
146 underlyingIndex = futuresIndex;
147 underlyingMultiplier = t->bondData().bondNotional();
149 std::ostringstream o;
150 o <<
"BOND-" + t->bondData().securityId() <<
"-" << QuantLib::io::iso_date(
parseDate(t->fwdMaturityDate()));
151 std::string
name = o.str();
153 indexQuantities[
name] = underlyingMultiplier;
155 Real adj = t->bondData().priceQuoteMethod() == QuantExt::BondIndex::PriceQuoteMethod::CurrencyPerUnit
156 ? 1.0 / t->bondData().priceQuoteBaseValue()
158 if (initialPrice != Null<Real>())
159 initialPrice = initialPrice * qlBond->underlying()->notional(valuationDates.front()) * adj;
160 assetCurrency = t->bondData().currency();
163 assetCurrency, fundingCurrency, fxIndices);
165 returnLegs.push_back(
QuantExt::BondTRSLeg(valuationDates, paymentDates, underlyingMultiplier, futuresIndex, fxIndex)
166 .withInitialPrice(initialPrice));
168 if (!t->bondData().creditCurveId().empty())
169 creditRiskCurrency = t->bondData().currency();
172 creditQualifierMapping[t->bondData().creditCurveId()] =
178 const std::string& parentId,
const QuantLib::ext::shared_ptr<Trade>& underlying,
const std::vector<Date>& valuationDates,
179 const std::vector<Date>& paymentDates,
const std::string& fundingCurrency,
180 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory, QuantLib::ext::shared_ptr<QuantLib::Index>& underlyingIndex,
181 Real& underlyingMultiplier, std::map<std::string, double>& indexQuantities,
182 std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices, Real& initialPrice,
183 std::string& assetCurrency, std::string& creditRiskCurrency,
184 std::map<std::string, SimmCreditQualifierMapping>& creditQualifierMapping, Date&
maturity,
185 const std::function<QuantLib::ext::shared_ptr<QuantExt::FxIndex>(
186 const QuantLib::ext::shared_ptr<Market> market,
const std::string& configuration,
const std::string& domestic,
187 const std::string& foreign, std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices)>&
189 const std::string& underlyingDerivativeId,
RequiredFixings& fixings, std::vector<Leg>& returnLegs)
const {
190 auto t = QuantLib::ext::dynamic_pointer_cast<T>(underlying);
191 QL_REQUIRE(t,
"could not cast to ore::data::EquityPosition, this is unexpected");
192 if (t->isSingleCurrency()) {
193 assetCurrency = t->npvCurrency();
194 DLOG(
"underlying equity position is single-currency, assetCurrency is " << assetCurrency);
199 t->setNpvCurrencyConversion(
200 assetCurrency, engineFactory->market()->fxSpot(t->npvCurrency() + assetCurrency,
202 DLOG(
"underlying equity position is multi-currency, set assetCurrency to fundingCurrency = " << assetCurrency);
204 std::vector<QuantLib::ext::shared_ptr<QuantExt::FxIndex>> fxConversion(t->data().underlyings().size());
205 std::vector<QuantLib::ext::shared_ptr<QuantLib::Index>> indices;
206 for (
auto const& i : t->indices()) {
207 indices.push_back(i);
208 DLOG(
"underlying equity index " << i->name() <<
" added.");
210 for (Size i = 0; i < t->data().underlyings().
size(); ++i) {
211 fxConversion[i] = getFxIndex(engineFactory->market(), engineFactory->configuration(
MarketContext::pricing),
212 assetCurrency, getIndexCurrencyFromPosition(t, i), fxIndices);
213 updateQuantities(indexQuantities, t->data().underlyings()[i].name(),
214 t->weights()[i] * t->data().quantity());
216 underlyingIndex = QuantLib::ext::make_shared<QuantExt::CompositeIndex>(
"Composite Index trade id " + parentId, indices,
217 t->weights(), fxConversion);
218 DLOG(
"underlying equity index built with " << indices.size() <<
" constituents.");
219 underlyingMultiplier = t->data().quantity();
222 assetCurrency, fundingCurrency, fxIndices);
223 returnLegs.push_back(
224 QuantExt::TRSLeg(valuationDates, paymentDates, underlyingMultiplier, underlyingIndex, fxIndex)
225 .withInitialPrice(initialPrice));
230 QuantLib::ext::shared_ptr<EquityPosition> position,
size_t i)
const {
231 return position->indices()[i]->currency().code();
236 QuantLib::ext::shared_ptr<CommodityPosition> position,
size_t i)
const {
237 return position->indices()[i]->priceCurve()->currency().code();
242 QuantLib::ext::shared_ptr<T> position,
size_t i)
const {
243 QL_FAIL(
"internal error AssetPositionTrsUnderlyingBuilder only support Equity and Commodity positions");
248 indexQuantities[
"EQ-" + indexName] = qty;
253 std::map<std::string, double>& indexQuantities,
const std::string& indexName,
const double qty)
const {
254 indexQuantities[
"COMM-" + indexName] = qty;
259 const std::string& indexName,
const double qty)
const {
260 QL_FAIL(
"internal error AssetPositionTrsUnderlyingBuilder only support Equity and Commodity positions");
264 const std::string& parentId,
const QuantLib::ext::shared_ptr<Trade>& underlying,
const std::vector<Date>& valuationDates,
265 const std::vector<Date>& paymentDates,
const std::string& fundingCurrency,
266 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory, QuantLib::ext::shared_ptr<QuantLib::Index>& underlyingIndex,
267 Real& underlyingMultiplier, std::map<std::string, double>& indexQuantities,
268 std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices, Real& initialPrice,
269 std::string& assetCurrency, std::string& creditRiskCurrency,
270 std::map<std::string, SimmCreditQualifierMapping>& creditQualifierMapping, Date&
maturity,
271 const std::function<QuantLib::ext::shared_ptr<QuantExt::FxIndex>(
272 const QuantLib::ext::shared_ptr<Market> market,
const std::string& configuration,
const std::string& domestic,
273 const std::string& foreign, std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices)>&
275 const std::string& underlyingDerivativeId,
RequiredFixings& fixings, std::vector<Leg>& returnLegs)
const {
276 auto t = QuantLib::ext::dynamic_pointer_cast<ore::data::EquityOptionPosition>(underlying);
277 QL_REQUIRE(t,
"could not cast to ore::data::EquityOptionPosition, this is unexpected");
278 if (t->isSingleCurrency()) {
279 assetCurrency = t->npvCurrency();
280 DLOG(
"underlying equity option position is single-currency, assetCurrency is " << assetCurrency);
285 t->setNpvCurrencyConversion(
286 assetCurrency, engineFactory->market()->fxSpot(t->npvCurrency() + assetCurrency,
288 DLOG(
"underlying equity option position is multi-currency, set assetCurrency to fundingCurrency = "
291 std::vector<QuantLib::ext::shared_ptr<QuantExt::FxIndex>> fxConversion(t->data().underlyings().size());
292 std::vector<QuantLib::ext::shared_ptr<QuantLib::Index>> indices;
293 for (
auto const& i : t->historicalPriceIndices()) {
294 indices.push_back(i);
295 DLOG(
"underlying historical equity option price index " << i->name() <<
" added.");
297 QL_REQUIRE(indices.size() == t->data().underlyings().size(),
298 "underlying historical price indices size (" << indices.size() <<
") must match underlyings size ("
299 << t->data().underlyings().size());
300 for (Size i = 0; i < t->data().underlyings().
size(); ++i) {
301 fxConversion[i] = getFxIndex(engineFactory->market(), engineFactory->configuration(
MarketContext::pricing),
302 assetCurrency, t->currencies()[i], fxIndices);
303 indexQuantities[indices[i]->name()] = t->weights()[i] * t->positions()[i];
306 for (Size i = 0; i < t->weights().
size(); ++i) {
307 w.push_back(t->weights()[i] * t->positions()[i]);
310 QuantLib::ext::make_shared<QuantExt::CompositeIndex>(
"Composite Index trade id " + parentId, indices, w, fxConversion);
311 DLOG(
"underlying equity option historical price index built with " << indices.size() <<
" constituents.");
312 underlyingMultiplier = t->data().quantity();
315 assetCurrency, fundingCurrency, fxIndices);
317 returnLegs.push_back(
QuantExt::TRSLeg(valuationDates, paymentDates, underlyingMultiplier, underlyingIndex, fxIndex)
318 .withInitialPrice(initialPrice));
322 const std::string& parentId,
const QuantLib::ext::shared_ptr<Trade>& underlying,
const std::vector<Date>& valuationDates,
323 const std::vector<Date>& paymentDates,
const std::string& fundingCurrency,
324 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory, QuantLib::ext::shared_ptr<QuantLib::Index>& underlyingIndex,
325 Real& underlyingMultiplier, std::map<std::string, double>& indexQuantities,
326 std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices, Real& initialPrice,
327 std::string& assetCurrency, std::string& creditRiskCurrency,
328 std::map<std::string, SimmCreditQualifierMapping>& creditQualifierMapping, Date&
maturity,
329 const std::function<QuantLib::ext::shared_ptr<QuantExt::FxIndex>(
330 const QuantLib::ext::shared_ptr<Market> market,
const std::string& configuration,
const std::string& domestic,
331 const std::string& foreign, std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices)>&
333 const std::string& underlyingDerivativeId,
RequiredFixings& fixings, std::vector<Leg>& returnLegs)
const {
334 auto t = QuantLib::ext::dynamic_pointer_cast<ore::data::BondPosition>(underlying);
335 QL_REQUIRE(t,
"could not cast to ore::data::BondPosition, this is unexpected");
336 if (t->isSingleCurrency()) {
337 assetCurrency = t->npvCurrency();
338 DLOG(
"underlying bond position is single-currency, assetCurrency is " << assetCurrency);
341 t->setNpvCurrencyConversion(
342 assetCurrency, engineFactory->market()->fxSpot(t->npvCurrency() + assetCurrency,
344 DLOG(
"underlying bond position is multi-currency, set assetCurrency to fundingCurrency = " << assetCurrency);
347 std::vector<QuantLib::ext::shared_ptr<QuantExt::FxIndex>> fxConversion(t->data().underlyings().size());
348 std::vector<QuantLib::ext::shared_ptr<QuantLib::Index>> indices;
349 bool hasCreditRisk =
false;
350 for (Size i = 0; i < t->bonds().
size(); ++i) {
353 BondIndexBuilder bondIndexBuilder(t->data().underlyings()[i].name(),
true,
false,
354 NullCalendar(),
true, engineFactory, t->data().underlyings()[i].bidAskAdjustment(),
true);
358 assetCurr, fundingCurrency, fxIndices);
360 Leg bondLeg =
makeBondTRSLeg(valuationDates, paymentDates, bondIndexBuilder, Null<Real>(), fxIndex);
361 returnLegs.push_back(bondLeg);
366 indices.push_back(bondIndexBuilder.
bondIndex());
367 DLOG(
"underlying bond index " << indices.back()->name() <<
" added.");
368 indexQuantities[bondIndexBuilder.
bondIndex()->name()] = t->weights()[i] * t->data().quantity();
370 t->bonds()[i].creditCurveId)] =
372 creditQualifierMapping[t->bonds()[i].creditCurveId] =
374 hasCreditRisk = hasCreditRisk || t->bonds()[i].hasCreditRisk;
376 for (Size i = 0; i < t->data().underlyings().
size(); ++i) {
377 fxConversion[i] = getFxIndex(engineFactory->market(), engineFactory->configuration(
MarketContext::pricing),
378 assetCurrency, t->bonds()[i].currency, fxIndices);
381 for (Size i = 0; i < t->weights().
size(); ++i) {
382 w.push_back(t->weights()[i]);
385 QuantLib::ext::make_shared<QuantExt::CompositeIndex>(
"Composite Index trade id " + parentId, indices, w, fxConversion);
386 DLOG(
"underlying bond position index built with " << indices.size() <<
" constituents.");
387 underlyingMultiplier = t->data().quantity();
390 creditRiskCurrency = assetCurrency;
397 const std::string& parentId,
const QuantLib::ext::shared_ptr<Trade>& underlying,
const std::vector<Date>& valuationDates,
398 const std::vector<Date>& paymentDates,
const std::string& fundingCurrency,
399 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory, QuantLib::ext::shared_ptr<QuantLib::Index>& underlyingIndex,
400 Real& underlyingMultiplier, std::map<std::string, double>& indexQuantities,
401 std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices, Real& initialPrice,
402 std::string& assetCurrency, std::string& creditRiskCurrency,
403 std::map<std::string, SimmCreditQualifierMapping>& creditQualifierMapping, Date&
maturity,
404 const std::function<QuantLib::ext::shared_ptr<QuantExt::FxIndex>(
405 const QuantLib::ext::shared_ptr<Market> market,
const std::string& configuration,
const std::string& domestic,
406 const std::string& foreign, std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndices)>&
408 const std::string& underlyingDerivativeId,
RequiredFixings& fixings, std::vector<Leg>& returnLegs)
const {
409 assetCurrency = underlying->npvCurrency();
410 auto indexName =
"GENERIC-" + underlyingDerivativeId;
411 IndexNameTranslator::instance().add(indexName, indexName);
412 underlyingIndex = QuantLib::ext::make_shared<QuantExt::GenericIndex>(indexName);
413 indexQuantities[indexName] = 1.0;
414 underlyingMultiplier = 1.0;
420 assetCurrency, fundingCurrency, fxIndices);
421 returnLegs.push_back(
QuantExt::TRSLeg(valuationDates, paymentDates, underlyingMultiplier, underlyingIndex, fxIndex)
422 .withInitialPrice(initialPrice));
Bond trade data model and serialization.
Bond Position trade data model and serialization.
BondTRSLeg & withInitialPrice(Real)
const string & currency() const
const string & issueDate() const
Real bondNotional() const
const BondData & bondData() const
inspectors
QuantLib::Real priceAdjustment(QuantLib::Real price)
QuantLib::ext::shared_ptr< QuantExt::BondIndex > bondIndex() const
const Bond & bond() const
void addRequiredFixings(RequiredFixings &requiredFixings, Leg leg={})
map< std::string, QuantLib::ext::shared_ptr< TrsUnderlyingBuilder > > builders_
void addBuilder(const std::string &tradeType, const QuantLib::ext::shared_ptr< TrsUnderlyingBuilder > &builder, const bool allowOverwrite=false)
boost::shared_mutex mutex_
QuantLib::ext::shared_ptr< TrsUnderlyingBuilder > getBuilder(const std::string &tradeType) const
Equity Option Position trade data model and serialization.
Equity Position trade data model and serialization.
Date parseDate(const string &s)
Convert std::string to QuantLib::Date.
translates between QuantLib::Index::name() and ORE names
#define DLOG(text)
Logging Macro (Level = Debug)
market data related utilties
Size size(const ValueType &v)
void modifyBondTRSLeg(QuantLib::Leg &leg, QuantLib::Date issueDate)
std::string securitySpecificCreditCurveName(const std::string &securityId, const std::string &creditCurveId)
Leg makeBondTRSLeg(const std::vector< Date > &valuationDates, const std::vector< Date > &paymentDates, const BondIndexBuilder &bondIndexBuilder, Real initialPrice, QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndex)
Serializable Credit Default Swap.
Map text representations to QuantLib/QuantExt types.
void updateQuantities(std::map< std::string, double > &indexQuantities, const std::string &indexName, const double qty) const
void build(const std::string &parentId, const QuantLib::ext::shared_ptr< Trade > &underlying, const std::vector< Date > &valuationDates, const std::vector< Date > &paymentDates, const std::string &fundingCurrency, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::ext::shared_ptr< QuantLib::Index > &underlyingIndex, Real &underlyingMultiplier, std::map< std::string, double > &indexQuantities, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices, Real &initialPrice, std::string &assetCurrency, std::string &creditRiskCurrency, std::map< std::string, SimmCreditQualifierMapping > &creditQualifierMapping, Date &maturity, const std::function< QuantLib::ext::shared_ptr< QuantExt::FxIndex >(const QuantLib::ext::shared_ptr< Market > market, const std::string &configuration, const std::string &domestic, const std::string &foreign, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices)> &getFxIndex, const std::string &underlyingDerivativeId, RequiredFixings &fixings, std::vector< Leg > &returnLegs) const override
std::string getIndexCurrencyFromPosition(QuantLib::ext::shared_ptr< T > position, size_t i) const
void build(const std::string &parentId, const QuantLib::ext::shared_ptr< Trade > &underlying, const std::vector< Date > &valuationDates, const std::vector< Date > &paymentDates, const std::string &fundingCurrency, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::ext::shared_ptr< QuantLib::Index > &underlyingIndex, Real &underlyingMultiplier, std::map< std::string, double > &indexQuantities, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices, Real &initialPrice, std::string &assetCurrency, std::string &creditRiskCurrency, std::map< std::string, SimmCreditQualifierMapping > &creditQualifierMapping, Date &maturity, const std::function< QuantLib::ext::shared_ptr< QuantExt::FxIndex >(const QuantLib::ext::shared_ptr< Market > market, const std::string &configuration, const std::string &domestic, const std::string &foreign, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices)> &getFxIndex, const std::string &underlyingDerivativeId, RequiredFixings &fixings, std::vector< Leg > &returnLegs) const override
void build(const std::string &parentId, const QuantLib::ext::shared_ptr< Trade > &underlying, const std::vector< Date > &valuationDates, const std::vector< Date > &paymentDates, const std::string &fundingCurrency, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::ext::shared_ptr< QuantLib::Index > &underlyingIndex, Real &underlyingMultiplier, std::map< std::string, double > &indexQuantities, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices, Real &initialPrice, std::string &assetCurrency, std::string &creditRiskCurrency, std::map< std::string, SimmCreditQualifierMapping > &creditQualifierMapping, Date &maturity, const std::function< QuantLib::ext::shared_ptr< QuantExt::FxIndex >(const QuantLib::ext::shared_ptr< Market > market, const std::string &configuration, const std::string &domestic, const std::string &foreign, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices)> &getFxIndex, const std::string &underlyingDerivativeId, RequiredFixings &fixings, std::vector< Leg > &returnLegs) const override
void build(const std::string &parentId, const QuantLib::ext::shared_ptr< Trade > &underlying, const std::vector< Date > &valuationDates, const std::vector< Date > &paymentDates, const std::string &fundingCurrency, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::ext::shared_ptr< QuantLib::Index > &underlyingIndex, Real &underlyingMultiplier, std::map< std::string, double > &indexQuantities, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices, Real &initialPrice, std::string &assetCurrency, std::string &creditRiskCurrency, std::map< std::string, SimmCreditQualifierMapping > &creditQualifierMapping, Date &maturity, const std::function< QuantLib::ext::shared_ptr< QuantExt::FxIndex >(const QuantLib::ext::shared_ptr< Market > market, const std::string &configuration, const std::string &domestic, const std::string &foreign, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices)> &getFxIndex, const std::string &underlyingDerivativeId, RequiredFixings &fixings, std::vector< Leg > &returnLegs) const override
void build(const std::string &parentId, const QuantLib::ext::shared_ptr< Trade > &underlying, const std::vector< Date > &valuationDates, const std::vector< Date > &paymentDates, const std::string &fundingCurrency, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::ext::shared_ptr< QuantLib::Index > &underlyingIndex, Real &underlyingMultiplier, std::map< std::string, double > &indexQuantities, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices, Real &initialPrice, std::string &assetCurrency, std::string &creditRiskCurrency, std::map< std::string, SimmCreditQualifierMapping > &creditQualifierMapping, Date &maturity, const std::function< QuantLib::ext::shared_ptr< QuantExt::FxIndex >(const QuantLib::ext::shared_ptr< Market > market, const std::string &configuration, const std::string &domestic, const std::string &foreign, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices)> &getFxIndex, const std::string &underlyingDerivativeId, RequiredFixings &fixings, std::vector< Leg > &returnLegs) const override
void build(const std::string &parentId, const QuantLib::ext::shared_ptr< Trade > &underlying, const std::vector< Date > &valuationDates, const std::vector< Date > &paymentDates, const std::string &fundingCurrency, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::ext::shared_ptr< QuantLib::Index > &underlyingIndex, Real &underlyingMultiplier, std::map< std::string, double > &indexQuantities, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices, Real &initialPrice, std::string &assetCurrency, std::string &creditRiskCurrency, std::map< std::string, SimmCreditQualifierMapping > &creditQualifierMapping, Date &maturity, const std::function< QuantLib::ext::shared_ptr< QuantExt::FxIndex >(const QuantLib::ext::shared_ptr< Market > market, const std::string &configuration, const std::string &domestic, const std::string &foreign, std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > &fxIndices)> &getFxIndex, const std::string &underlyingDerivativeId, RequiredFixings &fixings, std::vector< Leg > &returnLegs) const override