130 typedef std::tuple<std::string, NettingSetDetails, ProductClass, RiskType, std::string, std::string, std::string, std::string, std::string, std::string>
SimmAmountCcyKey;
143 mutable QuantLib::Real
amount = QuantLib::Null<QuantLib::Real>();
144 mutable QuantLib::Real
amountUsd = QuantLib::Null<QuantLib::Real>();
181 std::map<std::string, std::string> extraFields = {})
187 for (
const auto& [key, value] : extraFields) {
213 return riskType != RiskType::AddOnNotionalFactor &&
214 riskType != RiskType::ProductClassMultiplier;
218 return riskType == RiskType::AddOnFixedAmount ||
219 riskType == RiskType::AddOnNotionalFactor ||
220 riskType == RiskType::ProductClassMultiplier;
228 case RiskType::GIRR_CURV:
229 case RiskType::CSR_NS_CURV:
230 case RiskType::CSR_SNC_CURV:
231 case RiskType::CSR_SC_CURV:
232 case RiskType::EQ_CURV:
233 case RiskType::COMM_CURV:
234 case RiskType::FX_CURV:
256 if (
const std::string* vstr = std::get_if<std::string>(&it->second)) {
258 }
else if (
const double* vdouble = std::get_if<double>(&it->second)) {
261 const bool* vbool = std::get_if<bool>(&it->second);
270 double value = QuantLib::Null<double>();
272 if (
const double* vdouble = std::get_if<double>(&it->second)) {
274 }
else if (
const std::string* vstr = std::get_if<std::string>(&it->second)) {
285 if (
const bool* vbool = std::get_if<bool>(&it->second)) {
287 }
else if (
const std::string* vstr = std::get_if<std::string>(&it->second)) {
const string & nettingSetId() const
SafeStack< ValueType > value
bool tryParseReal(const string &s, QuantLib::Real &result)
bool parseBool(const string &s)
Real parseReal(const string &s)
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
CrifRecord::CurvatureScenario parseFrtbCurvatureScenario(const std::string &scenario)
CrifRecord::RiskType parseRiskType(const string &rt)
CrifRecord::ProductClass parseProductClass(const string &pc)
std::string to_string(const LocationInfo &l)
std::string amountCurrency
std::map< std::string, std::variant< std::string, double, bool > > additionalFields
bool hasAmountCcy() const
std::string resultCurrency
std::string creditQuality
bool requiresAmountUsd() const
std::string legalEntityId
std::string getAdditionalFieldAsStr(const std::string &fieldName) const
bool operator<(const CrifRecord &cr) const
Define how CRIF records are compared.
std::string collectRegulations
static std::vector< std::set< std::string > > additionalHeaders
static bool amountCcyEQCompare(const CrifRecord &cr1, const CrifRecord &cr2)
ProductClass productClass
bool isFrtbCurvatureRisk() const
const SimmAmountCcyKey getSimmAmountCcyKey() const
QuantLib::Real amountResultCcy
static bool amountCcyLTCompare(const CrifRecord &cr1, const CrifRecord &cr2)
bool getAdditionalFieldAsBool(const std::string &fieldName) const
std::string agreementType
CurvatureScenario frtbCurveatureScenario() const
std::tuple< std::string, NettingSetDetails, ProductClass, RiskType, std::string, std::string, std::string, std::string, std::string, std::string > SimmAmountCcyKey
std::string trancheThickness
CrifRecord(std::string tradeId, std::string tradeType, NettingSetDetails nettingSetDetails, ProductClass productClass, RiskType riskType, std::string qualifier, std::string bucket, std::string label1, std::string label2, std::string amountCurrency, QuantLib::Real amount, QuantLib::Real amountUsd, std::string imModel="", std::string collectRegulations="", std::string postRegulations="", std::string endDate="", std::map< std::string, std::string > extraFields={})
CrifRecord(std::string tradeId, std::string tradeType, std::string portfolioId, ProductClass productClass, RiskType riskType, std::string qualifier, std::string bucket, std::string label1, std::string label2, std::string amountCurrency, QuantLib::Real amount, QuantLib::Real amountUsd, std::string imModel="", std::string collectRegulations="", std::string postRegulations="", std::string endDate="", std::map< std::string, std::string > additionalFields={})
std::string coveredBondInd
NettingSetDetails nettingSetDetails
double getAdditionalFieldAsDouble(const std::string &fieldName) const
bool hasAmountUsd() const
bool isSimmParameter() const
std::string initialMarginType
CurvatureScenario
There are two entries for curvature risk in frtb, a up and down shift.
std::string postRegulations
bool operator==(const CrifRecord &cr) const
bool hasAmountResultCcy() const
bool hasResultCcy() const