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

Collateral Account. More...

#include <orea/aggregation/collateralaccount.hpp>

Classes

class  MarginCall
 Margin Call. More...
 

Public Member Functions

 CollateralAccount ()
 Default constructor.
 
 CollateralAccount (const QuantLib::ext::shared_ptr< NettingSetDefinition > &csaDef, const Date &date_t0)
 Constructor assuming initial collateral account balance is zero. More...
 
 CollateralAccount (const QuantLib::ext::shared_ptr< NettingSetDefinition > &csaDef, const Real &balance_t0, const Date &date_t0)
 Constructor taking an initial collateral account balance. More...
 
QuantLib::ext::shared_ptr< NettingSetDefinitioncsaDef () const
 Inspectors. More...
 
Real balance_t0 () const
 
Real accountBalance () const
 
Real accountBalance (const Date &date) const
 
Date balanceDate () const
 
Real outstandingMarginAmount (const Date &simulationDate) const
 
void updateAccountBalance (const Date &simulationDate, const Real &annualisedZeroRate=0.0)
 
void updateMarginCall (const MarginCall &newMarginCall)
 
void updateMarginCall (const Real &marginFlowAmount, const Date &marginPayDate, const Date &marginRequestDate)
 
void closeAccount (const Date &closeDate)
 

Detailed Description

Collateral Account.

This class holds information corresponding to collateral cash accounts. It stores a balance as well as an asof date for the balance. The class also includes "margin" information relating to the most recent margin call (e.g. call amount, status, expected pay date.

The idea is that this class can be updated on-the-run with new margin requirements and collateral balances, and the timestamps updated accordingly.

For further information refer to the detailed ORE documentation.

Constructor & Destructor Documentation

◆ CollateralAccount() [1/2]

CollateralAccount ( const QuantLib::ext::shared_ptr< NettingSetDefinition > &  csaDef,
const Date &  date_t0 
)

Constructor assuming initial collateral account balance is zero.

Parameters
csaDefCSA details including threshold, minimum transfer amount, margining frequency etc
date_t0Today's date

◆ CollateralAccount() [2/2]

CollateralAccount ( const QuantLib::ext::shared_ptr< NettingSetDefinition > &  csaDef,
const Real &  balance_t0,
const Date &  date_t0 
)

Constructor taking an initial collateral account balance.

Parameters
csaDefCSA details including threshold, minimum transfer amount, margining frequency etc
balance_t0Initial collateral account balance
date_t0Today's date

Member Function Documentation

◆ csaDef()

QuantLib::ext::shared_ptr<NettingSetDefinition> csaDef ( ) const

Inspectors.

csa (netting set) definition

◆ balance_t0()

Real balance_t0 ( ) const

account balance at start date

◆ accountBalance() [1/2]

Real accountBalance ( ) const

most up-to-date account balance

◆ accountBalance() [2/2]

Real accountBalance ( const Date &  date) const

account balance as of requested date

◆ balanceDate()

Date balanceDate ( ) const

most recent account balance reset date

◆ outstandingMarginAmount()

Real outstandingMarginAmount ( const Date &  simulationDate) const

Returns the sum of all outstanding margin call amounts

◆ updateAccountBalance()

void updateAccountBalance ( const Date &  simulationDate,
const Real &  annualisedZeroRate = 0.0 
)

Updates the account balance, does this by checking if any outstanding margin calls are due for settlement.

Note
The accrual rate is assumed to be compounded daily

◆ updateMarginCall()

void updateMarginCall ( const MarginCall newMarginCall)

Updates the margin call details for this account

◆ closeAccount()

void closeAccount ( const Date &  closeDate)

Closes the account as of a given date (i.e. sets the balance to zero)