#include <orea/engine/pnlexplainreport.hpp>
Classes | |
struct | PnlExplainResults |
Public Member Functions | |
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) | |
Public Member Functions inherited from MarketRiskReport | |
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) | |
virtual | ~MarketRiskReport () |
virtual void | initialise () |
void | initSimMarket () |
Method to init simMarket_ for multi-threaded ctors. More... | |
virtual void | calculate (const QuantLib::ext::shared_ptr< Reports > &report) |
void | enableCubeWrite (const std::string &cubeDir, const std::string &cubeFilename) |
Public Member Functions inherited from ProgressReporter | |
ProgressReporter () | |
void | registerProgressIndicator (const QuantLib::ext::shared_ptr< ProgressIndicator > &indicator) |
void | unregisterProgressIndicator (const QuantLib::ext::shared_ptr< ProgressIndicator > &indicator) |
void | unregisterAllProgressIndicators () |
void | updateProgress (const unsigned long progress, const unsigned long total, const std::string &detail="") |
void | resetProgress () |
const std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > & | progressIndicators () const |
Protected Member Functions | |
void | createReports (const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) 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 |
void | addPnlCalculators (const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) 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 |
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 | closeReports (const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) override |
Protected Member Functions inherited from MarketRiskReport | |
virtual void | initialiseRiskGroups () |
Method for shared initialisation. More... | |
virtual void | registerProgressIndicators () |
virtual void | createReports (const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports)=0 |
virtual bool | runTradeDetail (const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) |
virtual QuantLib::ext::shared_ptr< ScenarioFilter > | createScenarioFilter (const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) |
virtual void | reset (const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) |
virtual bool | runTradeRiskGroup (const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup, const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const |
virtual bool | disablesAll (const QuantLib::ext::shared_ptr< ScenarioFilter > &filter) const |
virtual void | updateFilter (const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup, const QuantLib::ext::shared_ptr< ScenarioFilter > &filter) |
update any filters required More... | |
virtual std::string | portfolioId (const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup) const |
virtual std::string | tradeGroupKey (const QuantLib::ext::shared_ptr< TradeGroupBase > &tradeGroup) const |
virtual ore::data::TimePeriod | covariancePeriod () const |
virtual void | addPnlCalculators (const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) |
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) |
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) |
virtual bool | includeDeltaMargin (const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const |
virtual bool | includeGammaMargin (const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const |
virtual bool | runFullReval (const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const |
virtual bool | generateCube (const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const |
virtual std::string | cubeFilePath (const QuantLib::ext::shared_ptr< MarketRiskGroupBase > &riskGroup) const |
virtual std::vector< ore::data::TimePeriod > | timePeriods () |
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 | closeReports (const QuantLib::ext::shared_ptr< MarketRiskReport::Reports > &reports) |
Private Attributes | |
std::map< std::string, PnlExplainResults > | results_ |
QuantLib::ext::shared_ptr< Report > | pnlReport_ |
QuantLib::Size | pnlReportColumnSize_ |
Additional Inherited Members | |
Protected Attributes inherited from MarketRiskReport | |
bool | sensiBased_ = false |
bool | fullReval_ = false |
std::string | calculationCurrency_ |
QuantLib::ext::shared_ptr< Portfolio > | portfolio_ |
std::string | portfolioFilter_ |
boost::optional< ore::data::TimePeriod > | period_ |
QuantLib::ext::shared_ptr< HistoricalScenarioGenerator > | hisScenGen_ |
std::unique_ptr< SensiRunArgs > | sensiArgs_ |
std::unique_ptr< FullRevalArgs > | fullRevalArgs_ |
std::unique_ptr< MultiThreadArgs > | multiThreadArgs_ |
bool | breakdown_ = false |
bool | requireTradePnl_ = false |
QuantLib::ext::shared_ptr< MarketRiskGroupBaseContainer > | riskGroups_ |
QuantLib::ext::shared_ptr< TradeGroupBaseContainer > | tradeGroups_ |
std::map< std::string, std::set< std::pair< std::string, QuantLib::Size > > > | tradeIdGroups_ |
std::set< std::pair< std::string, QuantLib::Size > > | tradeIdIdxPairs_ |
std::vector< std::string > | tradeIds_ |
std::map< RiskFactorKey, QuantLib::Real > | deltas_ |
std::map< std::pair< RiskFactorKey, RiskFactorKey >, QuantLib::Real > | gammas_ |
QuantLib::Matrix | covarianceMatrix_ |
bool | writePnl_ = false |
std::vector< QuantLib::ext::shared_ptr< PNLCalculator > > | pnlCalculators_ |
QuantLib::ext::shared_ptr< QuantExt::CovarianceSalvage > | salvage_ |
bool | includeDeltaMargin_ = true |
bool | includeGammaMargin_ = true |
QuantLib::ext::shared_ptr< ore::data::EngineFactory > | factory_ |
QuantLib::ext::shared_ptr< ore::analytics::HistoricalPnlGenerator > | histPnlGen_ |
QuantLib::ext::shared_ptr< HistoricalSensiPnlCalculator > | sensiPnlCalculator_ |
Definition at line 24 of file pnlexplainreport.hpp.
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 |
||
) |
Definition at line 52 of file pnlexplainreport.hpp.
|
overrideprotectedvirtual |
Implements MarketRiskReport.
Definition at line 81 of file pnlexplainreport.cpp.
|
overrideprotectedvirtual |
Reimplemented from MarketRiskReport.
Definition at line 115 of file pnlexplainreport.cpp.
|
overrideprotectedvirtual |
Reimplemented from MarketRiskReport.
Definition at line 120 of file pnlexplainreport.cpp.
|
overrideprotectedvirtual |
Reimplemented from MarketRiskReport.
Definition at line 124 of file pnlexplainreport.cpp.
|
overrideprotected |
Definition at line 173 of file pnlexplainreport.cpp.
|
overrideprotected |
Definition at line 177 of file pnlexplainreport.cpp.
|
overrideprotectedvirtual |
Reimplemented from MarketRiskReport.
Definition at line 182 of file pnlexplainreport.cpp.
|
private |
Definition at line 81 of file pnlexplainreport.hpp.
|
private |
Definition at line 82 of file pnlexplainreport.hpp.
|
private |
Definition at line 83 of file pnlexplainreport.hpp.