#include <orea/scenario/scenarioshiftcalculator.hpp>
Public Member Functions | |
ScenarioShiftCalculator (const QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > &sensitivityConfig, const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > &simMarketConfig, const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket > &simMarket=QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket >()) | |
QuantLib::Real | shift (const ore::analytics::RiskFactorKey &key, const ore::analytics::Scenario &s_1, const ore::analytics::Scenario &s_2) const |
Class for calculating the shift multiple between two scenarios for a given risk factor key.
The shift value returned is a value that is consistent with the SensitivityScenarioData and ScenarioSimMarketParameters passed in during construction. In other words, multiplying the result of the shift method with sensitivities generated using the SensitivityScenarioData configuration will give a valid estimate of the P&L move associated with moving from one scenario to another.
ScenarioShiftCalculator | ( | const QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > & | sensitivityConfig, |
const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > & | simMarketConfig, | ||
const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket > & | simMarket = QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket >() |
||
) |
Constructor
sensitivityConfig | sensitivity configuration that will determine the result returned by the shift method |
simMarketConfig | simulation market configuration for the scenarios that will be fed to the shift method |
simMarket | simulation market that will be used if provided |
QuantLib::Real shift | ( | const ore::analytics::RiskFactorKey & | key, |
const ore::analytics::Scenario & | s_1, | ||
const ore::analytics::Scenario & | s_2 | ||
) | const |
Calculate the shift in the risk factor key
implied by going from scenario s_1
to scenario s_2
.