XVA Calculator base class. More...
#include <orea/aggregation/exposurecalculator.hpp>
Public Types | |
enum | ExposureIndex { EPE = 0 , ENE , allocatedEPE , allocatedENE } |
Public Member Functions | |
ExposureCalculator (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< Market > &market, const bool exerciseNextBreak, const string &baseCurrency, const string &configuration, const Real quantile, const CollateralExposureHelper::CalculationType calcType, const bool multiPath, const bool flipViewXVA) | |
virtual void | build () |
Compute exposures along all paths and fill result structures. | |
QuantLib::ext::shared_ptr< Portfolio > | portfolio () |
QuantLib::ext::shared_ptr< NPVCube > | npvCube () |
QuantLib::ext::shared_ptr< CubeInterpretation > | cubeInterpretation () |
QuantLib::ext::shared_ptr< Market > | market () |
bool | exerciseNextBreak () |
string | baseCurrency () |
string | configuration () |
Real | quantile () |
CollateralExposureHelper::CalculationType | calcType () |
bool | isRegularCubeStorage () |
bool | multiPath () |
vector< Date > | dates () |
Date | today () |
DayCounter | dc () |
vector< string > | nettingSetIds () |
map< string, Real > | nettingSetValueToday () |
map< string, Date > | nettingSetMaturity () |
vector< Real > | times () |
const QuantLib::ext::shared_ptr< NPVCube > & | exposureCube () |
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 () |
vector< Real > | epe (const string &tid) |
vector< Real > | ene (const string &tid) |
vector< Real > | allocatedEpe (const string &tid) |
vector< Real > | allocatedEne (const string &tid) |
vector< Real > & | ee_b (const string &tid) |
vector< Real > & | eee_b (const string &tid) |
vector< Real > & | pfe (const string &tid) |
Real & | epe_b (const string &tid) |
Real & | eepe_b (const string &tid) |
Public Attributes | |
const Size | EXPOSURE_CUBE_DEPTH = 4 |
Protected Member Functions | |
vector< Real > | getMeanExposure (const string &tid, ExposureIndex index) |
Protected Attributes | |
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< Market > | market_ |
const bool | exerciseNextBreak_ |
const string | baseCurrency_ |
const string | configuration_ |
const Real | quantile_ |
const CollateralExposureHelper::CalculationType | calcType_ |
const bool | multiPath_ |
bool | isRegularCubeStorage_ |
vector< Date > | dates_ |
const Date | today_ |
const DayCounter | dc_ |
vector< string > | nettingSetIds_ |
map< string, Real > | nettingSetValueToday_ |
map< string, Date > | nettingSetMaturity_ |
vector< Real > | times_ |
QuantLib::ext::shared_ptr< NPVCube > | exposureCube_ |
map< string, vector< vector< Real > > > | nettingSetDefaultValue_ |
map< string, vector< vector< Real > > > | nettingSetCloseOutValue_ |
map< string, vector< vector< Real > > > | nettingSetMporPositiveFlow_ |
map< string, vector< vector< Real > > > | nettingSetMporNegativeFlow_ |
map< string, std::vector< Real > > | ee_b_ |
map< string, std::vector< Real > > | eee_b_ |
map< string, std::vector< Real > > | pfe_ |
map< string, Real > | epe_b_ |
map< string, Real > | eepe_b_ |
bool | flipViewXVA_ |
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.
ExposureCalculator | ( | 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< Market > & | market, | ||
const bool | exerciseNextBreak, | ||
const string & | baseCurrency, | ||
const string & | configuration, | ||
const Real | quantile, | ||
const CollateralExposureHelper::CalculationType | calcType, | ||
const bool | multiPath, | ||
const bool | flipViewXVA | ||
) |
portfolio | Driving portfolio consistent with the cube below |
cube | NPV cube resulting from the Monte Carlo simulation loop |
cubeInterpretation | Interpreter for cube storage (where to find which data items) |
market | Market data object to access e.g. discounting and funding curves |
exerciseNextBreak | Flag to indicate exposure termination at the next break date |
baseCurrency | Expression currency for all results |
configuration | Market configuration to use |
quantile | Quantile for Potential Future Exposure output |
calcType | Collateral calculation type to be used, see class CollateralExposureHelper |
multiPath | Flag to indicate exposure evaluation with dynamic credit |
flipViewXVA | Flag to indicate flipped xva calculation |