Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
marketriskreport.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2024 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file engine/marketriskreport.hpp
20 \brief Base class for a market risk report
21 \ingroup engine
22*/
23
24#pragma once
25
32
33#include <vector>
34
35namespace ore {
36namespace analytics {
37
38using TradePnLStore = std::vector<std::vector<QuantLib::Real>>;
39
41public:
44
45 virtual std::string to_string() = 0;
46 virtual bool allLevel() const = 0;
47};
48
49std::ostream& operator<<(std::ostream& out, const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup);
50
52public:
55
56 virtual QuantLib::ext::shared_ptr<MarketRiskGroupBase> next() = 0;
57 virtual void add(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup) = 0;
58 virtual void reset() = 0;
59 virtual QuantLib::Size size() = 0;
60};
61
63public:
65 virtual ~TradeGroupBase() {}
66
67 virtual std::string to_string() = 0;
68 virtual bool allLevel() const = 0;
69};
70
71std::ostream& operator<<(std::ostream& out, const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup);
72
74public:
77
78 virtual QuantLib::ext::shared_ptr<TradeGroupBase> next() = 0;
79 virtual void add(const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup) = 0;
80 virtual void reset() = 0;
81};
82
84public:
88
91
92 std::string to_string() override;
93 bool allLevel() const override;
94
95private:
98};
99
101public:
103
104 //! Used to order pairs [Risk class, Risk Type]
105 struct CompRisk {
106 static std::map<MarketRiskConfiguration::RiskClass, QuantLib::Size> rcOrder;
107 static std::map<MarketRiskConfiguration::RiskType, QuantLib::Size> rtOrder;
108
109 bool operator()(const QuantLib::ext::shared_ptr<MarketRiskGroup>& lhs,
110 const QuantLib::ext::shared_ptr<MarketRiskGroup>& rhs) const;
111 };
112
113 QuantLib::ext::shared_ptr<MarketRiskGroupBase> next() override;
114 void add(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup) override;
115 void reset() override;
116 QuantLib::Size size() override;
117
118private:
119 /*! Set of pairs [Risk Class, Risk Type] that will need to be covered by backtest
120 Each pair in the set defines a particular filter of the risk factors in the backtest
121 */
122 std::set<QuantLib::ext::shared_ptr<MarketRiskGroup>, CompRisk> riskGroups_;
123 std::set<QuantLib::ext::shared_ptr<MarketRiskGroup>>::const_iterator rgIdx_;
124};
125
127public:
130
131 const std::string& portfolioId() const { return portfolioId_; };
132
133 std::string to_string() override { return portfolioId_; };
134 bool allLevel() const override { return true; };
135
136private:
137 std::string portfolioId_;
138};
139
141public:
143
144 QuantLib::ext::shared_ptr<TradeGroupBase> next() override;
145 void add(const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup) override;
146 void reset() override;
147
148private:
149 std::set<QuantLib::ext::shared_ptr<TradeGroup>> tradeGroups_;
150 std::set<QuantLib::ext::shared_ptr<TradeGroup>>::const_iterator tgIdx_;
151};
152
154public:
156 //! Stream of sensitivity records used for the sensitivity based backtest
157 QuantLib::ext::shared_ptr<SensitivityStream> sensitivityStream_;
158 //! Calculates the shift multiple in moving from one scenario to another
159 QuantLib::ext::shared_ptr<ScenarioShiftCalculator> shiftCalculator_;
160 //! Amount by which absolute P&L value must exceed 0 to be written to P&L contribution report
161 QuantLib::Real pnlWriteThreshold_;
162 //! Optional input of covariance matrix
163 std::map<std::pair<RiskFactorKey, RiskFactorKey>, Real> covarianceInput_;
164
165 SensiRunArgs(const QuantLib::ext::shared_ptr<SensitivityStream>& ss,
166 const QuantLib::ext::shared_ptr<ScenarioShiftCalculator>& sc,
167 QuantLib::Real pnlThres = 0.01,
168 std::map<std::pair<RiskFactorKey, RiskFactorKey>, Real> ci = {})
170 covarianceInput_(ci) {}
171 };
172
174 QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarket> simMarket_;
175 QuantLib::ext::shared_ptr<ore::data::EngineData> engineData_;
176 QuantLib::ext::shared_ptr<ore::data::ReferenceDataManager> referenceData_;
178 bool dryRun_ = false;
179 //! True to enable cube writing
180 bool writeCube_ = false;
181 //! If cube writing is enabled, cube(s) will be written to this directory
182 std::string cubeDir_;
183 /*! If cube writing is enabled, cube(s) will be written to this file with the
184 FILTER pattern replaced by a description of the scenario filter
185 */
186 std::string cubeFilename_;
187
188 FullRevalArgs(const QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarket>& sm,
189 const QuantLib::ext::shared_ptr<ore::data::EngineData>& ed,
190 const QuantLib::ext::shared_ptr<ore::data::ReferenceDataManager>& rd = nullptr,
192 const bool dr = false)
194 };
195
197 QuantLib::Size nThreads_;
198 QuantLib::Date today_;
199 QuantLib::ext::shared_ptr<ore::data::Loader> loader_;
200 QuantLib::ext::shared_ptr<ore::data::CurveConfigurations> curveConfigs_;
201 QuantLib::ext::shared_ptr<ore::data::TodaysMarketParameters> todaysMarketParams_;
202 std::string configuration_;
203 QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarketParameters> simMarketData_;
204 std::string context_;
205
206 MultiThreadArgs(QuantLib::Size n, QuantLib::Date t, const QuantLib::ext::shared_ptr<ore::data::Loader>& l,
207 const QuantLib::ext::shared_ptr<ore::data::CurveConfigurations>& cc,
208 const QuantLib::ext::shared_ptr<ore::data::TodaysMarketParameters>& tmp, std::string conf,
209 const QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarketParameters>& smd,
210 const std::string& context)
212 simMarketData_(smd), context_(context) {}
213 };
214
215 class Reports {
216 public:
217 virtual ~Reports() {}
219 void add(const QuantLib::ext::shared_ptr<ore::data::Report>& report) { reports_.push_back(report); }
220 const std::vector<QuantLib::ext::shared_ptr<ore::data::Report>>& reports() const { return reports_; };
221
222 protected:
223 std::vector<QuantLib::ext::shared_ptr<ore::data::Report>> reports_;
224 };
225
226 MarketRiskReport(const std::string& calculationCurrency, const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
227 const std::string& portfolioFilter, boost::optional<ore::data::TimePeriod> period,
228 const QuantLib::ext::shared_ptr<HistoricalScenarioGenerator>& hisScenGen = nullptr,
229 std::unique_ptr<SensiRunArgs> sensiArgs = nullptr, std::unique_ptr<FullRevalArgs> fullRevalArgs = nullptr,
230 std::unique_ptr<MultiThreadArgs> multiThreadArgs = nullptr, const bool breakdown = false,
231 const bool requireTradePnl = false)
232 : calculationCurrency_(calculationCurrency), portfolio_(portfolio), portfolioFilter_(portfolioFilter), period_(period),
233 hisScenGen_(hisScenGen), sensiArgs_(std::move(sensiArgs)),
234 fullRevalArgs_(std::move(fullRevalArgs)), multiThreadArgs_(std::move(multiThreadArgs)), breakdown_(breakdown),
235 requireTradePnl_(requireTradePnl) {
236 }
237 virtual ~MarketRiskReport() {}
238
239 virtual void initialise();
240 //! Method to init simMarket_ for multi-threaded ctors
241 void initSimMarket();
242
243 virtual void calculate(const QuantLib::ext::shared_ptr<Reports>& report);
244
245 /*! Enable cube file generation to the given output directory \p cubeDir with the
246 given cube file name \p cubeFilename. The \p cubeFilename should be of the form
247 'stemFILTER.dat'. In the code the 'FILTER' piece is replaced with a description
248 of the scenario filter under which the cube was generated so that separate cube
249 files are generated for each scenario filter.
250
251 \remark This will only have an effect when full revaluation is enabled
252 */
253 void enableCubeWrite(const std::string& cubeDir, const std::string& cubeFilename);
254
255protected:
256 //! Method for shared initialisation
257 virtual void initialiseRiskGroups();
258
259 bool sensiBased_ = false;
260 bool fullReval_ = false;
261
263 QuantLib::ext::shared_ptr<Portfolio> portfolio_;
264 std::string portfolioFilter_;
265 boost::optional<ore::data::TimePeriod> period_;
266 QuantLib::ext::shared_ptr<HistoricalScenarioGenerator> hisScenGen_;
267 std::unique_ptr<SensiRunArgs> sensiArgs_;
268 std::unique_ptr<FullRevalArgs> fullRevalArgs_;
269 std::unique_ptr<MultiThreadArgs> multiThreadArgs_;
270
271 bool breakdown_ = false;
272 // Whether we require trade-level PnLs to use for later calculations
273 bool requireTradePnl_ = false;
274
275 QuantLib::ext::shared_ptr<MarketRiskGroupBaseContainer> riskGroups_;
276 QuantLib::ext::shared_ptr<TradeGroupBaseContainer> tradeGroups_;
277
278 /*! Partition of portfolio's trade IDs (and index as a pair), into groups.
279 */
280 std::map<std::string, std::set<std::pair<std::string, QuantLib::Size>>> tradeIdGroups_;
281 std::set<std::pair<std::string, QuantLib::Size>> tradeIdIdxPairs_;
282 // Set of trade IDs in this trade group.
283 std::vector<std::string> tradeIds_;
284
285 std::map<RiskFactorKey, QuantLib::Real> deltas_;
286 std::map<std::pair<RiskFactorKey, RiskFactorKey>, QuantLib::Real> gammas_;
287 QuantLib::Matrix covarianceMatrix_;
288 bool writePnl_ = false;
289 std::vector<QuantLib::ext::shared_ptr<PNLCalculator>> pnlCalculators_;
290 QuantLib::ext::shared_ptr<QuantExt::CovarianceSalvage> salvage_ =
291 QuantLib::ext::make_shared<QuantExt::SpectralCovarianceSalvage>();
294
295 // initialized if using single threaded engine and fullRevaluation_ is true
296 QuantLib::ext::shared_ptr<ore::data::EngineFactory> factory_;
297
298 QuantLib::ext::shared_ptr<ore::analytics::HistoricalPnlGenerator> histPnlGen_;
299 QuantLib::ext::shared_ptr<HistoricalSensiPnlCalculator> sensiPnlCalculator_;
300
301 virtual void registerProgressIndicators();
302 virtual void createReports(const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports) = 0;
303 virtual bool runTradeDetail(const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports) { return requireTradePnl_; };
304 virtual QuantLib::ext::shared_ptr<ScenarioFilter>
305 createScenarioFilter(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup);
306
307 virtual void reset(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup);
308 virtual bool runTradeRiskGroup(const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup,
309 const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup) const {
310 return true;
311 }
312
313 /*! Check if the given scenario \p filter turns off all risk factors in the
314 historical scenario generator
315 */
316 virtual bool disablesAll(const QuantLib::ext::shared_ptr<ScenarioFilter>& filter) const { return false; };
317
318 //! update any filters required
319 virtual void updateFilter(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup,
320 const QuantLib::ext::shared_ptr<ScenarioFilter>& filter) {}
321 virtual std::string portfolioId(const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup) const;
322 virtual std::string tradeGroupKey(const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup) const;
323 virtual ore::data::TimePeriod covariancePeriod() const { return period_.value(); }
324 virtual void addPnlCalculators(const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports) {}
325
326 // handle results specific to this report
327 virtual void handleSensiResults(const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& report,
328 const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup,
329 const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup){};
330
331 virtual void handleFullRevalResults(const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports,
332 const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup,
333 const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup){};
334
335 virtual bool includeDeltaMargin(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup) const {
336 return true;
337 }
338 virtual bool includeGammaMargin(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup) const {
339 return true;
340 }
341 virtual bool runFullReval(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup) const { return true; }
342 virtual bool generateCube(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup) const { return true; }
343 virtual std::string cubeFilePath(const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup) const {
344 return std::string();
345 }
346 virtual std::vector<ore::data::TimePeriod> timePeriods() { return {period_.get()}; }
347 virtual void writeReports(const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports,
348 const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup,
349 const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup) {}
350 virtual void closeReports(const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports);
351};
352} // namespace analytics
353} // namespace ore
virtual QuantLib::ext::shared_ptr< MarketRiskGroupBase > next()=0
virtual void add(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup)=0
virtual bool allLevel() const =0
virtual std::string to_string()=0
std::set< QuantLib::ext::shared_ptr< MarketRiskGroup > >::const_iterator rgIdx_
QuantLib::ext::shared_ptr< MarketRiskGroupBase > next() override
void add(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) override
std::set< QuantLib::ext::shared_ptr< MarketRiskGroup >, CompRisk > riskGroups_
MarketRiskConfiguration::RiskType riskType_
std::string to_string() override
MarketRiskGroup(MarketRiskConfiguration::RiskClass riskClass, MarketRiskConfiguration::RiskType riskType)
MarketRiskConfiguration::RiskClass riskClass() const
MarketRiskConfiguration::RiskClass riskClass_
MarketRiskConfiguration::RiskType riskType() const
std::vector< QuantLib::ext::shared_ptr< ore::data::Report > > reports_
const std::vector< QuantLib::ext::shared_ptr< ore::data::Report > > & reports() const
void add(const QuantLib::ext::shared_ptr< ore::data::Report > &report)
QuantLib::ext::shared_ptr< ore::data::EngineFactory > factory_
virtual bool includeGammaMargin(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const
void enableCubeWrite(const std::string &cubeDir, const std::string &cubeFilename)
virtual void closeReports(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports)
std::vector< QuantLib::ext::shared_ptr< PNLCalculator > > pnlCalculators_
boost::optional< ore::data::TimePeriod > period_
virtual void createReports(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports)=0
virtual bool disablesAll(const QuantLib::ext::shared_ptr< ScenarioFilter > &filter) const
QuantLib::ext::shared_ptr< MarketRiskGroupBaseContainer > riskGroups_
virtual void calculate(const QuantLib::ext::shared_ptr< Reports > &report)
virtual std::string tradeGroupKey(const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup) const
void initSimMarket()
Method to init simMarket_ for multi-threaded ctors.
QuantLib::ext::shared_ptr< HistoricalScenarioGenerator > hisScenGen_
virtual bool runTradeRiskGroup(const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup, const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const
virtual QuantLib::ext::shared_ptr< ScenarioFilter > createScenarioFilter(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup)
virtual bool includeDeltaMargin(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const
virtual std::string portfolioId(const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup) const
virtual std::string cubeFilePath(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const
std::unique_ptr< MultiThreadArgs > multiThreadArgs_
std::map< std::string, std::set< std::pair< std::string, QuantLib::Size > > > tradeIdGroups_
std::unique_ptr< FullRevalArgs > fullRevalArgs_
virtual void initialiseRiskGroups()
Method for shared initialisation.
QuantLib::ext::shared_ptr< Portfolio > portfolio_
QuantLib::ext::shared_ptr< HistoricalSensiPnlCalculator > sensiPnlCalculator_
std::map< RiskFactorKey, QuantLib::Real > deltas_
std::vector< std::string > tradeIds_
std::map< std::pair< RiskFactorKey, RiskFactorKey >, QuantLib::Real > gammas_
virtual bool runFullReval(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const
std::set< std::pair< std::string, QuantLib::Size > > tradeIdIdxPairs_
virtual void reset(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup)
std::unique_ptr< SensiRunArgs > sensiArgs_
virtual void writeReports(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports, const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup, const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup)
virtual void handleFullRevalResults(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports, const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup, const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup)
QuantLib::ext::shared_ptr< TradeGroupBaseContainer > tradeGroups_
virtual void addPnlCalculators(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports)
virtual void updateFilter(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup, const QuantLib::ext::shared_ptr< ScenarioFilter > &filter)
update any filters required
virtual bool runTradeDetail(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports)
virtual bool generateCube(const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const
virtual std::vector< ore::data::TimePeriod > timePeriods()
virtual void handleSensiResults(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &report, const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup, const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup)
QuantLib::ext::shared_ptr< QuantExt::CovarianceSalvage > salvage_
MarketRiskReport(const std::string &calculationCurrency, const QuantLib::ext::shared_ptr< Portfolio > &portfolio, const std::string &portfolioFilter, boost::optional< ore::data::TimePeriod > period, const QuantLib::ext::shared_ptr< HistoricalScenarioGenerator > &hisScenGen=nullptr, std::unique_ptr< SensiRunArgs > sensiArgs=nullptr, std::unique_ptr< FullRevalArgs > fullRevalArgs=nullptr, std::unique_ptr< MultiThreadArgs > multiThreadArgs=nullptr, const bool breakdown=false, const bool requireTradePnl=false)
QuantLib::ext::shared_ptr< ore::analytics::HistoricalPnlGenerator > histPnlGen_
virtual ore::data::TimePeriod covariancePeriod() const
virtual void add(const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup)=0
virtual QuantLib::ext::shared_ptr< TradeGroupBase > next()=0
virtual bool allLevel() const =0
virtual std::string to_string()=0
std::set< QuantLib::ext::shared_ptr< TradeGroup > >::const_iterator tgIdx_
void add(const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup) override
std::set< QuantLib::ext::shared_ptr< TradeGroup > > tradeGroups_
QuantLib::ext::shared_ptr< TradeGroupBase > next() override
std::string to_string() override
const std::string & portfolioId() const
TradeGroup(std::string portfolioId)
bool allLevel() const override
static IborFallbackConfig defaultConfig()
Class for generating portfolio P&Ls based on historical scenarios.
Class for generating sensi pnl.
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
std::vector< std::vector< QuantLib::Real > > TradePnLStore
risk class and type filter
Scenario Filter classes.
Used to order pairs [Risk class, Risk Type].
bool operator()(const QuantLib::ext::shared_ptr< MarketRiskGroup > &lhs, const QuantLib::ext::shared_ptr< MarketRiskGroup > &rhs) const
static std::map< MarketRiskConfiguration::RiskClass, QuantLib::Size > rcOrder
static std::map< MarketRiskConfiguration::RiskType, QuantLib::Size > rtOrder
std::string cubeDir_
If cube writing is enabled, cube(s) will be written to this directory.
FullRevalArgs(const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket > &sm, const QuantLib::ext::shared_ptr< ore::data::EngineData > &ed, const QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > &rd=nullptr, const ore::data::IborFallbackConfig ifc=ore::data::IborFallbackConfig::defaultConfig(), const bool dr=false)
QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > referenceData_
QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket > simMarket_
QuantLib::ext::shared_ptr< ore::data::EngineData > engineData_
QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > curveConfigs_
QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > todaysMarketParams_
MultiThreadArgs(QuantLib::Size n, QuantLib::Date t, const QuantLib::ext::shared_ptr< ore::data::Loader > &l, const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > &cc, const QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > &tmp, std::string conf, const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > &smd, const std::string &context)
QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > simMarketData_
QuantLib::ext::shared_ptr< ore::data::Loader > loader_
QuantLib::Real pnlWriteThreshold_
Amount by which absolute P&L value must exceed 0 to be written to P&L contribution report.
std::map< std::pair< RiskFactorKey, RiskFactorKey >, Real > covarianceInput_
Optional input of covariance matrix.
QuantLib::ext::shared_ptr< SensitivityStream > sensitivityStream_
Stream of sensitivity records used for the sensitivity based backtest.
QuantLib::ext::shared_ptr< ScenarioShiftCalculator > shiftCalculator_
Calculates the shift multiple in moving from one scenario to another.
SensiRunArgs(const QuantLib::ext::shared_ptr< SensitivityStream > &ss, const QuantLib::ext::shared_ptr< ScenarioShiftCalculator > &sc, QuantLib::Real pnlThres=0.01, std::map< std::pair< RiskFactorKey, RiskFactorKey >, Real > ci={})