Logo
Reference manual - version orea_version
DynamicSimmCalculator Class Reference

Dynamic SIMM. More...

#include <orea/aggregation/dynamicsimmcalculator.hpp>

Inheritance diagram for DynamicSimmCalculator:

Public Member Functions

 DynamicSimmCalculator (const QuantLib::ext::shared_ptr< InputParameters > &inputs, const QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, const QuantLib::ext::shared_ptr< ore::analytics::NPVCube > &cube, const QuantLib::ext::shared_ptr< ore::analytics::CubeInterpretation > &cubeInterpretation, const QuantLib::ext::shared_ptr< ore::analytics::AggregationScenarioData > &scenarioData, const QuantLib::ext::shared_ptr< SimmHelper > &simmHelper, QuantLib::Real quantile=0.99, QuantLib::Size horizonCalendarDays=14, const std::map< std::string, Real > &currentIM=std::map< std::string, Real >(), const Size &simmCubeDepth=4)
const std::map< std::string, QuantLib::Real > & unscaledCurrentDIM () const override
 Model implied t0 DIM by netting set, does not need a call to build() before.
void build () override
 Compute dynamic initial margin along all paths and fill result structures.
Public Member Functions inherited from DynamicInitialMarginCalculator
 DynamicInitialMarginCalculator (const QuantLib::ext::shared_ptr< InputParameters > &inputs, const QuantLib::ext::shared_ptr< Portfolio > &portfolio, const QuantLib::ext::shared_ptr< NPVCube > &cube, const QuantLib::ext::shared_ptr< CubeInterpretation > &cubeInterpretation, const QuantLib::ext::shared_ptr< AggregationScenarioData > &scenarioData, Real quantile=0.99, Size horizonCalendarDays=14, const std::map< std::string, Real > &currentIM=std::map< std::string, Real >(), Size dimCubeDepth=1)
const map< string, Real > & currentIM () const
 t0 IM by netting set, as provided as an arguments
virtual void exportDimEvolution (ore::data::Report &dimEvolutionReport) const
 DIM evolution report.
virtual void exportDimDistribution (ore::data::Report &dimDistributionReport, const Size gridSize=50, const Real coveredStdDevs=5.0) const
 DIM distribution report.
virtual void exportDimCube (ore::data::Report &dimCubeReport) const
 DIM cube report.
const QuantLib::ext::shared_ptr< NPVCube > & dimCube () const
 DIM by nettingSet, date, sample returned as a regular NPV cube.
const vector< vector< Real > > & dynamicIM (const string &nettingSet) const
 DIM matrix by date and sample index for the specified netting set.
const vector< vector< Real > > & cashFlow (const string &nettingSet) const
 Cash flow matrix by date and sample index for the specified netting set.
const vector< Real > & expectedIM (const string &nettingSet) const
 Expected DIM vector by date for the specified netting set.
const std::map< std::string, Real > & getInitialMarginScaling () const
 Get the implied netting set specific scaling factors.

Additional Inherited Members

Protected Attributes inherited from DynamicInitialMarginCalculator
QuantLib::ext::shared_ptr< InputParametersinputs_
QuantLib::ext::shared_ptr< Portfolio > portfolio_
QuantLib::ext::shared_ptr< NPVCubecube_
QuantLib::ext::shared_ptr< NPVCubedimCube_
QuantLib::ext::shared_ptr< CubeInterpretationcubeInterpretation_
QuantLib::ext::shared_ptr< AggregationScenarioDatascenarioData_
Real quantile_
Size horizonCalendarDays_
map< string, Real > currentIM_
bool cubeIsRegular_
Size datesLoopSize_
std::set< stringnettingSetIds_
map< string, Real > nettingSetScaling_
map< string, vector< vector< Real > > > nettingSetNPV_
map< string, vector< vector< Real > > > nettingSetCloseOutNPV_
map< string, vector< vector< Real > > > nettingSetFLOW_
map< string, vector< vector< Real > > > nettingSetDeltaNPV_
map< string, vector< vector< Real > > > nettingSetDIM_
map< string, vector< Real > > nettingSetExpectedDIM_

Detailed Description

Dynamic SIMM.

Dynamic IM using the SimpleSimm calculation along all paths, based on sensitivities stored in the hyper cube

Constructor & Destructor Documentation

◆ DynamicSimmCalculator()

DynamicSimmCalculator ( const QuantLib::ext::shared_ptr< InputParameters > & inputs,
const QuantLib::ext::shared_ptr< ore::data::Portfolio > & portfolio,
const QuantLib::ext::shared_ptr< ore::analytics::NPVCube > & cube,
const QuantLib::ext::shared_ptr< ore::analytics::CubeInterpretation > & cubeInterpretation,
const QuantLib::ext::shared_ptr< ore::analytics::AggregationScenarioData > & scenarioData,
const QuantLib::ext::shared_ptr< SimmHelper > & simmHelper,
QuantLib::Real quantile = 0.99,
QuantLib::Size horizonCalendarDays = 14,
const std::map< std::string, Real > & currentIM = std::map< std::string, Real >(),
const Size & simmCubeDepth = 4 )
Parameters
inputsGlobal input parameters,
portfolioDriving portfolio consistent with the cube below
cubeNPV cube resulting from the Monte Carlo simulation loop
cubeInterpretationInterpretation of the cube, regular NPV, MPoR grid etc
scenarioDataAdditional output of the MC simulation loop with numeraires, index fixings, FX spots etc
simmHelperHelper for dynamic SIMM calculation
quantileVaR quantile expressed as a percentage
horizonCalendarDaysVaR holding period in calendar days

Member Function Documentation

◆ unscaledCurrentDIM()

const std::map< std::string, QuantLib::Real > & unscaledCurrentDIM ( ) const
overridevirtual

Model implied t0 DIM by netting set, does not need a call to build() before.

Implements DynamicInitialMarginCalculator.

◆ build()

void build ( )
overridevirtual

Compute dynamic initial margin along all paths and fill result structures.

Implements DynamicInitialMarginCalculator.