#include <orea/simm/simmresults.hpp>
Public Types | |
| typedef CrifRecord::ProductClass | ProductClass |
| typedef SimmConfiguration::RiskClass | RiskClass |
| typedef SimmConfiguration::MarginType | MarginType |
| typedef std::tuple< ProductClass, RiskClass, MarginType, std::string > | Key |
Public Member Functions | |
| SimmResults (const std::string &resultCcy="", const std::string &calcCcy="") | |
| void | add (const CrifRecord::ProductClass &pc, const SimmConfiguration::RiskClass &rc, const SimmConfiguration::MarginType &mt, const std::string &b, QuantLib::Real im, const std::string &resultCurrency, const std::string &calculationCurrency, const bool overwrite) |
| void | add (const Key &key, QuantLib::Real im, const std::string &resultCurrency, const std::string &calculationCurrency, const bool overwrite) |
| void | convert (const QuantLib::ext::shared_ptr< ore::data::Market > &market, const std::string ¤cy) |
| Convert SIMM amounts to a different currency. | |
| void | convert (QuantLib::Real fxSpot, const std::string ¤cy) |
| QuantLib::Real | get (const CrifRecord::ProductClass &pc, const SimmConfiguration::RiskClass &rc, const SimmConfiguration::MarginType &mt, const std::string b) const |
| bool | has (const CrifRecord::ProductClass &pc, const SimmConfiguration::RiskClass &rc, const SimmConfiguration::MarginType &mt, const std::string b) const |
| bool | empty () const |
| Return true if the container is empty, otherwise false. | |
| void | clear () |
| Clear the results from the container. | |
| const std::map< Key, QuantLib::Real > & | data () const |
| Return the map containing the results. | |
| std::map< Key, QuantLib::Real > & | data () |
| std::string & | resultCurrency () |
| const std::string & | resultCurrency () const |
| std::string & | calculationCurrency () |
| const std::string & | calculationCurrency () const |
A container for SIMM results broken down by product class, risk class and margin type.
| void add | ( | const CrifRecord::ProductClass & | pc, |
| const SimmConfiguration::RiskClass & | rc, | ||
| const SimmConfiguration::MarginType & | mt, | ||
| const std::string & | b, | ||
| QuantLib::Real | im, | ||
| const std::string & | resultCurrency, | ||
| const std::string & | calculationCurrency, | ||
| const bool | overwrite | ||
| ) |
Add initial margin value im to the results container for the given combination of SIMM product class, risk class and margin type
has method before adding. | QuantLib::Real get | ( | const CrifRecord::ProductClass & | pc, |
| const SimmConfiguration::RiskClass & | rc, | ||
| const SimmConfiguration::MarginType & | mt, | ||
| const std::string | b | ||
| ) | const |
Get the initial margin value from the results container for the given combination of SIMM product class, risk class and margin type
QuantLib::Null<QuantLib::Real> if there is no initial margin value in the results for the given combination. Can avoid this by first checking the results using the has method. | bool has | ( | const CrifRecord::ProductClass & | pc, |
| const SimmConfiguration::RiskClass & | rc, | ||
| const SimmConfiguration::MarginType & | mt, | ||
| const std::string | b | ||
| ) | const |
Check if there is an initial margin value in the results container for the given combination of SIMM product class, risk class and margin type