48class ValuationCalculator;
68 const QuantLib::ext::shared_ptr<ore::data::Market>& market,
const string&
marketConfiguration,
69 const QuantLib::ext::shared_ptr<ore::data::EngineData>& engineData,
70 const QuantLib::ext::shared_ptr<ScenarioSimMarketParameters>&
simMarketData,
71 const QuantLib::ext::shared_ptr<SensitivityScenarioData>&
sensitivityData,
const bool recalibrateModels,
72 const QuantLib::ext::shared_ptr<ore::data::CurveConfigurations>&
curveConfigs =
nullptr,
73 const QuantLib::ext::shared_ptr<ore::data::TodaysMarketParameters>& todaysMarketParams =
nullptr,
74 const bool nonShiftedBaseCurrencyConversion =
false,
75 const QuantLib::ext::shared_ptr<ReferenceDataManager>& referenceData =
nullptr,
77 const bool continueOnError =
false,
bool dryRun =
false);
80 SensitivityAnalysis(
const Size nThreads,
const Date&
asof,
const QuantLib::ext::shared_ptr<ore::data::Loader>& loader,
82 const QuantLib::ext::shared_ptr<ore::data::EngineData>& engineData,
83 const QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarketParameters>&
simMarketData,
84 const QuantLib::ext::shared_ptr<ore::analytics::SensitivityScenarioData>&
sensitivityData,
85 const bool recalibrateModels,
86 const QuantLib::ext::shared_ptr<ore::data::CurveConfigurations>&
curveConfigs,
87 const QuantLib::ext::shared_ptr<ore::data::TodaysMarketParameters>& todaysMarketParams,
88 const bool nonShiftedBaseCurrencyConversion =
false,
89 const QuantLib::ext::shared_ptr<ReferenceDataManager>& referenceData =
nullptr,
91 const bool continueOnError =
false,
bool dryRun =
false,
92 const std::string& context =
"sensi analysis");
127 QuantLib::ext::shared_ptr<SensitivityCube>
sensiCube()
const {
128 QL_REQUIRE(
sensiCubes_.size() == 1,
"SensitivityAnalysis: sensiCube() called, but got "
129 <<
sensiCubes_.size() <<
" sensi cubes. Check the calling code.");
134 QuantLib::ext::shared_ptr<ore::data::Market>
market_;
162 std::set<std::pair<string, QuantLib::ext::shared_ptr<QuantExt::ModelBuilder>>>
modelBuilders_;
164 std::vector<QuantLib::ext::shared_ptr<SensitivityCube>>
sensiCubes_;
169 QuantLib::ext::shared_ptr<ore::data::Loader>
loader_;
177 const QuantLib::ext::shared_ptr<ScenarioSimMarket>& simMarket,
const std::string& marketConfiguration =
"");
Data types stored in the scenario class.
QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > curveConfigs_
Optional curve configurations. Used in building the scenario sim market.
QuantLib::ext::shared_ptr< SensitivityScenarioData > sensitivityData_
QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > todaysMarketParams_
Optional todays market parameters. Used in building the scenario sim market.
std::string marketConfiguration_
const std::string marketConfiguration() const
The market configuration string.
const QuantLib::Date asof() const
The ASOF date for the sensitivity analysis.
const QuantLib::ext::shared_ptr< SensitivityScenarioData > sensitivityData() const
A getter for SensitivityScenarioData.
void generateSensitivities()
Generate the Sensitivities.
QuantLib::ext::shared_ptr< EngineData > engineData_
the engine data (provided as input, needed to construct the engine factory)
QuantLib::ext::shared_ptr< ScenarioSimMarket > simMarket_
virtual ~SensitivityAnalysis()
std::vector< QuantLib::ext::shared_ptr< SensitivityCube > > sensiCubes_
sensitivityCube
QuantLib::ext::shared_ptr< Portfolio > portfolio() const
the portfolio of trades
QuantLib::ext::shared_ptr< SensitivityCube > sensiCube() const
a wrapper for the first sensitivity result cube (if that is unique, otherwise throws,...
QuantLib::ext::shared_ptr< Portfolio > portfolio_
the portfolio (provided as input)
const QuantLib::ext::shared_ptr< ScenarioSimMarket > simMarket() const
A getter for the sim market.
std::set< std::pair< string, QuantLib::ext::shared_ptr< QuantExt::ModelBuilder > > > modelBuilders_
model builders
const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > simMarketData() const
A getter for ScenarioSimMarketParameters.
QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > referenceData_
QuantLib::ext::shared_ptr< ore::data::Market > market_
const QuantLib::ext::shared_ptr< SensitivityScenarioGenerator > scenarioGenerator() const
A getter for SensitivityScenarioGenerator (the main one, without possibly customized shifts)
std::vector< QuantLib::ext::shared_ptr< SensitivityCube > > sensiCubes() const
a wrapper for the sensitivity results cubes (one per shift configuration)
QuantLib::ext::shared_ptr< SensitivityScenarioGenerator > scenarioGenerator_
void overrideTenors(const bool b)
override shift tenors with sim market tenors
QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > simMarketData_
IborFallbackConfig iborFallbackConfig_
bool useSingleThreadedEngine_
QuantLib::ext::shared_ptr< ore::data::Loader > loader_
bool nonShiftedBaseCurrencyConversion_
Description of sensitivity shift scenarios.
static IborFallbackConfig defaultConfig()
Real getShiftSize(const RiskFactorKey &key, const SensitivityScenarioData &sensiParams, const QuantLib::ext::shared_ptr< ScenarioSimMarket > &simMarket, const string &marketConfiguration)
An NPV cube for storing NPVs resulting from risk factor shifts.
A Market class that can be updated by Scenarios.
A class to hold Scenario parameters for scenarioSimMarket.
holds a grid of NPVs for a list of trades under various scenarios
A class to hold the parametrisation for building sensitivity scenarios.
Sensitivity scenario generation.
vector< string > curveConfigs