44 const QuantLib::ext::shared_ptr<InputParameters>& inputs,
46 const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
48 const QuantLib::ext::shared_ptr<NPVCube>& cube,
50 const QuantLib::ext::shared_ptr<CubeInterpretation>& cubeInterpretation,
52 const QuantLib::ext::shared_ptr<AggregationScenarioData>& scenarioData,
56 Size horizonCalendarDays,
60 vector<string> regressors,
62 Size localRegressionEvaluations = 0,
64 Real localRegressionBandWidth = 0,
66 const std::map<std::string, Real>&
currentIM = std::map<std::string, Real>());
69 void build()
override;
73 const std::vector<QuantLib::ext::shared_ptr<ore::data::Report>>& dimRegReports);
82 Array
regressorArray(
string nettingSet, Size dateIndex, Size sampleIndex);
99inline bool lessThan(
const Array& a,
const Array& b) {
100 QL_REQUIRE(a.size() > 0,
"array a is empty");
101 QL_REQUIRE(b.size() > 0,
"array a is empty");
Dynamic Initial Margin Calculator base class.
const map< string, Real > & currentIM() const
t0 IM by netting set, as provided as an arguments
Dynamic Initial Margin Calculator using polynomial regression.
map< string, vector< vector< Array > > > regressorArray_
const vector< Real > & zeroOrderResults(const string &nettingSet)
vector< string > regressors_
void exportDimRegression(const std::string &nettingSet, const std::vector< Size > &timeSteps, const std::vector< QuantLib::ext::shared_ptr< ore::data::Report > > &dimRegReports)
map< string, vector< vector< Real > > > nettingSetLocalDIM_
Real localRegressionBandWidth_
void exportDimEvolution(ore::data::Report &dimEvolutionReport) const override
DIM evolution report.
map< string, vector< Real > > nettingSetSimpleDIMh_
Array regressorArray(string nettingSet, Size dateIndex, Size sampleIndex)
Compile the array of DIM regressors for the specified netting set, date and sample index.
const vector< vector< Real > > & localRegressionResults(const string &nettingSet)
void build() override
Compute dynamic initial margin along all paths and fill result structures.
const vector< Real > & simpleResultsLower(const string &nettingSet)
const vector< Real > & simpleResultsUpper(const string &nettingSet)
map< string, vector< Real > > nettingSetZeroOrderDIM_
Size localRegressionEvaluations_
map< string, Real > unscaledCurrentDIM() override
Model implied t0 DIM by netting set, does not need a call to build() before.
map< string, vector< Real > > nettingSetSimpleDIMp_
Dynamic Initial Margin calculator base class.
bool lessThan(const string &s1, const string &s2)