#include <orea/simm/crifloader.hpp>
Public Member Functions | |
CrifLoader (const QuantLib::ext::shared_ptr< SimmConfiguration > &configuration, const std::vector< std::set< std::string >> &additionalHeaders={}, bool updateMapper=false, bool aggregateTrades=true) | |
virtual | ~CrifLoader () |
virtual Crif | loadCrif () |
const QuantLib::ext::shared_ptr< SimmConfiguration > & | simmConfiguration () |
SIMM configuration getter. | |
Protected Member Functions | |
virtual Crif | loadCrifImpl ()=0 |
void | addRecordToCrif (Crif &crif, CrifRecord &&recordToAdd) const |
void | validateSimmRecord (const CrifRecord &cr) const |
Check if the record is a valid Simm Crif Record. | |
void | currencyOverrides (CrifRecord &crifRecord) const |
Override currency codes. | |
void | updateMapping (const CrifRecord &cr) const |
update bucket mappings | |
Protected Attributes | |
QuantLib::ext::shared_ptr< SimmConfiguration > | configuration_ |
Simm configuration that is used during loading of CRIF records. | |
std::vector< std::set< std::string > > | additionalHeaders_ |
Defines accepted column headers, beyond required and optional headers, see crifloader.cpp. | |
bool | updateMapper_ |
bool | aggregateTrades_ |
Static Protected Attributes | |
static std::map< QuantLib::Size, std::set< std::string > > | requiredHeaders |
Map giving required CRIF file headers and their allowable alternatives. | |
static std::map< QuantLib::Size, std::set< std::string > > | optionalHeaders |
Map giving optional CRIF file headers and their allowable alternatives. | |
A class for loading CRIF records. The records are aggregated and stored in a SimmNetSensitivities object so that they can later be used in a SIMM calculation
CrifLoader | ( | const QuantLib::ext::shared_ptr< SimmConfiguration > & | configuration, |
const std::vector< std::set< std::string >> & | additionalHeaders = {} , |
||
bool | updateMapper = false , |
||
bool | aggregateTrades = true |
||
) |
Constructor We set the trade ID to an empty string if we are going to be netting at portfolio level. This is the default. To override this the flag keepTradeId
may be set to true.
|
virtual |
Destructor
|
protected |
If true, the SIMM configuration's bucket mapper is updated during the CRIF loading with the mapping from SIMM qualifier to SIMM bucket. This is useful when consuming CRIF files from elsewhere in that it allows for using the mapping that is already present in the external file.
|
protected |
If true, aggregate over trade ids