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

#include <orea/simm/imscheduleresults.hpp>

Public Member Functions

 IMScheduleResults (const std::string &ccy="")
 
void add (const CrifRecord::ProductClass &pc, const std::string &calculationCurrency, const QuantLib::Real grossIM, const QuantLib::Real grossRC, const QuantLib::Real netRC, const QuantLib::Real ngr, const QuantLib::Real scheduleIM)
 
IMScheduleResult get (const CrifRecord::ProductClass &pc) const
 Convert Schedule IM amounts to a different currency. More...
 
bool has (const CrifRecord::ProductClass &pc) const
 
bool empty () const
 Return true if the container is empty, otherwise false.
 
void clear ()
 Clear the results from the container.
 
const std::map< CrifRecord::ProductClass, IMScheduleResult > & data () const
 Return the map containing the results.
 
const std::string & currency () const
 
std::string & currency ()
 

Detailed Description

A container for Schedule IM results broken down by product class, risk class and margin type.

Member Function Documentation

◆ add()

void add ( const CrifRecord::ProductClass pc,
const std::string &  calculationCurrency,
const QuantLib::Real  grossIM,
const QuantLib::Real  grossRC,
const QuantLib::Real  netRC,
const QuantLib::Real  ngr,
const QuantLib::Real  scheduleIM 
)

Add initial margin value im to the results container for the given combination of Schedule product class, risk class and margin type

Remarks
If there is already a result in the container for that combination, it is overwritten. Can check this using the has method before adding.

◆ get()

IMScheduleResult get ( const CrifRecord::ProductClass pc) const

Convert Schedule IM amounts to a different currency.

Get the initial margin value from the results container for the given combination of Schedule product class, risk class and margin type

Warning:
returns 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.

◆ has()

bool has ( const CrifRecord::ProductClass pc) const

Check if there is an initial margin value in the results container for the given combination of Schedule product class, risk class and margin type