Skip to content

Commit 103df88

Browse files
pcaspersjenkins
authored andcommitted
QPR-12014 do not add the empty rf key
1 parent 3aef9a4 commit 103df88

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

OREAnalytics/orea/engine/zerotoparcube.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,11 @@ map<RiskFactorKey, Real> ZeroToParCube::parDeltas(QuantLib::Size cubeIdx, QuantL
6969

7070
std::set<RiskFactorKey> rkeys;
7171
for (auto const& kv : sensiCube->getTradeNPVs(tradeIdx)) {
72-
rkeys.insert(zeroCube->upDownFactor(kv.first));
72+
if (auto k = zeroCube->upDownFactor(kv.first); k.keytype != RiskFactorKey::KeyType::None)
73+
rkeys.insert(k);
7374
}
7475

7576
for (auto const& rk : rkeys) {
76-
if (rk.keytype == RiskFactorKey::KeyType::None)
77-
continue;
7877
auto it = factorToIndex_.find(rk);
7978
if (it == factorToIndex_.end()) {
8079
if (ParSensitivityAnalysis::isParType(rk.keytype) && typesDisabled_.count(rk.keytype) != 1) {

0 commit comments

Comments
 (0)