Skip to content

Commit 2acaece

Browse files
damienbarkerjenkins
authored andcommitted
QPR-12350 incorrect scaling in backward shift
1 parent 3dca099 commit 2acaece

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OREAnalytics/orea/cube/sensitivitycube.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Real SensitivityCube::delta(const Size tradeIdx, const RiskFactorKey& riskFactor
225225
return (cube_->get(tradeIdx, fd.index) - cube_->getT0(tradeIdx, 0)) * scaling(fd);
226226
} else if (s->second == ShiftScheme::Backward) {
227227
auto fd = index(riskFactorKey, downFactors_);
228-
return cube_->getT0(tradeIdx, 0) - cube_->get(tradeIdx, fd.index) * scaling(fd);
228+
return (cube_->getT0(tradeIdx, 0) - cube_->get(tradeIdx, fd.index)) * scaling(fd);
229229
} else if (s->second == ShiftScheme::Central) {
230230
auto fdup = index(riskFactorKey, upFactors_);
231231
auto fddown = index(riskFactorKey, downFactors_);

0 commit comments

Comments
 (0)