Collateral Exposure Helper. More...
#include <orea/aggregation/collatexposurehelper.hpp>
Public Types | |
enum | CalculationType { Symmetric , AsymmetricCVA , AsymmetricDVA , NoLag } |
Static Public Member Functions | |
static Real | marginRequirementCalc (const QuantLib::ext::shared_ptr< CollateralAccount > &collat, const Real &uncollatValue, const Date &simulationDate) |
template<class T > | |
static Real | estimateUncollatValue (const Date &simulationDate, const Real &npv_t0, const Date &date_t0, const vector< vector< T > > &scenPvProfiles, const unsigned &scenIndex, const vector< Date > &dateGrid) |
static void | updateMarginCall (const QuantLib::ext::shared_ptr< CollateralAccount > &collat, const Real &uncollatValue, const Date &simulationDate, const Real &accrualFactor, const CalculationType &calcType=Symmetric, const bool &eligMarginReqDateUs=true, const bool &eligMarginReqDateCtp=true) |
static Real | creditSupportAmount (const QuantLib::ext::shared_ptr< ore::data::NettingSetDefinition > &nettingSet, const Real &uncollatValueCsaCur) |
static QuantLib::ext::shared_ptr< vector< QuantLib::ext::shared_ptr< CollateralAccount > > > | collateralBalancePaths (const QuantLib::ext::shared_ptr< NettingSetDefinition > &csaDef, const Real &nettingSetPv, const Date &date_t0, const vector< vector< Real > > &nettingSetValues, const Date &nettingSet_maturity, const vector< Date > &dateGrid, const Real &csaFxTodayRate, const vector< vector< Real > > &csaFxScenarioRates, const Real &csaTodayCollatCurve, const vector< vector< Real > > &csaScenCollatCurves, const CalculationType &calcType=Symmetric, const QuantLib::ext::shared_ptr< CollateralBalance > &balance=QuantLib::ext::shared_ptr< CollateralBalance >()) |
Collateral Exposure Helper.
This class contains helper functions to aid in the calculation of collateralised exposures.
It can be used to calculate margin requirements in the presence of e.g. thresholds and minimum transfer amounts, update collateral account details with e.g. new margin call info, and return collateralised exposures to the user/invoker.
For further information refer to the detailed ORE documentation.
Definition at line 51 of file collatexposurehelper.hpp.
enum CalculationType |
Enumeration 'CalculationType' specifies how the collateralised exposures should be calculated (please refer to Sungard white-paper titled "Closing In On the CloseOut"):
Enumerator | |
---|---|
Symmetric | |
AsymmetricCVA | |
AsymmetricDVA | |
NoLag |
Definition at line 64 of file collatexposurehelper.hpp.
|
static |
Calculates CSA margin requirement, taking the following into account
Definition at line 60 of file collatexposurehelper.cpp.
|
static |
Performs linear interpolation between dates to estimate the value as of simulationDate. Flat extrapolation at far end.
Definition at line 101 of file collatexposurehelper.cpp.
|
static |
Checks if margin call is in need of update, and updates if necessary
Definition at line 155 of file collatexposurehelper.cpp.
|
static |
Computes the Credit Support Amount for the portfolio, given an unsecured exposure as input All calculations done in CSA currency
Definition at line 82 of file collatexposurehelper.cpp.
|
static |
Takes a netting set (and scenario exposures) as input and returns collateral balance paths per scenario
Definition at line 189 of file collatexposurehelper.cpp.