Logo
Reference manual - version orea_version
DimHelper Class Reference

Helper for cam model implied VaR calculation. More...

#include <orea/aggregation/dimhelper.hpp>

Public Member Functions

 DimHelper (const QuantLib::ext::shared_ptr< CrossAssetModel > &model, const QuantLib::ext::shared_ptr< NPVCube > &cube, const QuantLib::ext::shared_ptr< SensitivityStorageManager > &sensitivityStorageManager, const std::vector< Time > &curveSensitivityGrid, const Size dimHorizonCalendarDays)
Real var (const std::string &nettingSetId, const Size order, const Real quantile, const Real thetaFactor=0.0, const Size dateIndex=Null< Size >(), const Size sampleIndex=Null< Size >())

Detailed Description

Helper for cam model implied VaR calculation.

delta or delta-gamma (normal) based estimation of VaR

Constructor & Destructor Documentation

◆ DimHelper()

DimHelper ( const QuantLib::ext::shared_ptr< CrossAssetModel > & model,
const QuantLib::ext::shared_ptr< NPVCube > & cube,
const QuantLib::ext::shared_ptr< SensitivityStorageManager > & sensitivityStorageManager,
const std::vector< Time > & curveSensitivityGrid,
const Size dimHorizonCalendarDays )

Construct the dim helper based on

  • the cam model used for simulation
  • the cube which stores the sensitivities on a netting set level
  • the sensitivity storage manager
  • the grid on which the curve sensitivities are computed
  • the dim horizon expressed in calendar days Notice that we assume that the model has IR LGM1F and FX BS components only

Member Function Documentation

◆ var()

Real var ( const std::string & nettingSetId,
const Size order,
const Real quantile,
const Real thetaFactor = 0.0,
const Size dateIndex = Null< Size >(),
const Size sampleIndex = Null< Size >() )

Returns the VaR for a

  • netting set id
  • an order order = 1: delta (order 1) order = 2: delta-gamma, with normal distribution assumption ("order 1.5") order = 3: delta-gamma (order 2)
  • a quantile
  • a theta factor, the netting set theta times this factor is added to the result
  • a date and sample index, if both are null, the VaR is computed for the T0 slice of the cube