28 QuantLib::Real
pnl = 0.0;
52 PnlExplainReport(
const std::string& baseCurrency,
const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
53 const std::string& portfolioFilter, boost::optional<ore::data::TimePeriod> period,
54 const QuantLib::ext::shared_ptr<Report>& pnlReport =
nullptr,
55 const QuantLib::ext::shared_ptr<HistoricalScenarioGenerator>& hisScenGen =
nullptr,
56 std::unique_ptr<SensiRunArgs> sensiArgs =
nullptr,
57 std::unique_ptr<FullRevalArgs> fullRevalArgs =
nullptr,
58 std::unique_ptr<MultiThreadArgs> multiThreadArgs =
nullptr,
59 const bool requireTradePnl =
false)
60 :
MarketRiskReport(baseCurrency, portfolio, portfolioFilter, period, hisScenGen, std::move(sensiArgs), std::move(fullRevalArgs),
61 std::move(multiThreadArgs), true, requireTradePnl),
pnlReport_(pnlReport) {
66 void createReports(
const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports)
override;
67 void handleSensiResults(
const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& report,
68 const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup,
69 const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup)
override;
70 void addPnlCalculators(
const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports)
override;
71 void writeReports(
const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports,
72 const QuantLib::ext::shared_ptr<MarketRiskGroupBase>& riskGroup,
73 const QuantLib::ext::shared_ptr<TradeGroupBase>& tradeGroup)
override;
75 includeDeltaMargin(
const QuantLib::ext::shared_ptr<ore::analytics::MarketRiskGroupBase>& riskGroup)
const override;
77 includeGammaMargin(
const QuantLib::ext::shared_ptr<ore::analytics::MarketRiskGroupBase>& riskGroup)
const override;
78 void closeReports(
const QuantLib::ext::shared_ptr<MarketRiskReport::Reports>& reports)
override;
81 std::map<std::string, PnlExplainResults>
results_;
PnlExplainReport(const std::string &baseCurrency, const QuantLib::ext::shared_ptr< Portfolio > &portfolio, const std::string &portfolioFilter, boost::optional< ore::data::TimePeriod > period, const QuantLib::ext::shared_ptr< Report > &pnlReport=nullptr, 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 requireTradePnl=false)
QuantLib::ext::shared_ptr< Report > pnlReport_
void createReports(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) override
void closeReports(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) override
void addPnlCalculators(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) override
std::map< std::string, PnlExplainResults > results_
QuantLib::Size pnlReportColumnSize_
bool includeDeltaMargin(const QuantLib::ext::shared_ptr< ore::analytics::MarketRiskGroupBase > &riskGroup) const override
bool includeGammaMargin(const QuantLib::ext::shared_ptr< ore::analytics::MarketRiskGroupBase > &riskGroup) const override
void writeReports(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports, const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup, const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup) override
void handleSensiResults(const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &report, const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup, const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup) override
Base class for a market risk report.
QuantLib::Real creditDelta
QuantLib::Real creditVega
QuantLib::Real creditGamma