|
20 | 20 | #include <orea/simm/crifloader.hpp> |
21 | 21 | #include <orea/simm/simmcalculator.hpp> |
22 | 22 | #include <orea/simm/utilities.hpp> |
| 23 | +#include <orea/simm/simmconfigurationbase.hpp> |
23 | 24 |
|
24 | 25 | #include <boost/math/distributions/normal.hpp> |
25 | 26 | #include <numeric> |
@@ -887,9 +888,9 @@ pair<map<string, Real>, bool> SimmCalculator::irCurvatureMargin(const NettingSet |
887 | 888 | } |
888 | 889 |
|
889 | 890 | // Now deal with inflation component |
890 | | - SimmVersion version = parseSimmVersion(simmConfiguration_->version()); |
| 891 | + const string simmVersion = simmConfiguration_->version(); |
891 | 892 | SimmVersion thresholdVersion = SimmVersion::V1_0; |
892 | | - if (version > thresholdVersion) { |
| 893 | + if (simmConfiguration_->isSimmConfigCalibration() || parseSimmVersion(simmVersion) > thresholdVersion) { |
893 | 894 | // Weighted sensitivity i.e. $WS_{k,i}$ from SIMM docs |
894 | 895 | Real infWs = 0.0; |
895 | 896 | for (auto infIt = pInfQualifier.first; infIt != pInfQualifier.second; ++infIt) { |
@@ -1206,9 +1207,10 @@ SimmCalculator::curvatureMargin(const NettingSetDetails& nettingSetDetails, cons |
1206 | 1207 | // example you use sfOuter * (itOuter->amountResultCcy * multiplier) * sigmaOuter; |
1207 | 1208 | Real wsOuter = sfOuter * ((itOuter->amountResultCcy * multiplier) * sigmaOuter); |
1208 | 1209 | // for ISDA SIMM 2.2 or higher, this $CVR_{ik}$ for EQ bucket 12 is zero |
1209 | | - SimmVersion version = parseSimmVersion(simmConfiguration_->version()); |
| 1210 | + const string simmVersion = simmConfiguration_->version(); |
1210 | 1211 | SimmVersion thresholdVersion = SimmVersion::V2_2; |
1211 | | - if (version >= thresholdVersion && bucket == "12" && rt == RiskType::EquityVol) { |
| 1212 | + if ((simmConfiguration_->isSimmConfigCalibration() || parseSimmVersion(simmVersion) >= thresholdVersion) && |
| 1213 | + bucket == "12" && rt == RiskType::EquityVol) { |
1212 | 1214 | wsOuter = 0.0; |
1213 | 1215 | } |
1214 | 1216 | // Update weighted sensitivity sum |
|
0 commit comments