diff --git a/OREAnalytics/orea/aggregation/postprocess.cpp b/OREAnalytics/orea/aggregation/postprocess.cpp index 3e47b45f9a..433f76d3ca 100644 --- a/OREAnalytics/orea/aggregation/postprocess.cpp +++ b/OREAnalytics/orea/aggregation/postprocess.cpp @@ -748,8 +748,6 @@ void PostProcess::updateStandAloneXVA() { nettingSetFBA_[nettingSetId] = 0.0; nettingSetFCA_[nettingSetId] = 0.0; nettingSetMVA_[nettingSetId] = 0.0; - nettingSetKVACCR_[nettingSetId] = 0.0; - for (Size j = 0; j < dates; ++j) { Date d0 = j == 0 ? today : cube_->dates()[j - 1]; Date d1 = cube_->dates()[j]; @@ -785,7 +783,6 @@ void PostProcess::updateStandAloneXVA() { Real kvaCCRIncrement = kvaRC * kvaCapitalDiscount * ActualActual().yearFraction(d0, d1); nettingSetKVACCR_[nettingSetId] += kvaCCRIncrement; - // FIXME: Subtract the spread received on posted IM in MVA calculation if (applyMVA) { Real mvaIncrement = cvaS0 * dvaS0 * borrowingSpreadDcf * edim[j]; @@ -1205,12 +1202,6 @@ Real PostProcess::nettingSetFCA(const string& nettingSetId) { } -Real PostProcess::nettingSetKVACCR(const string& nettingSetId) { - QL_REQUIRE(nettingSetKVACCR_.find(nettingSetId) != nettingSetKVACCR_.end(), - "NettingSetId " << nettingSetId << " not found in nettingSet KVACCR map"); - return nettingSetKVACCR_[nettingSetId]; -} - Real PostProcess::allocatedTradeCVA(const string& allocatedTradeId) { QL_REQUIRE(allocatedTradeCVA_.find(allocatedTradeId) != allocatedTradeCVA_.end(), "AllocatedTradeId " << allocatedTradeId << " not found in allocatedTrade CVA map"); diff --git a/OREAnalytics/orea/aggregation/postprocess.hpp b/OREAnalytics/orea/aggregation/postprocess.hpp index 5093cbe5e7..cdb88695e4 100644 --- a/OREAnalytics/orea/aggregation/postprocess.hpp +++ b/OREAnalytics/orea/aggregation/postprocess.hpp @@ -221,6 +221,14 @@ class PostProcess { Real nettingSetFBA(const string& nettingSetId); //! Return netting set FCA Real nettingSetFCA(const string& nettingSetId); + //! Return netting set FBA excluding own survival probability + Real nettingSetFBA_exOwnSP(const string& nettingSetId); + //! Return netting set FCA excluding own survival probability + Real nettingSetFCA_exOwnSP(const string& nettingSetId); + //! Return netting set FBA excluding both survival probabilities + Real nettingSetFBA_exAllSP(const string& nettingSetId); + //! Return netting set FCA excluding both survival probabilities + Real nettingSetFCA_exAllSP(const string& nettingSetId); //! Return netting set KVA Real nettingSetKVACCR(const string& nettingSetId); @@ -284,8 +292,9 @@ class PostProcess { map allocatedTradeCVA_, allocatedTradeDVA_; map nettingSetCVA_, nettingSetDVA_, nettingSetMVA_; map nettingSetCOLVA_, nettingSetCollateralFloor_; + map nettingSetFCA_, nettingSetFBA_, nettingSetFCA_exOwnSP_, nettingSetFBA_exOwnSP_, nettingSetFCA_exAllSP_, nettingSetFBA_exAllSP_; map nettingSetFCA_, nettingSetFBA_; - map effMatNumer_, effMatDenom_, nettingSetKVACCR_; + map effMatNumer_, effMatDenom_, nettingSetKVACCR_; boost::shared_ptr nettedCube_; boost::shared_ptr dimCube_; diff --git a/OREAnalytics/orea/app/oreapp.cpp b/OREAnalytics/orea/app/oreapp.cpp index ce9193b046..c472e9bbfa 100644 --- a/OREAnalytics/orea/app/oreapp.cpp +++ b/OREAnalytics/orea/app/oreapp.cpp @@ -871,6 +871,7 @@ void OREApp::runPostProcessor() { portfolio_, netting, market_, marketConfiguration, cube_, scenarioData_, analytics, baseCurrency, allocationMethod, marginalAllocationLimit, quantile, calculationType, dvaName, fvaBorrowingCurve, fvaLendingCurve, dimQuantile, dimHorizonCalendarDays, dimRegressionOrder, dimRegressors, + dimLocalRegressionEvaluations, dimLocalRegressionBandwidth, dimScaling, fullInitialCollateralisation); dimLocalRegressionEvaluations, dimLocalRegressionBandwidth, dimScaling, fullInitialCollateralisation, kvaCapitalDiscountRate, kvaAlpha, kvaRegAdjustment, kvaCapitalHurdle);