#include <orea/simm/crifrecord.hpp>
Public Member Functions | |
CrifRecord () | |
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={}) | |
RecordType | type () const |
bool | hasAmountCcy () const |
bool | hasAmount () const |
bool | hasAmountUsd () const |
bool | hasResultCcy () const |
bool | hasAmountResultCcy () const |
bool | requiresAmountUsd () const |
bool | isSimmParameter () const |
bool | isEmpty () const |
bool | isFrtbCurvatureRisk () const |
CurvatureScenario | frtbCurveatureScenario () const |
std::string | getAdditionalFieldAsStr (const std::string &fieldName) const |
double | getAdditionalFieldAsDouble (const std::string &fieldName) const |
bool | getAdditionalFieldAsBool (const std::string &fieldName) const |
const SimmAmountCcyKey | getSimmAmountCcyKey () const |
bool | operator< (const CrifRecord &cr) const |
Define how CRIF records are compared. More... | |
bool | operator== (const CrifRecord &cr) const |
Static Public Member Functions | |
static bool | amountCcyLTCompare (const CrifRecord &cr1, const CrifRecord &cr2) |
static bool | amountCcyEQCompare (const CrifRecord &cr1, const CrifRecord &cr2) |
Public Attributes | |
std::string | tradeId |
std::string | portfolioId |
ProductClass | productClass = ProductClass::Empty |
RiskType | riskType = RiskType::Notional |
std::string | qualifier |
std::string | bucket |
std::string | label1 |
std::string | label2 |
std::string | amountCurrency |
QuantLib::Real | amount = QuantLib::Null<QuantLib::Real>() |
QuantLib::Real | amountUsd = QuantLib::Null<QuantLib::Real>() |
std::string | resultCurrency |
QuantLib::Real | amountResultCcy = QuantLib::Null<QuantLib::Real>() |
std::string | tradeType |
std::string | agreementType |
std::string | callType |
std::string | initialMarginType |
std::string | legalEntityId |
NettingSetDetails | nettingSetDetails |
std::string | imModel |
std::string | collectRegulations |
std::string | postRegulations |
std::string | endDate |
std::string | label3 |
std::string | creditQuality |
std::string | longShortInd |
std::string | coveredBondInd |
std::string | trancheThickness |
std::string | bb_rw |
std::map< std::string, std::variant< std::string, double, bool > > | additionalFields |
Static Public Attributes | |
static std::vector< std::set< std::string > > | additionalHeaders = {} |
A container for holding single CRIF records or aggregated CRIF records. A CRIF record is a row of the CRIF file outlined in the document: ISDA SIMM Methodology, Risk Data Standards. Version 1.36: 1 February 2017. or an updated version thereof.
Definition at line 40 of file crifrecord.hpp.
typedef std::tuple<std::string, NettingSetDetails, ProductClass, RiskType, std::string, std::string, std::string, std::string, std::string, std::string> SimmAmountCcyKey |
Definition at line 130 of file crifrecord.hpp.
|
strong |
Enumerator | |
---|---|
SIMM | |
FRTB | |
Generic |
Definition at line 42 of file crifrecord.hpp.
|
strong |
Risk types plus an All type for convenience Internal methods rely on the last element being 'All' Note that the risk type inflation has to be treated as an additional, single tenor bucket in IRCurve
Definition at line 53 of file crifrecord.hpp.
|
strong |
Product class types in SIMM plus an All type for convenience Internal methods rely on the last element being 'All'
Enumerator | |
---|---|
RatesFX | |
Rates | |
FX | |
Credit | |
Equity | |
Commodity | |
Empty | |
Other | |
AddOnNotionalFactor | |
AddOnFixedAmount | |
All |
Definition at line 111 of file crifrecord.hpp.
|
strong |
There are two entries for curvature risk in frtb, a up and down shift.
Enumerator | |
---|---|
Empty | |
Up | |
Down |
Definition at line 126 of file crifrecord.hpp.
CrifRecord | ( | ) |
Definition at line 174 of file crifrecord.hpp.
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 = {} |
||
) |
Definition at line 176 of file crifrecord.hpp.
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 = {} |
||
) |
Definition at line 192 of file crifrecord.hpp.
CrifRecord::RecordType type | ( | ) | const |
Definition at line 186 of file crifrecord.cpp.
bool hasAmountCcy | ( | ) | const |
bool hasAmount | ( | ) | const |
bool hasAmountUsd | ( | ) | const |
bool hasResultCcy | ( | ) | const |
bool hasAmountResultCcy | ( | ) | const |
Definition at line 208 of file crifrecord.hpp.
bool requiresAmountUsd | ( | ) | const |
Definition at line 212 of file crifrecord.hpp.
bool isSimmParameter | ( | ) | const |
Definition at line 217 of file crifrecord.hpp.
bool isEmpty | ( | ) | const |
Definition at line 223 of file crifrecord.hpp.
bool isFrtbCurvatureRisk | ( | ) | const |
Definition at line 226 of file crifrecord.hpp.
CurvatureScenario frtbCurveatureScenario | ( | ) | const |
Definition at line 241 of file crifrecord.hpp.
std::string getAdditionalFieldAsStr | ( | const std::string & | fieldName | ) | const |
Definition at line 252 of file crifrecord.hpp.
double getAdditionalFieldAsDouble | ( | const std::string & | fieldName | ) | const |
Definition at line 268 of file crifrecord.hpp.
bool getAdditionalFieldAsBool | ( | const std::string & | fieldName | ) | const |
Definition at line 281 of file crifrecord.hpp.
const SimmAmountCcyKey getSimmAmountCcyKey | ( | ) | const |
Definition at line 294 of file crifrecord.hpp.
bool operator< | ( | const CrifRecord & | cr | ) | const |
Define how CRIF records are compared.
Definition at line 300 of file crifrecord.hpp.
|
static |
Definition at line 317 of file crifrecord.hpp.
bool operator== | ( | const CrifRecord & | cr | ) | const |
Definition at line 335 of file crifrecord.hpp.
|
static |
Definition at line 351 of file crifrecord.hpp.
std::string tradeId |
Definition at line 134 of file crifrecord.hpp.
std::string portfolioId |
Definition at line 135 of file crifrecord.hpp.
ProductClass productClass = ProductClass::Empty |
Definition at line 136 of file crifrecord.hpp.
RiskType riskType = RiskType::Notional |
Definition at line 137 of file crifrecord.hpp.
std::string qualifier |
Definition at line 138 of file crifrecord.hpp.
std::string bucket |
Definition at line 139 of file crifrecord.hpp.
std::string label1 |
Definition at line 140 of file crifrecord.hpp.
std::string label2 |
Definition at line 141 of file crifrecord.hpp.
std::string amountCurrency |
Definition at line 142 of file crifrecord.hpp.
|
mutable |
Definition at line 143 of file crifrecord.hpp.
|
mutable |
Definition at line 144 of file crifrecord.hpp.
std::string resultCurrency |
Definition at line 147 of file crifrecord.hpp.
|
mutable |
Definition at line 148 of file crifrecord.hpp.
std::string tradeType |
Definition at line 151 of file crifrecord.hpp.
std::string agreementType |
Definition at line 152 of file crifrecord.hpp.
std::string callType |
Definition at line 153 of file crifrecord.hpp.
std::string initialMarginType |
Definition at line 154 of file crifrecord.hpp.
std::string legalEntityId |
Definition at line 155 of file crifrecord.hpp.
NettingSetDetails nettingSetDetails |
Definition at line 156 of file crifrecord.hpp.
|
mutable |
Definition at line 157 of file crifrecord.hpp.
|
mutable |
Definition at line 158 of file crifrecord.hpp.
|
mutable |
Definition at line 159 of file crifrecord.hpp.
std::string endDate |
Definition at line 160 of file crifrecord.hpp.
std::string label3 |
Definition at line 163 of file crifrecord.hpp.
std::string creditQuality |
Definition at line 164 of file crifrecord.hpp.
std::string longShortInd |
Definition at line 165 of file crifrecord.hpp.
std::string coveredBondInd |
Definition at line 166 of file crifrecord.hpp.
std::string trancheThickness |
Definition at line 167 of file crifrecord.hpp.
std::string bb_rw |
Definition at line 168 of file crifrecord.hpp.
std::map<std::string, std::variant<std::string, double, bool> > additionalFields |
Definition at line 171 of file crifrecord.hpp.
|
static |
Definition at line 369 of file crifrecord.hpp.