#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. More... | |
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. More... | |
void | currencyOverrides (CrifRecord &crifRecord) const |
Override currency codes. More... | |
void | updateMapping (const CrifRecord &cr) const |
update bucket mappings More... | |
Protected Attributes | |
QuantLib::ext::shared_ptr< SimmConfiguration > | configuration_ |
Simm configuration that is used during loading of CRIF records. More... | |
std::vector< std::set< std::string > > | additionalHeaders_ |
Defines accepted column headers, beyond required and optional headers, see crifloader.cpp. More... | |
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. More... | |
static std::map< QuantLib::Size, std::set< std::string > > | optionalHeaders |
Map giving optional CRIF file headers and their allowable alternatives. More... | |
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
Definition at line 40 of file crifloader.hpp.
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.
Definition at line 46 of file crifloader.hpp.
|
virtual |
|
virtual |
Definition at line 55 of file crifloader.hpp.
const QuantLib::ext::shared_ptr< SimmConfiguration > & simmConfiguration | ( | ) |
|
protectedpure virtual |
|
protected |
Definition at line 95 of file crifloader.cpp.
|
protected |
Check if the record is a valid Simm Crif Record.
Definition at line 112 of file crifloader.cpp.
|
protected |
Override currency codes.
Definition at line 145 of file crifloader.cpp.
|
protected |
update bucket mappings
Definition at line 186 of file crifloader.cpp.
|
protected |
Simm configuration that is used during loading of CRIF records.
Definition at line 79 of file crifloader.hpp.
|
protected |
Defines accepted column headers, beyond required and optional headers, see crifloader.cpp.
Definition at line 82 of file crifloader.hpp.
|
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.
Definition at line 89 of file crifloader.hpp.
|
protected |
If true, aggregate over trade ids
Definition at line 92 of file crifloader.hpp.
|
staticprotected |
Map giving required CRIF file headers and their allowable alternatives.
Definition at line 95 of file crifloader.hpp.
|
staticprotected |
Map giving optional CRIF file headers and their allowable alternatives.
Definition at line 98 of file crifloader.hpp.