48 const std::string& amountCcy,
const QuantLib::Real& amountUsd,
54 if (rt == RiskType::PV) {
73 ||
notional == QuantLib::Null<QuantLib::Real>()
84 QuantLib::Real
notional = QuantLib::Null<QuantLib::Real>();
86 QuantLib::Real
notionalUsd = QuantLib::Null<QuantLib::Real>();
111 const QuantLib::ext::shared_ptr<ore::data::Market> market =
nullptr,
112 const bool determineWinningRegulations =
true,
const bool enforceIMRegulations =
false,
113 const bool quiet =
false,
114 const std::map<
SimmSide, std::set<NettingSetDetails>>& hasSEC =
115 std::map<
SimmSide, std::set<NettingSetDetails>>(),
116 const std::map<
SimmSide, std::set<NettingSetDetails>>& hasCFTC =
117 std::map<
SimmSide, std::set<NettingSetDetails>>());
128 const std::map<SimmSide, std::map<ore::data::NettingSetDetails, string>>&
winningRegulations()
const;
133 const std::map<SimmSide, std::map<ore::data::NettingSetDetails, std::map<std::string, IMScheduleResults>>>&
imScheduleSummaryResults()
const;
137 const std::map<SimmSide, std::map<ore::data::NettingSetDetails, std::pair<std::string, IMScheduleResults>>>&
166 QuantLib::ext::shared_ptr<ore::data::Market>
market_;
181 std::map<SimmSide, std::map<ore::data::NettingSetDetails, std::map<std::string, IMScheduleResults>>>
imScheduleResults_;
185 std::map<SimmSide, std::map<ore::data::NettingSetDetails, std::pair<std::string, IMScheduleResults>>>
finalImScheduleResults_;
189 std::map<SimmSide, std::map<ore::data::NettingSetDetails, std::map<std::string, set<string>>>>
tradeIds_;
203 std::map<SimmSide, std::map<ore::data::NettingSetDetails, std::map<std::string, std::map<std::string, IMScheduleTradeData>>>>
nettingSetRegTradeData_;
205 std::map<IMScheduleLabel, QuantLib::Real>
multiplierMap_ = std::map<IMScheduleLabel, QuantLib::Real>({
238 const QuantLib::Real& grossRC = QuantLib::Null<QuantLib::Real>(),
239 const QuantLib::Real& netRC = QuantLib::Null<QuantLib::Real>(),
240 const QuantLib::Real& ngr = QuantLib::Null<QuantLib::Real>(),
241 const QuantLib::Real& scheduleIM = QuantLib::Null<QuantLib::Real>());
void populateFinalResults()
std::map< SimmSide, std::map< ore::data::NettingSetDetails, std::map< std::string, IMScheduleResults > > > imScheduleResults_
Containers, one for call and post, with an IMScheduleResults object for each regulation under each po...
const std::map< SimmSide, std::set< std::string > > finalTradeIds() const
Give back the set of portfolio IDs and trade IDs for which we have IM results.
const std::map< SimmSide, std::map< ore::data::NettingSetDetails, std::map< std::string, IMScheduleResults > > > & imScheduleSummaryResults() const
const IMScheduleTradeData & finalImScheduleTradeResults(const std::string &tradeId) const
const std::map< std::string, std::vector< IMScheduleTradeData > > & imScheduleTradeResults() const
std::map< SimmSide, std::set< NettingSetDetails > > hasCFTC_
std::map< SimmSide, std::set< NettingSetDetails > > hasSEC_
CrifRecord::RiskType RiskType
CrifRecord::ProductClass ProductClass
std::map< SimmSide, std::map< ore::data::NettingSetDetails, std::string > > winningRegulations_
Regulation with highest IM for each given netting set.
std::map< ore::data::NettingSetDetails, bool > collectRegsIsEmpty_
For each netting set, whether all CRIF records' collect regulations are empty.
const std::map< SimmSide, std::map< ore::data::NettingSetDetails, string > > & winningRegulations() const
std::map< SimmSide, std::map< ore::data::NettingSetDetails, std::pair< std::string, IMScheduleResults > > > finalImScheduleResults_
Containers, one for call and post, with an IMScheduleResults object for each portfolio ID.
std::map< ore::data::NettingSetDetails, bool > postRegsIsEmpty_
For each netting set, whether all CRIF records' post regulations are empty.
const std::map< SimmSide, std::map< ore::data::NettingSetDetails, std::pair< std::string, IMScheduleResults > > > & finalImScheduleSummaryResults() const
SimmConfiguration::Regulation Regulation
static const IMScheduleLabel label(const ProductClass &productClass, const QuantLib::Real &maturity)
std::map< SimmSide, std::map< ore::data::NettingSetDetails, std::map< std::string, std::map< std::string, IMScheduleTradeData > > > > nettingSetRegTradeData_
Container for trade data, taking into account regulations applicable to each netting set.
QuantLib::ext::shared_ptr< ore::data::Market > market_
Market data for FX rates to use for converting amounts to USD.
const std::string & calculationCurrency() const
Return the calculator's calculation currency.
bool quiet_
If true, no logging is written out.
std::map< std::string, std::vector< IMScheduleTradeData > > finalTradeData_
static const std::string labelString(const IMScheduleLabel &label)
void populateFinalResults(const std::map< SimmSide, std::map< ore::data::NettingSetDetails, std::string > > &winningRegulations)
std::string calculationCcy_
The SIMM calculation currency i.e. the currency of the SIMM results.
ore::analytics::Crif crif_
The net sensitivities used in the calculation.
std::map< SimmSide, set< string > > finalTradeIds_
void collectTradeData(const CrifRecord &cr, const bool enforceIMRegulations)
Collect trade data as defined by the CRIF records.
void add(const SimmSide &side, const ore::data::NettingSetDetails &nsd, const std::string ®ulation, const CrifRecord::ProductClass &pc, const std::string &ccy, const QuantLib::Real &grossIM, const QuantLib::Real &grossRC=QuantLib::Null< QuantLib::Real >(), const QuantLib::Real &netRC=QuantLib::Null< QuantLib::Real >(), const QuantLib::Real &ngr=QuantLib::Null< QuantLib::Real >(), const QuantLib::Real &scheduleIM=QuantLib::Null< QuantLib::Real >())
Add a margin result to either call or post results container depending on the SimmSide parameter.
std::map< SimmSide, std::map< ore::data::NettingSetDetails, std::map< std::string, set< string > > > > tradeIds_
Container for keeping track of what trade IDs belong to each regulation.
QuantLib::Real multiplier(const IMScheduleLabel &label)
void populateResults(const ore::data::NettingSetDetails &nsd, const string ®ulation, const SimmSide &side)
const std::map< std::string, IMScheduleTradeData > & finalImScheduleTradeResults() const
std::map< IMScheduleLabel, QuantLib::Real > multiplierMap_
SimmConfiguration::SimmSide SimmSide
SimmSide
Enum indicating the relevant side of the SIMM calculation.
Regulation
SIMM regulators.
Struct for holding a CRIF record.
Class for holding IMSchedule results.
std::string presentValueCcy
bool missingNotionalData()
QuantLib::Real presentValue
QuantLib::Real multiplier
QuantLib::Real notionalUsd
QuantLib::Real grossMarginUsd
std::string collectRegulations
QuantLib::Real grossMarginCalc
IMScheduleTradeData(const std::string &tradeId, const ore::data::NettingSetDetails &nettingSetDetails, const RiskType &rt, const CrifRecord::ProductClass &pc, const QuantLib::Real &amount, const std::string &amountCcy, const QuantLib::Real &amountUsd, const QuantLib::Date &endDate, const std::string &calculationCcy, const std::string &collectRegulations, const std::string &postRegulations)
std::string calculationCcy
ore::data::NettingSetDetails nettingSetDetails
CrifRecord::ProductClass productClass
QuantLib::Real presentValueUsd
std::string postRegulations
QuantLib::Real notionalCalc
QuantLib::Real presentValueCalc