48 std::string
name()
const;
62 const QuantLib::ext::shared_ptr<ore::data::ReferenceDataManager>& refDataManager =
nullptr,
63 const QuantLib::ext::shared_ptr<SimmBasicNameMapper>& nameMapper =
nullptr);
76 boost::optional<bool> fallback = boost::none)
const override;
90 const std::string&
bucket,
const std::string& validFrom =
"",
const std::string& validTo =
"",
bool fallback =
false)
override;
104 virtual std::string
irBucket(
const std::string& qualifier)
const;
112 std::map<CrifRecord::RiskType, std::map<std::string, std::set<BucketMapping>>>
bucketMapping_;
118 mutable std::map<std::pair<CrifRecord::RiskType, std::string>, std::string>
cache_;
QuantLib::Date validFromDate() const
BucketMapping(const std::string &bucket, const std::string &validFrom="", const std::string &validTo="", bool fallback=false)
const std::string & validFrom() const
const std::string & validTo() const
const std::string & bucket() const
QuantLib::Date validToDate() const
const std::set< FailedMapping > & failedMappings() const override
bool hasBuckets(const CrifRecord::RiskType &riskType) const override
Check if the given SIMM RiskType has a bucket structure.
std::string bucket(const CrifRecord::RiskType &riskType, const std::string &qualifier) const override
ore::data::XMLNode * toXML(ore::data::XMLDocument &) const override
void setRefDataManger(const QuantLib::ext::shared_ptr< ore::data::BasicReferenceDataManager > &refDataManager)
Set the Reference data manager.
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 fromXML(ore::data::XMLNode *node) override
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.
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.
std::set< FailedMapping > failedMappings_
std::map< CrifRecord::RiskType, std::map< std::string, std::set< BucketMapping > > > bucketMapping_
QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > refDataManager_
Reference data manager.
void reset()
Reset the SIMM bucket mapper i.e. clears all mappings and adds the initial hard-coded commodity mappi...
void setSimmNameMapper(const QuantLib::ext::shared_ptr< SimmBasicNameMapper > nameMapper)
Set the Reference data manager.
std::set< CrifRecord::RiskType > rtWithBuckets_
Set of SIMM risk types that have buckets.
QuantLib::ext::shared_ptr< SimmBasicNameMapper > nameMapper_
Simm Name Mapper.
std::map< std::pair< CrifRecord::RiskType, std::string >, std::string > cache_
bool operator<(const Dividend &d1, const Dividend &d2)
Basic SIMM class for mapping names to SIMM qualifiers.
Abstract base class for classes that map SIMM qualifiers to buckets.