Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CrifConfiguration Class Referenceabstract

#include <orea/simm/crifconfiguration.hpp>

+ Inheritance diagram for CrifConfiguration:
+ Collaboration diagram for CrifConfiguration:

Public Member Functions

virtual ~CrifConfiguration ()
 
virtual const std::string & name () const =0
 Returns the SIMM configuration name. More...
 
virtual const std::string & version () const =0
 Returns the SIMM configuration version. More...
 
virtual std::string bucket (const ore::analytics::CrifRecord::RiskType &rt, const std::string &qualifier) const =0
 
virtual bool hasBucketMapping (const ore::analytics::CrifRecord::RiskType &rt, const std::string &qualifier) const =0
 
virtual const QuantLib::ext::shared_ptr< SimmBucketMapper > & bucketMapper () const =0
 Returns the SIMM bucket mapper used by the configuration. More...
 
virtual std::string label2 (const QuantLib::ext::shared_ptr< QuantLib::InterestRateIndex > &irIndex) const
 
virtual std::string label2 (const QuantLib::Period &p) const
 

Detailed Description

Definition at line 35 of file crifconfiguration.hpp.

Constructor & Destructor Documentation

◆ ~CrifConfiguration()

virtual ~CrifConfiguration ( )
virtual

Definition at line 37 of file crifconfiguration.hpp.

37{};

Member Function Documentation

◆ name()

virtual const std::string & name ( ) const
pure virtual

Returns the SIMM configuration name.

Implemented in SimmConfigurationBase.

◆ version()

virtual const std::string & version ( ) const
pure virtual

Returns the SIMM configuration version.

Implemented in SimmConfigurationBase.

◆ bucket()

virtual std::string bucket ( const ore::analytics::CrifRecord::RiskType rt,
const std::string &  qualifier 
) const
pure virtual

Return the CRIF bucket name for the given risk type rt and qualifier

Warning:
Throws an error if there are no buckets for the risk type rt

Implemented in SimmConfigurationBase.

◆ hasBucketMapping()

virtual bool hasBucketMapping ( const ore::analytics::CrifRecord::RiskType rt,
const std::string &  qualifier 
) const
pure virtual

Implemented in SimmConfiguration.

◆ bucketMapper()

virtual const QuantLib::ext::shared_ptr< SimmBucketMapper > & bucketMapper ( ) const
pure virtual

Returns the SIMM bucket mapper used by the configuration.

Implemented in SimmConfigurationBase.

+ Here is the caller graph for this function:

◆ label2() [1/2]

std::string label2 ( const QuantLib::ext::shared_ptr< QuantLib::InterestRateIndex > &  irIndex) const
virtual

Return the CRIF Label2 value for the given interest rate index irIndex. For interest rate indices, this is the CRIF sub curve name e.g. 'Libor1m', 'Libor3m' etc.

Reimplemented in SimmConfigurationCalibration, SimmConfiguration_ISDA_V1_3_38, SimmConfiguration_ISDA_V2_0, SimmConfiguration_ISDA_V2_1, SimmConfiguration_ISDA_V2_2, SimmConfiguration_ISDA_V2_3, SimmConfiguration_ISDA_V2_3_8, SimmConfiguration_ISDA_V2_5, SimmConfiguration_ISDA_V2_5A, and SimmConfiguration_ISDA_V2_6.

Definition at line 59 of file crifconfiguration.cpp.

59 {
60 std::string label2;
61 if (boost::algorithm::starts_with(irIndex->name(), "BMA")) {
62 // There was no municipal until later so override this in
63 // derived configurations and use 'Prime' in base
64 label2 = "Prime";
65 } else if (irIndex->familyName() == "Prime") {
66 label2 = "Prime";
67 } else if(QuantLib::ext::dynamic_pointer_cast<QuantExt::TermRateIndex>(irIndex) != nullptr) {
68 // see ISDA-SIMM-FAQ_Methodology-and-Implementation_20220323_clean.pdf: E.8 Term RFR rate risk should be treated as RFR rate risk
69 label2 = "OIS";
70 } else {
71 label2 = periodToLabels2(irIndex->tenor());
72 QL_REQUIRE(!label2.empty(), "Could not determine SIMM Label2 for index " << irIndex->name());
73 }
74 return label2;
75}
virtual std::string label2(const QuantLib::ext::shared_ptr< QuantLib::InterestRateIndex > &irIndex) const
string periodToLabels2(const QuantLib::Period &p)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ label2() [2/2]

std::string label2 ( const QuantLib::Period &  p) const
virtual

Return the CRIF Label2 value for the given Libor tenor p. This is the CRIF sub curve name, e.g. 'Libor1m', 'Libor3m' etc.

Definition at line 53 of file crifconfiguration.cpp.

53 {
54 std::string label2 = periodToLabels2(p);
55 QL_REQUIRE(!label2.empty(), "Could not determine SIMM Label2 for period " << p);
56 return label2;
57}
+ Here is the call graph for this function: