#include <orea/simm/crif.hpp>
Public Types | |
| enum class | CrifType { FRTB , SIMM , SACCR , Empty } |
Public Member Functions | |
| CrifType | type () const |
| void | addRecord (const CrifRecord &record, bool aggregateDifferentAmountCurrencies=false, bool sortFxVolQualifer=true) |
| void | addRecord (const SlimCrifRecord &record, bool aggregateDifferentAmountCurrencies=false, bool sortFxVolQualifer=true) |
| void | addRecords (const Crif &crif, bool aggregateDifferentAmountCurrencies=false, bool sortFxVolQualfier=true) |
| void | addRecords (const QuantLib::ext::shared_ptr< Crif > &crif, bool aggregateDifferentAmountCurrencies=false, bool sortFxVolQualfier=true) |
| void | clear () |
| void | insert (const SlimCrifRecord &record) |
| void | updateIndex (CrifRecord &record) |
| SlimCrifRecordContainer::nth_index< 0 >::type::iterator | begin () |
| SlimCrifRecordContainer::nth_index< 0 >::type::iterator | end () |
| SlimCrifRecordContainer::nth_index< 0 >::type::iterator | find (const SlimCrifRecord &r) |
| SlimCrifRecordContainer::nth_index< 0 >::type::const_iterator | cbegin () const |
| SlimCrifRecordContainer::nth_index< 0 >::type::const_iterator | cend () const |
| SlimCrifRecordContainer::nth_index< 0 >::type::const_iterator | find (const SlimCrifRecord &r) const |
| std::pair< SlimCrifRecordContainer::nth_index< 1 >::type::const_iterator, SlimCrifRecordContainer::nth_index< 1 >::type::const_iterator > | findBy (const NettingSetDetails nsd, CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &qualifier) const |
| Find first element. | |
| bool | empty () const |
| size_t | size () const |
| const bool | hasCrifRecords () const |
| check if there are crif records beside simmParameters | |
| std::set< std::string > | portfolioIds () const |
| const std::set< ore::data::NettingSetDetails > & | nettingSetDetails () const |
| const bool | hasSimmParameters () const |
| check if the Crif contains simmParameters | |
| QuantLib::ext::shared_ptr< Crif > | filterNonZeroAmount (double threshold=0.0, std::string alwaysIncludeFxRiskCcy="") const |
| QuantLib::ext::shared_ptr< Crif > | simmParameters () const |
| returns a Crif containing only simmParameter entries | |
| void | setSimmParameters (const QuantLib::ext::shared_ptr< Crif > &crif) |
| deletes all existing simmParameter and replaces them with the new one | |
| void | setCrifRecords (const QuantLib::ext::shared_ptr< Crif > &crif) |
| deletes all existing simmParameter and replaces them with the new one | |
| void | fillAmountUsd (const QuantLib::ext::shared_ptr< ore::data::Market > market) |
| bool | hasNettingSetDetails () const |
| Check if netting set details are used anywhere, instead of just the netting set ID. | |
| QuantLib::ext::shared_ptr< Crif > | aggregate (bool aggregateDifferentAmountCurrencies=false) const |
| Aggregate all existing records. | |
| void | setAggregate (bool flag) |
| size_t | countMatching (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &qualifier) const |
| std::set< CrifRecord::ProductClass > | ProductClassesByNettingSetDetails (const NettingSetDetails nsd) const |
| std::set< std::string > | qualifiersBy (const NettingSetDetails nsd, CrifRecord::ProductClass pc, const CrifRecord::RiskType rt) const |
| std::pair< SlimCrifRecordContainer::nth_index< 1 >::type::const_iterator, SlimCrifRecordContainer::nth_index< 1 >::type::const_iterator > | filterByQualifier (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &qualifier) const |
| std::pair< SlimCrifRecordContainer::nth_index< 2 >::type::const_iterator, SlimCrifRecordContainer::nth_index< 2 >::type::const_iterator > | filterByBucket (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &bucket) const |
| std::pair< SlimCrifRecordContainer::nth_index< 3 >::type::const_iterator, SlimCrifRecordContainer::nth_index< 3 >::type::const_iterator > | filterByQualifierAndBucket (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &qualifier, const std::string &bucket) const |
| std::pair< SlimCrifRecordContainer::nth_index< 4 >::type::const_iterator, SlimCrifRecordContainer::nth_index< 4 >::type::const_iterator > | filterBy (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt) const |
| std::vector< SlimCrifRecord > | filterBy (const CrifRecord::RiskType rt) const |
| std::vector< SlimCrifRecord > | filterByTradeId (const std::string &id) const |
| std::set< std::string > | tradeIds () const |
| const std::string & | getTradeId (int idx) const |
| const std::string & | getTradeType (int idx) const |
| const ore::data::NettingSetDetails & | getNettingSetDetails (int idx) const |
| const std::string & | getQualifier (int idx) const |
| const std::string & | getBucket (int idx) const |
| const std::string & | getLabel1 (int idx) const |
| const std::string & | getLabel2 (int idx) const |
| const std::string & | getResultCurrency (int idx) const |
| const std::string & | getEndDate (int idx) const |
| const std::string & | getCurrency (int idx) const |
| const std::string & | getLabel3 (int idx) const |
| const std::string & | getCreditQuality (int idx) const |
| const std::string & | getLongShortInd (int idx) const |
| const std::string & | getCoveredBondInd (int idx) const |
| const std::string & | getTrancheThickness (int idx) const |
| const std::string & | getBbRw (int idx) const |
| const std::string & | getCounterpartyName (int idx) const |
| const std::string & | getCounterpartyId (int idx) const |
| const std::string & | getNettingSetNumber (int idx) const |
| const std::string & | getHedgingSet (int idx) const |
| const QuantLib::Date & | getValuationDate (int idx) const |
| int | updateTradeIdIndex (const std::string &value) |
| int | updateTradeTypeIndex (const std::string &value) |
| int | updateNettingSetDetailsIndex (const ore::data::NettingSetDetails &value) |
| int | updateQualifierIndex (const std::string &value) |
| int | updateBucketIndex (const std::string &value) |
| int | updateLabel1Index (const std::string &value) |
| int | updateLabel2Index (const std::string &value) |
| int | updateResultCurrencyIndex (const std::string &value) |
| int | updateEndDateIndex (const std::string &value) |
| int | updateCurrencyIndex (const std::string &value) |
| int | updateLabel3Index (const std::string &value) |
| int | updateCreditQualityIndex (const std::string &value) |
| int | updateLongShortIndIndex (const std::string &value) |
| int | updateCoveredBondIndIndex (const std::string &value) |
| int | updateTrancheThicknessIndex (const std::string &value) |
| int | updateBbRwIndex (const std::string &value) |
| int | updateCounterpartyNameIndex (const std::string &value) |
| int | updateCounterpartyIdIndex (const std::string &value) |
| int | updateNettingSetNumberIndex (const std::string &value) |
| int | updateHedgingSetIndex (const std::string &value) |
| int | updateValuationDateIndex (const QuantLib::Date &value) |
A container for holding single CRIF records or aggregated CRIF records. A CRIF record is a row of the CRIF file outlined in the document: ISDA SIMM Methodology, Risk Data Standards. Version 1.36: 1 February 2017. or an updated version thereof.
| std::set< std::string > portfolioIds | ( | ) | const |
Simm methods Give back the set of portfolio IDs that have been loaded
| QuantLib::ext::shared_ptr< Crif > filterNonZeroAmount | ( | double | threshold = 0.0, |
| std::string | alwaysIncludeFxRiskCcy = "" ) const |
returns a crif without zero amount records, FXRisk entries in currency alwaysIncludeFxRiskCcy are always included
| void fillAmountUsd | ( | const QuantLib::ext::shared_ptr< ore::data::Market > | market | ) |
For each CRIF record checks if currency and amount are defined and uses these to populate the record's amountUsd