Logo
Reference manual - version orea_version
Public Member Functions | List of all members
ScenarioShiftCalculator Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ScenarioShiftCalculator()

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

Parameters
sensitivityConfigsensitivity configuration that will determine the result returned by the shift method
simMarketConfigsimulation market configuration for the scenarios that will be fed to the shift method
simMarketsimulation market that will be used if provided

Member Function Documentation

◆ shift()

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.