Logo
Reference manual - version orea_version
Public Member Functions | List of all members
SimmBucketMapperBase Class Reference
+ Inheritance diagram for SimmBucketMapperBase:

Public Member Functions

 SimmBucketMapperBase (const boost::shared_ptr< ore::data::ReferenceDataManager > &refDataManager=nullptr, const boost::shared_ptr< SimmBasicNameMapper > &nameMapper=nullptr)
 Default constructor that adds fixed known mappings.
 
std::string bucket (const SimmConfiguration::RiskType &riskType, const std::string &qualifier) const override
 
bool hasBuckets (const SimmConfiguration::RiskType &riskType) const override
 Check if the given SIMM RiskType has a bucket structure.
 
bool has (const SimmConfiguration::RiskType &riskType, const std::string &qualifier, boost::optional< bool > fallback=boost::none) const override
 Check if the given riskType and qualifier has a valid mapping.
 
- Public Member Functions inherited from SimmBucketMapper
virtual ~SimmBucketMapper ()
 Destructor.
 
- Public Member Functions inherited from XMLSerializable
void fromXMLString (const std::string &xml)
 
std::string toXMLString ()
 

Serialisation

std::map< SimmConfiguration::RiskType, std::map< std::string, std::set< BucketMapping > > > bucketMapping_
 
std::set< SimmConfiguration::RiskTypertWithBuckets_
 Set of SIMM risk types that have buckets.
 
ore::data::XMLNode * toXML (ore::data::XMLDocument &) override
 
void fromXML (ore::data::XMLNode *node) override
 
void addMapping (const SimmConfiguration::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. More...
 
void setSimmNameMapper (const boost::shared_ptr< SimmBasicNameMapper > nameMapper)
 Set the Reference data manager.
 
void setRefDataManger (const boost::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 SimmConfiguration::RiskType &riskType) const
 Check the risk type before adding a mapping entry.
 

Member Function Documentation

◆ bucket()

std::string bucket ( const SimmConfiguration::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.

◆ addMapping()

void addMapping ( const SimmConfiguration::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.

◆ 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<SimmConfiguration::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