Skip to content

Commit c0036c3

Browse files
mgronckijenkins
authored andcommitted
QPR-12259 ignore amountCcy for simmparameter productclassmultiplier and AddOnNotionalFactor and allow it to be empty
1 parent 6d15099 commit c0036c3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

OREAnalytics/orea/simm/simmcalculator.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,12 @@ SimmCalculator::SimmCalculator(const ore::analytics::Crif& crif,
108108

109109
// Make sure we have CRIF amount denominated in the result ccy
110110
CrifRecord newCrifRecord = cr;
111-
if (resultCcy_ == "USD" && cr.hasAmountUsd()) {
111+
112+
if (cr.requiresAmountUsd() && resultCcy_ == "USD" && cr.hasAmountUsd()) {
112113
newCrifRecord.amountResultCcy = newCrifRecord.amountUsd;
113-
} else {
114+
} else if(cr.requiresAmountUsd()) {
115+
// ProductClassMultiplier and AddOnNotionalFactor don't have a currency and dont need to be converted,
116+
// we use the amount
114117
const Real fxSpot = market_->fxRate(newCrifRecord.amountCurrency + resultCcy_)->value();
115118
newCrifRecord.amountResultCcy = fxSpot * newCrifRecord.amount;
116119
}

0 commit comments

Comments
 (0)