1616 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
1717*/
1818#include < orea/engine/correlationreport.hpp>
19- #include < orea/scenario/sensitivityscenariodata.hpp>
2019#include < ored/utilities/to_string.hpp>
2120#include < qle/math/deltagammavar.hpp>
2221#include < ored/utilities/correlationmatrix.hpp>
@@ -40,28 +39,14 @@ void CorrelationReport::calculate(const ext::shared_ptr<Report>& report) {
4039 // i.e., keep only those deltaKeys present in ptfRiskFactors ignoring index
4140 // populateSensiShifts iterate over the scenario and deltaKeys, if mismatch with the sensiScenarioData shift
4241 // it throws an error.
43- auto ptfRiskFactors = sensiScenarioData_->getPortfolioRiskFactors ();
44- if (ptfRiskFactors.size ()>0 ){
45- std::set<std::pair<RiskFactorKey::KeyType, std::string>> ptfKeyNameSet;
46- for (auto & k : ptfRiskFactors) {
47- ptfKeyNameSet.emplace (k.keytype , k.name );
48- }
49- std::vector<RiskFactorKey> filteredKeys;
50- filteredKeys.reserve (deltaKeys.size ());
51- for (auto & k : deltaKeys) {
52- if (ptfKeyNameSet.count (std::make_pair (k.keytype , k.name )) > 0 ) {
53- filteredKeys.push_back (k);
54- }
55- }
56- deltaKeys.swap (filteredKeys);
57- }
42+ bool supressError = true ;
5843
5944 ext::shared_ptr<NPVCube>cube;
6045 ext::shared_ptr<CovarianceCalculator> covCalculator;
6146 covCalculator = ext::make_shared<CovarianceCalculator>(covariancePeriod ());
6247
6348 sensiPnlCalculator_ = ext::make_shared<HistoricalSensiPnlCalculator>(hisScenGen_, nullptr );
64- sensiPnlCalculator_->populateSensiShifts (cube, deltaKeys, shiftCalc_);
49+ sensiPnlCalculator_->populateSensiShifts (cube, deltaKeys, shiftCalc_, supressError );
6550 sensiPnlCalculator_->calculateSensiPnl ({}, deltaKeys, cube, pnlCalculators_, covCalculator, {},
6651 false , false , false );
6752
0 commit comments