#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. More... | |
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. More... | |
void | clear () |
Clear the results from the container. More... | |
const std::map< Key, QuantLib::Real > & | data () const |
Return the map containing the results. More... | |
std::map< Key, QuantLib::Real > & | data () |
std::string & | resultCurrency () |
const std::string & | resultCurrency () const |
std::string & | calculationCurrency () |
const std::string & | calculationCurrency () const |
Private Attributes | |
std::map< Key, QuantLib::Real > | data_ |
std::string | resultCcy_ |
std::string | calcCcy_ |
A container for SIMM results broken down by product class, risk class and margin type.
Definition at line 38 of file simmresults.hpp.
typedef CrifRecord::ProductClass ProductClass |
Definition at line 40 of file simmresults.hpp.
Definition at line 41 of file simmresults.hpp.
Definition at line 42 of file simmresults.hpp.
typedef std::tuple<ProductClass, RiskClass, MarginType, std::string> Key |
Definition at line 43 of file simmresults.hpp.
SimmResults | ( | const std::string & | resultCcy = "" , |
const std::string & | calcCcy = "" |
||
) |
Definition at line 45 of file simmresults.hpp.
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. void add | ( | const Key & | key, |
QuantLib::Real | im, | ||
const std::string & | resultCurrency, | ||
const std::string & | calculationCurrency, | ||
const bool | overwrite | ||
) |
Definition at line 47 of file simmresults.cpp.
void convert | ( | const QuantLib::ext::shared_ptr< ore::data::Market > & | market, |
const std::string & | currency | ||
) |
Convert SIMM amounts to a different currency.
Definition at line 73 of file simmresults.cpp.
void convert | ( | QuantLib::Real | fxSpot, |
const std::string & | currency | ||
) |
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. Definition at line 97 of file simmresults.cpp.
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
Definition at line 106 of file simmresults.cpp.
bool empty | ( | ) | const |
Return true if the container is empty, otherwise false.
Definition at line 111 of file simmresults.cpp.
void clear | ( | ) |
Clear the results from the container.
Definition at line 113 of file simmresults.cpp.
const std::map< Key, QuantLib::Real > & data | ( | ) | const |
std::map< Key, QuantLib::Real > & data | ( | ) |
Definition at line 93 of file simmresults.hpp.
std::string & resultCurrency | ( | ) |
const std::string & resultCurrency | ( | ) | const |
Definition at line 96 of file simmresults.hpp.
std::string & calculationCurrency | ( | ) |
const std::string & calculationCurrency | ( | ) | const |
Definition at line 99 of file simmresults.hpp.
|
private |
Definition at line 102 of file simmresults.hpp.
|
private |
Definition at line 103 of file simmresults.hpp.
|
private |
Definition at line 104 of file simmresults.hpp.