36#include <ql/time/date.hpp>
38#include <ql/shared_ptr.hpp>
57 const QuantLib::ext::shared_ptr<InputParameters>& inputs,
59 const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
61 const QuantLib::ext::shared_ptr<NPVCube>& cube,
63 const QuantLib::ext::shared_ptr<CubeInterpretation>& cubeInterpretation,
65 const QuantLib::ext::shared_ptr<AggregationScenarioData>& scenarioData,
69 Size horizonCalendarDays = 14,
71 const std::map<std::string, Real>&
currentIM = std::map<std::string, Real>());
91 const vector<vector<Real>>&
dynamicIM(
const string& nettingSet);
94 const vector<vector<Real>>&
cashFlow(
const string& nettingSet);
97 const vector<Real>&
expectedIM(
const string& nettingSet);
103 QuantLib::ext::shared_ptr<InputParameters>
inputs_;
this class holds data associated to scenarios
Dynamic Initial Margin Calculator base class.
map< string, vector< vector< Real > > > nettingSetNPV_
Size horizonCalendarDays_
virtual map< string, Real > unscaledCurrentDIM()=0
Model implied t0 DIM by netting set, does not need a call to build() before.
const vector< vector< Real > > & dynamicIM(const string &nettingSet)
DIM matrix by date and sample index for the specified netting set.
const map< string, Real > & currentIM() const
t0 IM by netting set, as provided as an arguments
virtual void build()=0
Compute dynamic initial margin along all paths and fill result structures.
const QuantLib::ext::shared_ptr< NPVCube > & dimCube()
DIM by nettingSet, date, sample returned as a regular NPV cube.
std::set< string > nettingSetIds_
map< string, vector< vector< Real > > > nettingSetCloseOutNPV_
map< string, vector< vector< Real > > > nettingSetDeltaNPV_
map< string, Real > nettingSetScaling_
virtual ~DynamicInitialMarginCalculator()
map< string, vector< Real > > nettingSetExpectedDIM_
QuantLib::ext::shared_ptr< Portfolio > portfolio_
virtual void exportDimEvolution(ore::data::Report &dimEvolutionReport) const
DIM evolution report.
QuantLib::ext::shared_ptr< AggregationScenarioData > scenarioData_
const std::map< std::string, Real > & getInitialMarginScaling()
Get the implied netting set specific scaling factors.
QuantLib::ext::shared_ptr< CubeInterpretation > cubeInterpretation_
QuantLib::ext::shared_ptr< NPVCube > dimCube_
map< string, vector< vector< Real > > > nettingSetFLOW_
map< string, Real > currentIM_
const vector< Real > & expectedIM(const string &nettingSet)
Expected DIM vector by date for the specified netting set.
QuantLib::ext::shared_ptr< InputParameters > inputs_
map< string, vector< vector< Real > > > nettingSetDIM_
QuantLib::ext::shared_ptr< NPVCube > cube_
const vector< vector< Real > > & cashFlow(const string &nettingSet)
Cash flow matrix by date and sample index for the specified netting set.
Collateral Exposure Helper Functions (stored in base currency)
class describing the layout of an npv cube and aggregation scenario data
A cube implementation that stores the cube in memory.