Skip to content

Commit e05af19

Browse files
pcaspersjenkins
authored andcommitted
Merge remote-tracking branch 'origin/1.0.74' into 74_into_master
1 parent 016dafe commit e05af19

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

OREData/ored/portfolio/trade.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,14 @@ void Trade::setLegBasedAdditionalData(const Size i, Size resultLegId) const {
257257
}
258258
}
259259
additionalData_["initialQuantity[" + legID + "]"] = quantity;
260-
261-
Real currentPrice = eqc->equityCurve()->fixing(asof);
262-
if (currentPrice != Null<Real>() && originalNotional != Null<Real>())
260+
261+
Real currentPrice = Null<Real>();
262+
if (eqc->equityCurve()->isValidFixingDate(asof)) {
263+
currentPrice = eqc->equityCurve()->equitySpot()->value();
264+
}
265+
if (currentPrice != Null<Real>() && originalNotional != Null<Real>()) {
263266
additionalData_["currentQuantity" + legID + "]"] = originalNotional / currentPrice;
267+
}
264268
}
265269
}
266270
}

0 commit comments

Comments
 (0)