XVA Calculator base class. More...
#include <orea/aggregation/nettedexposurecalculator.hpp>
Public Types | |
enum | ExposureIndex { EPE , ENE } |
Public Member Functions | |
NettedExposureCalculator (const QuantLib::ext::shared_ptr< Portfolio > &portfolio, const QuantLib::ext::shared_ptr< Market > &market, const QuantLib::ext::shared_ptr< NPVCube > &cube, const string &baseCurrency, const string &configuration, const Real quantile, const CollateralExposureHelper::CalculationType calcType, const bool multiPath, const QuantLib::ext::shared_ptr< NettingSetManager > &nettingSetManager, const QuantLib::ext::shared_ptr< CollateralBalances > &collateralBalances, const map< string, vector< vector< Real >>> &nettingSetDefaultValue, const map< string, vector< vector< Real >>> &nettingSetCloseOutValue, const map< string, vector< vector< Real >>> &nettingSetMporPositiveFlow, const map< string, vector< vector< Real >>> &nettingSetMporNegativeFlow, const QuantLib::ext::shared_ptr< AggregationScenarioData > &scenarioData, const QuantLib::ext::shared_ptr< CubeInterpretation > cubeInterpretation, const bool applyInitialMargin, const QuantLib::ext::shared_ptr< DynamicInitialMarginCalculator > &dimCalculator, const bool fullInitialCollateralisation, const bool marginalAllocation, const Real marginalAllocationLimit, const QuantLib::ext::shared_ptr< NPVCube > &tradeExposureCube, const Size allocatedEpeIndex, const Size allocatedEneIndex, const bool flipViewXVA, const bool withMporStickyDate, const MporCashFlowMode mporCashFlowMode) | |
const QuantLib::ext::shared_ptr< NPVCube > & | exposureCube () |
const QuantLib::ext::shared_ptr< NPVCube > & | nettedCube () |
virtual void | build () |
Compute exposures along all paths and fill result structures. | |
vector< Real > | epe (const string &nid) |
vector< Real > | ene (const string &nid) |
vector< Real > & | ee_b (const string &nid) |
vector< Real > & | eee_b (const string &nid) |
vector< Real > & | pfe (const string &nid) |
vector< Real > & | expectedCollateral (const string &nid) |
vector< Real > & | colvaIncrements (const string &nid) |
vector< Real > & | collateralFloorIncrements (const string &nid) |
Real & | epe_b (const string &nid) |
Real & | eepe_b (const string &nid) |
Real & | colva (const string &nid) |
Real & | collateralFloor (const string &nid) |
const string & | counterparty (const string nettingSetId) |
const map< string, string > & | counterpartyMap () |
map< string, vector< vector< Real > > > | nettingSetCloseOutValue () |
map< string, vector< vector< Real > > > | nettingSetDefaultValue () |
map< string, vector< vector< Real > > > | nettingSetMporPositiveFlow () |
map< string, vector< vector< Real > > > | nettingSetMporNegativeFlow () |
Public Attributes | |
const Size | EXPOSURE_CUBE_DEPTH = 3 |
Protected Member Functions | |
vector< Real > | getMeanExposure (const string &tid, ExposureIndex index) |
QuantLib::ext::shared_ptr< vector< QuantLib::ext::shared_ptr< CollateralAccount > > > | collateralPaths (const string &nettingSetId, const Real &nettingSetValueToday, const vector< vector< Real >> &nettingSetValue, const Date &nettingSetMaturity) |
Protected Attributes | |
QuantLib::ext::shared_ptr< Portfolio > | portfolio_ |
QuantLib::ext::shared_ptr< Market > | market_ |
QuantLib::ext::shared_ptr< NPVCube > | cube_ |
string | baseCurrency_ |
string | configuration_ |
Real | quantile_ |
CollateralExposureHelper::CalculationType | calcType_ |
bool | multiPath_ |
const QuantLib::ext::shared_ptr< NettingSetManager > | nettingSetManager_ |
const QuantLib::ext::shared_ptr< CollateralBalances > | collateralBalances_ |
map< string, vector< vector< Real > > > | nettingSetDefaultValue_ |
map< string, vector< vector< Real > > > | nettingSetCloseOutValue_ |
map< string, vector< vector< Real > > > | nettingSetMporPositiveFlow_ |
map< string, vector< vector< Real > > > | nettingSetMporNegativeFlow_ |
const QuantLib::ext::shared_ptr< AggregationScenarioData > | scenarioData_ |
QuantLib::ext::shared_ptr< CubeInterpretation > | cubeInterpretation_ |
const bool | applyInitialMargin_ |
const QuantLib::ext::shared_ptr< DynamicInitialMarginCalculator > | dimCalculator_ |
const bool | fullInitialCollateralisation_ |
const bool | marginalAllocation_ |
const Real | marginalAllocationLimit_ |
QuantLib::ext::shared_ptr< NPVCube > | tradeExposureCube_ |
const Size | allocatedEpeIndex_ |
const Size | allocatedEneIndex_ |
const bool | flipViewXVA_ |
QuantLib::ext::shared_ptr< NPVCube > | nettedCube_ |
QuantLib::ext::shared_ptr< NPVCube > | exposureCube_ |
map< string, string > | counterpartyMap_ |
map< string, std::vector< Real > > | ee_b_ |
map< string, std::vector< Real > > | eee_b_ |
map< string, std::vector< Real > > | pfe_ |
map< string, std::vector< Real > > | expectedCollateral_ |
map< string, std::vector< Real > > | colvaInc_ |
map< string, std::vector< Real > > | eoniaFloorInc_ |
map< string, Real > | epe_b_ |
map< string, Real > | eepe_b_ |
map< string, Real > | colva_ |
map< string, Real > | collateralFloor_ |
bool | withMporStickyDate_ |
MporCashFlowMode | mporCashFlowMode_ |
XVA Calculator base class.
Derived classes implement a constructor with the relevant additional input data and a build function that performs the XVA calculations for all netting sets and along all paths.