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, 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. | |
void | updateFromCrif (const ore::analytics::Crif &crif) |
Public Member Functions inherited from XMLSerializable | |
void | fromXMLString (const std::string &xml) |
std::string | toXMLString () const |
Serialisation | |
std::map< CrifRecord::RiskType, std::map< std::string, std::set< BucketMapping > > > | bucketMapping_ |
std::set< CrifRecord::RiskType > | rtWithBuckets_ |
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 . More... | |
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. | |
|
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.
|
overridevirtual |
Add a single bucket
mapping for qualifier
with risk type riskType
.
Implements SimmBucketMapper.
|
protectedvirtual |
Simple logic for RiskType Risk_IRCurve. Qualifier is a currency code and this is checked here.
|
protected |
Map from SIMM RiskType to another map that holds the SIMM Qualifier to SIMM bucket mappings