Logo
Reference manual - version orea_version
Public Types | Public Member Functions | List of all members
Crif Class Reference

Public Types

enum class  CrifType { Empty , Frtb , Simm }
 

Public Member Functions

CrifType type () const
 
void addRecord (const CrifRecord &record, bool aggregateDifferentAmountCurrencies=false, bool sortFxVolQualifer=true)
 
void addRecords (const Crif &crif, bool aggregateDifferentAmountCurrencies=false, bool sortFxVolQualfier=true)
 
void clear ()
 
std::set< CrifRecord >::const_iterator begin () const
 
std::set< CrifRecord >::const_iterator end () const
 
std::set< CrifRecord >::const_iterator find (const CrifRecord &r) const
 
std::set< CrifRecord >::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
 
const std::set< std::string > & portfolioIds () const
 
const std::set< ore::data::NettingSetDetails > & nettingSetDetails () const
 
const bool hasSimmParameters () const
 check if the Crif contains simmParameters
 
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
 
Crif simmParameters () const
 returns a Crif containing only simmParameter entries
 
void setSimmParameters (const Crif &crif)
 deletes all existing simmParameter and replaces them with the new one
 
void setCrifRecords (const 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.
 
Crif aggregate () const
 Aggregate all existing records.
 
size_t countMatching (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &qualifier) const
 
std::set< CrifRecord::ProductClassProductClassesByNettingSetDetails (const NettingSetDetails nsd) const
 
std::set< std::string > qualifiersBy (const NettingSetDetails nsd, CrifRecord::ProductClass pc, const CrifRecord::RiskType rt) const
 
std::vector< CrifRecordfilterByQualifierAndBucket (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &qualifier, const std::string &bucket) const
 
std::vector< CrifRecordfilterByQualifier (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &qualifier) const
 
std::vector< CrifRecordfilterByBucket (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt, const std::string &bucket) const
 
std::vector< CrifRecordfilterBy (const NettingSetDetails &nsd, const CrifRecord::ProductClass pc, const CrifRecord::RiskType rt) const
 
std::vector< CrifRecordfilterBy (const CrifRecord::RiskType rt) const
 
std::vector< CrifRecordfilterByTradeId (const std::string &id) const
 
std::set< std::string > tradeIds () const
 

Member Function Documentation

◆ portfolioIds()

const std::set<std::string>& portfolioIds ( ) const

Simm methods Give back the set of portfolio IDs that have been loaded

◆ fillAmountUsd()

void fillAmountUsd ( const QuantLib::ext::shared_ptr< ore::data::Market market)

For each CRIF record checks if amountCurrency and amount are defined and uses these to populate the record's amountUsd