Sensitivity Analysis. More...
#include <orea/engine/sensitivityanalysis.hpp>
Public Member Functions | |
SensitivityAnalysis (const QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, const QuantLib::ext::shared_ptr< ore::data::Market > &market, const string &marketConfiguration, const QuantLib::ext::shared_ptr< ore::data::EngineData > &engineData, const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > &simMarketData, const QuantLib::ext::shared_ptr< SensitivityScenarioData > &sensitivityData, const bool recalibrateModels, const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > &curveConfigs=nullptr, const QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > &todaysMarketParams=nullptr, const bool nonShiftedBaseCurrencyConversion=false, const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceData=nullptr, const IborFallbackConfig &iborFallbackConfig=IborFallbackConfig::defaultConfig(), const bool continueOnError=false, bool dryRun=false) | |
Constructor using single-threaded engine. More... | |
SensitivityAnalysis (const Size nThreads, const Date &asof, const QuantLib::ext::shared_ptr< ore::data::Loader > &loader, const QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, const string &marketConfiguration, const QuantLib::ext::shared_ptr< ore::data::EngineData > &engineData, const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > &simMarketData, const QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > &sensitivityData, const bool recalibrateModels, const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > &curveConfigs, const QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > &todaysMarketParams, const bool nonShiftedBaseCurrencyConversion=false, const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceData=nullptr, const IborFallbackConfig &iborFallbackConfig=IborFallbackConfig::defaultConfig(), const bool continueOnError=false, bool dryRun=false, const std::string &context="sensi analysis") | |
Constructor using multi-threaded engine. More... | |
virtual | ~SensitivityAnalysis () |
void | generateSensitivities () |
Generate the Sensitivities. More... | |
const QuantLib::Date | asof () const |
The ASOF date for the sensitivity analysis. More... | |
const std::string | marketConfiguration () const |
The market configuration string. More... | |
const QuantLib::ext::shared_ptr< ScenarioSimMarket > | simMarket () const |
A getter for the sim market. More... | |
const QuantLib::ext::shared_ptr< SensitivityScenarioGenerator > | scenarioGenerator () const |
A getter for SensitivityScenarioGenerator (the main one, without possibly customized shifts) More... | |
const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > | simMarketData () const |
A getter for ScenarioSimMarketParameters. More... | |
const QuantLib::ext::shared_ptr< SensitivityScenarioData > | sensitivityData () const |
A getter for SensitivityScenarioData. More... | |
void | overrideTenors (const bool b) |
override shift tenors with sim market tenors More... | |
QuantLib::ext::shared_ptr< Portfolio > | portfolio () const |
the portfolio of trades More... | |
std::vector< QuantLib::ext::shared_ptr< SensitivityCube > > | sensiCubes () const |
a wrapper for the sensitivity results cubes (one per shift configuration) More... | |
QuantLib::ext::shared_ptr< SensitivityCube > | sensiCube () const |
a wrapper for the first sensitivity result cube (if that is unique, otherwise throws, for bwd compatibility) More... | |
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 |
Private Attributes | |
QuantLib::ext::shared_ptr< ore::data::Market > | market_ |
std::string | marketConfiguration_ |
Date | asof_ |
QuantLib::ext::shared_ptr< SensitivityScenarioGenerator > | scenarioGenerator_ |
QuantLib::ext::shared_ptr< ScenarioSimMarket > | simMarket_ |
QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > | simMarketData_ |
QuantLib::ext::shared_ptr< SensitivityScenarioData > | sensitivityData_ |
bool | recalibrateModels_ |
QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > | curveConfigs_ |
Optional curve configurations. Used in building the scenario sim market. More... | |
QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > | todaysMarketParams_ |
Optional todays market parameters. Used in building the scenario sim market. More... | |
bool | overrideTenors_ |
bool | nonShiftedBaseCurrencyConversion_ |
QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > | referenceData_ |
IborFallbackConfig | iborFallbackConfig_ |
bool | continueOnError_ |
QuantLib::ext::shared_ptr< EngineData > | engineData_ |
the engine data (provided as input, needed to construct the engine factory) More... | |
QuantLib::ext::shared_ptr< Portfolio > | portfolio_ |
the portfolio (provided as input) More... | |
bool | dryRun_ |
do dry run More... | |
std::set< std::pair< string, QuantLib::ext::shared_ptr< QuantExt::ModelBuilder > > > | modelBuilders_ |
model builders More... | |
std::vector< QuantLib::ext::shared_ptr< SensitivityCube > > | sensiCubes_ |
sensitivityCube More... | |
bool | useSingleThreadedEngine_ |
Size | nThreads_ |
QuantLib::ext::shared_ptr< ore::data::Loader > | loader_ |
std::string | context_ |
Sensitivity Analysis.
This class wraps functionality to perform a sensitivity analysis for a given portfolio. It comprises
Definition at line 64 of file sensitivityanalysis.hpp.
SensitivityAnalysis | ( | const QuantLib::ext::shared_ptr< ore::data::Portfolio > & | portfolio, |
const QuantLib::ext::shared_ptr< ore::data::Market > & | market, | ||
const string & | marketConfiguration, | ||
const QuantLib::ext::shared_ptr< ore::data::EngineData > & | engineData, | ||
const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > & | simMarketData, | ||
const QuantLib::ext::shared_ptr< SensitivityScenarioData > & | sensitivityData, | ||
const bool | recalibrateModels, | ||
const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > & | curveConfigs = nullptr , |
||
const QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > & | todaysMarketParams = nullptr , |
||
const bool | nonShiftedBaseCurrencyConversion = false , |
||
const QuantLib::ext::shared_ptr< ReferenceDataManager > & | referenceData = nullptr , |
||
const IborFallbackConfig & | iborFallbackConfig = IborFallbackConfig::defaultConfig() , |
||
const bool | continueOnError = false , |
||
bool | dryRun = false |
||
) |
Constructor using single-threaded engine.
Definition at line 45 of file sensitivityanalysis.cpp.
SensitivityAnalysis | ( | const Size | nThreads, |
const Date & | asof, | ||
const QuantLib::ext::shared_ptr< ore::data::Loader > & | loader, | ||
const QuantLib::ext::shared_ptr< ore::data::Portfolio > & | portfolio, | ||
const string & | marketConfiguration, | ||
const QuantLib::ext::shared_ptr< ore::data::EngineData > & | engineData, | ||
const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > & | simMarketData, | ||
const QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > & | sensitivityData, | ||
const bool | recalibrateModels, | ||
const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > & | curveConfigs, | ||
const QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > & | todaysMarketParams, | ||
const bool | nonShiftedBaseCurrencyConversion = false , |
||
const QuantLib::ext::shared_ptr< ReferenceDataManager > & | referenceData = nullptr , |
||
const IborFallbackConfig & | iborFallbackConfig = IborFallbackConfig::defaultConfig() , |
||
const bool | continueOnError = false , |
||
bool | dryRun = false , |
||
const std::string & | context = "sensi analysis" |
||
) |
Constructor using multi-threaded engine.
Definition at line 61 of file sensitivityanalysis.cpp.
|
virtual |
Definition at line 94 of file sensitivityanalysis.hpp.
void generateSensitivities | ( | ) |
Generate the Sensitivities.
Definition at line 105 of file sensitivityanalysis.cpp.
const QuantLib::Date asof | ( | ) | const |
The ASOF date for the sensitivity analysis.
Definition at line 100 of file sensitivityanalysis.hpp.
const std::string marketConfiguration | ( | ) | const |
const QuantLib::ext::shared_ptr< ScenarioSimMarket > simMarket | ( | ) | const |
const QuantLib::ext::shared_ptr< SensitivityScenarioGenerator > scenarioGenerator | ( | ) | const |
A getter for SensitivityScenarioGenerator (the main one, without possibly customized shifts)
Definition at line 109 of file sensitivityanalysis.hpp.
const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > simMarketData | ( | ) | const |
const QuantLib::ext::shared_ptr< SensitivityScenarioData > sensitivityData | ( | ) | const |
void overrideTenors | ( | const bool | b | ) |
override shift tenors with sim market tenors
Definition at line 118 of file sensitivityanalysis.hpp.
QuantLib::ext::shared_ptr< Portfolio > portfolio | ( | ) | const |
std::vector< QuantLib::ext::shared_ptr< SensitivityCube > > sensiCubes | ( | ) | const |
a wrapper for the sensitivity results cubes (one per shift configuration)
Definition at line 124 of file sensitivityanalysis.hpp.
QuantLib::ext::shared_ptr< SensitivityCube > sensiCube | ( | ) | const |
a wrapper for the first sensitivity result cube (if that is unique, otherwise throws, for bwd compatibility)
Definition at line 127 of file sensitivityanalysis.hpp.
|
private |
Definition at line 134 of file sensitivityanalysis.hpp.
|
private |
Definition at line 135 of file sensitivityanalysis.hpp.
|
private |
Definition at line 136 of file sensitivityanalysis.hpp.
|
private |
Definition at line 137 of file sensitivityanalysis.hpp.
|
private |
Definition at line 138 of file sensitivityanalysis.hpp.
|
private |
Definition at line 139 of file sensitivityanalysis.hpp.
|
private |
Definition at line 140 of file sensitivityanalysis.hpp.
|
private |
Definition at line 141 of file sensitivityanalysis.hpp.
|
private |
Optional curve configurations. Used in building the scenario sim market.
Definition at line 143 of file sensitivityanalysis.hpp.
|
private |
Optional todays market parameters. Used in building the scenario sim market.
Definition at line 145 of file sensitivityanalysis.hpp.
|
private |
Definition at line 146 of file sensitivityanalysis.hpp.
|
private |
Definition at line 149 of file sensitivityanalysis.hpp.
|
private |
Definition at line 150 of file sensitivityanalysis.hpp.
|
private |
Definition at line 151 of file sensitivityanalysis.hpp.
|
private |
Definition at line 153 of file sensitivityanalysis.hpp.
|
private |
the engine data (provided as input, needed to construct the engine factory)
Definition at line 155 of file sensitivityanalysis.hpp.
|
private |
the portfolio (provided as input)
Definition at line 157 of file sensitivityanalysis.hpp.
|
private |
do dry run
Definition at line 159 of file sensitivityanalysis.hpp.
|
private |
model builders
Definition at line 162 of file sensitivityanalysis.hpp.
|
private |
sensitivityCube
Definition at line 164 of file sensitivityanalysis.hpp.
|
private |
Definition at line 166 of file sensitivityanalysis.hpp.
|
private |
Definition at line 168 of file sensitivityanalysis.hpp.
|
private |
Definition at line 169 of file sensitivityanalysis.hpp.
|
private |
Definition at line 170 of file sensitivityanalysis.hpp.