File tree Expand file tree Collapse file tree
OREData/ored/configuration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,8 +235,15 @@ const vector<string>& YieldCurveConfig::quotes() {
235235 // Check if the segment is a CrossCcyYieldCurveSegment and add the FX spot rate to the
236236 // set of quotes needed for the YieldCurveConfig if it has not already been added.
237237 if (auto xccySegment = QuantLib::ext::dynamic_pointer_cast<CrossCcyYieldCurveSegment>(c)) {
238- if (!addedFxSpot)
238+ if (!addedFxSpot) {
239239 quotes_.push_back (xccySegment->spotRateID ());
240+ // we add the inverted pair as well, because the original pair might get removed from the market
241+ // data loader if both are present in the input market data
242+ if (auto md = boost::dynamic_pointer_cast<FXSpotQuote>(
243+ parseMarketDatum (Date (), xccySegment->spotRateID (), 1.0 ))) {
244+ quotes_.push_back (" FX/RATE/" + md->ccy () + " /" + md->unitCcy ());
245+ }
246+ }
240247 }
241248 }
242249 }
You can’t perform that action at this time.
0 commit comments