28#include <ql/handle.hpp>
29#include <ql/termstructures/yieldtermstructure.hpp>
30#include <ql/time/date.hpp>
74 static Real
marginRequirementCalc(
const QuantLib::ext::shared_ptr<CollateralAccount>& collat,
const Real& uncollatValue,
75 const Date& simulationDate);
83 static Real
estimateUncollatValue(
const Date& simulationDate,
const Real& npv_t0,
const Date& date_t0,
84 const vector<vector<T>>& scenPvProfiles,
const unsigned& scenIndex,
85 const vector<Date>& dateGrid);
90 static void updateMarginCall(
const QuantLib::ext::shared_ptr<CollateralAccount>& collat,
const Real& uncollatValue,
91 const Date& simulationDate,
const Real& accrualFactor,
93 const bool& eligMarginReqDateCtp =
true);
100 const QuantLib::ext::shared_ptr<ore::data::NettingSetDefinition>& nettingSet,
101 const Real& uncollatValueCsaCur);
107 static QuantLib::ext::shared_ptr<vector<QuantLib::ext::shared_ptr<CollateralAccount>>>
collateralBalancePaths(
108 const QuantLib::ext::shared_ptr<NettingSetDefinition>& csaDef,
const Real& nettingSetPv,
const Date& date_t0,
109 const vector<vector<Real>>& nettingSetValues,
const Date& nettingSet_maturity,
const vector<Date>& dateGrid,
110 const Real& csaFxTodayRate,
const vector<vector<Real>>& csaFxScenarioRates,
const Real& csaTodayCollatCurve,
112 const QuantLib::ext::shared_ptr<CollateralBalance>& balance = QuantLib::ext::shared_ptr<CollateralBalance>());
Collateral Exposure Helper.
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 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 Real marginRequirementCalc(const QuantLib::ext::shared_ptr< CollateralAccount > &collat, const Real &uncollatValue, const Date &simulationDate)
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 Account Balance (stored in base currency)
CollateralExposureHelper::CalculationType parseCollateralCalculationType(const string &s)
Convert text representation to CollateralExposureHelper::CalculationType.