Collateral Account. More...
#include <orea/aggregation/collateralaccount.hpp>
Classes | |
class | MarginCall |
Margin Call. More... | |
Public Member Functions | |
CollateralAccount () | |
Default constructor. More... | |
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< NettingSetDefinition > | csaDef () 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) |
Private Attributes | |
QuantLib::ext::shared_ptr< NettingSetDefinition > | csaDef_ |
Real | balance_t0_ |
vector< Real > | accountBalances_ |
vector< Date > | accountDates_ |
vector< MarginCall > | marginCalls_ |
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.
Definition at line 53 of file collateralaccount.hpp.
CollateralAccount | ( | const QuantLib::ext::shared_ptr< NettingSetDefinition > & | csaDef, |
const Date & | date_t0 | ||
) |
Constructor assuming initial collateral account balance is zero.
csaDef | CSA details including threshold, minimum transfer amount, margining frequency etc |
date_t0 | Today's date |
Definition at line 38 of file collateralaccount.cpp.
CollateralAccount | ( | const QuantLib::ext::shared_ptr< NettingSetDefinition > & | csaDef, |
const Real & | balance_t0, | ||
const Date & | date_t0 | ||
) |
Constructor taking an initial collateral account balance.
csaDef | CSA details including threshold, minimum transfer amount, margining frequency etc |
balance_t0 | Initial collateral account balance |
date_t0 | Today's date |
Definition at line 44 of file collateralaccount.cpp.
QuantLib::ext::shared_ptr< NettingSetDefinition > csaDef | ( | ) | const |
Real balance_t0 | ( | ) | const |
Real accountBalance | ( | ) | const |
most up-to-date account balance
Definition at line 109 of file collateralaccount.hpp.
Real accountBalance | ( | const Date & | date | ) | const |
account balance as of requested date
Definition at line 114 of file collateralaccount.cpp.
Date balanceDate | ( | ) | const |
Real outstandingMarginAmount | ( | const Date & | simulationDate | ) | const |
Returns the sum of all outstanding margin call amounts
Definition at line 129 of file collateralaccount.cpp.
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.
Definition at line 51 of file collateralaccount.cpp.
void updateMarginCall | ( | const MarginCall & | newMarginCall | ) |
Updates the margin call details for this account
Definition at line 91 of file collateralaccount.cpp.
void updateMarginCall | ( | const Real & | marginFlowAmount, |
const Date & | marginPayDate, | ||
const Date & | marginRequestDate | ||
) |
Definition at line 106 of file collateralaccount.cpp.
void closeAccount | ( | const Date & | closeDate | ) |
Closes the account as of a given date (i.e. sets the balance to zero)
Definition at line 142 of file collateralaccount.cpp.
|
private |
Definition at line 139 of file collateralaccount.hpp.
|
private |
Definition at line 140 of file collateralaccount.hpp.
|
private |
Definition at line 141 of file collateralaccount.hpp.
|
private |
Definition at line 142 of file collateralaccount.hpp.
|
private |
Definition at line 143 of file collateralaccount.hpp.