Logo
Reference manual - version orea_version
SimmBucketMapperBase Class Reference
Inheritance diagram for SimmBucketMapperBase:

Public Member Functions

 SimmBucketMapperBase (const QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > &refDataManager=nullptr, const QuantLib::ext::shared_ptr< SimmBasicNameMapper > &nameMapper=nullptr)
 Default constructor that adds fixed known mappings.
std::string bucket (const CrifRecord::RiskType &riskType, const std::string &qualifier) const override
bool hasBuckets (const CrifRecord::RiskType &riskType) const override
 Check if the given SIMM RiskType has a bucket structure.
bool has (const CrifRecord::RiskType &riskType, const std::string &qualifier, QuantLib::ext::optional< bool > fallback=QuantLib::ext::nullopt) const override
 Check if the given riskType and qualifier has a valid mapping.
Public Member Functions inherited from SimmBucketMapper
virtual ~SimmBucketMapper ()
 Destructor.
void updateFromCrif (const QuantLib::ext::shared_ptr< ore::analytics::Crif > &crif)

Serialisation

std::map< CrifRecord::RiskType, std::map< std::string, std::set< BucketMapping > > > bucketMapping_
std::set< CrifRecord::RiskTypertWithBuckets_
 Set of SIMM risk types that have buckets.
ore::data::XMLNode * toXML (ore::data::XMLDocument &) const override
void fromXML (ore::data::XMLNode *node) override
void addMapping (const CrifRecord::RiskType &riskType, const std::string &qualifier, const std::string &bucket, const std::string &validFrom="", const std::string &validTo="", bool fallback=false) override
 Add a single bucket mapping for qualifier with risk type riskType.
void setSimmNameMapper (const QuantLib::ext::shared_ptr< SimmBasicNameMapper > nameMapper)
 Set the Reference data manager.
void setRefDataManger (const QuantLib::ext::shared_ptr< ore::data::BasicReferenceDataManager > &refDataManager)
 Set the Reference data manager.
const std::set< FailedMapping > & failedMappings () const override
virtual std::string irBucket (const std::string &qualifier) const
void checkRiskType (const CrifRecord::RiskType &riskType) const
 Check the risk type before adding a mapping entry.

Member Function Documentation

◆ bucket()

std::string bucket ( const CrifRecord::RiskType & riskType,
const std::string & qualifier ) const
overridevirtual

Return the SIMM bucket for a given SIMM RiskType and SIMM Qualifier. An error is thrown if there is no bucket for the combination.

Implements SimmBucketMapper.

◆ hasBuckets()

bool hasBuckets ( const CrifRecord::RiskType & riskType) const
overridevirtual

Check if the given SIMM RiskType has a bucket structure.

Implements SimmBucketMapper.

◆ has()

bool has ( const CrifRecord::RiskType & riskType,
const std::string & qualifier,
QuantLib::ext::optional< bool > fallback = QuantLib::ext::nullopt ) const
overridevirtual

Check if the given riskType and qualifier has a valid mapping.

Implements SimmBucketMapper.

◆ addMapping()

void addMapping ( const CrifRecord::RiskType & riskType,
const std::string & qualifier,
const std::string & bucket,
const std::string & validFrom = "",
const std::string & validTo = "",
bool fallback = false )
overridevirtual

Add a single bucket mapping for qualifier with risk type riskType.

Implements SimmBucketMapper.

◆ failedMappings()

const std::set< FailedMapping > & failedMappings ( ) const
overridevirtual

Implements SimmBucketMapper.

◆ irBucket()

virtual std::string irBucket ( const std::string & qualifier) const
protectedvirtual

Simple logic for RiskType Risk_IRCurve. Qualifier is a currency code and this is checked here.

Member Data Documentation

◆ bucketMapping_

std::map<CrifRecord::RiskType, std::map<std::string, std::set<BucketMapping> > > bucketMapping_
protected

Map from SIMM RiskType to another map that holds the SIMM Qualifier to SIMM bucket mappings