Logo
Reference manual - version orea_version
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CrifLoader Class Referenceabstract

#include <orea/simm/crifloader.hpp>

+ Inheritance diagram for CrifLoader:

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< SimmConfigurationconfiguration_
 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.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CrifLoader()

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.

◆ ~CrifLoader()

virtual ~CrifLoader ( )
virtual

Destructor

Member Data Documentation

◆ updateMapper_

bool updateMapper_
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.

◆ aggregateTrades_

bool aggregateTrades_
protected

If true, aggregate over trade ids