July 24, 2020
The foundation of the margin calculation uses a parametric VaR approach, also referred to as the variance-covariance method. The advantage of VaR is that the risk and hence required initial margin can be calculated for a portfolio of assets where the correlation/offset between assets are factored into the margin calculation.
This is especially relevant for our spread order books. Specifically with this method we have full control over the model inputs allowing the exchange to fully control the amount of allowable leverage per asset whilst retaining the ability to lower the initial margin requirement through portfolio offsets (e.g. long vs short positions).
The Risk Engine serves the following purposes:
Price bounds is a mechanism which subjects all incoming orders to price validation and rejects orders outside the given price band to maintain orderly markets. The bands are calculated dynamically for each order book based on an external price index formula defined by the exchange. Thus, if markets quickly move in one direction, the price bands dynamically adjust to accommodate new trading ranges.
Each user’s master account and sub-accounts are margined separately and independently. Balances, collateral and limits are currently not aggregated across accounts, which means that within a single sub-account all positions and working orders are margined as a portfolio using all the balances contained in that sub-account as collateral. This also means that users can only lose collateral from a trade(s) limited to the sub-account itself from which the trade(s) originated from. Therefore if users want isolated margin then its as simple as creating a new sub-account for this self contained trade(s)/position(s) and supporting collateral.
The level of risk in a portfolio is usually measured using standard deviation, which is calculated as the square root of the portfolio variance. The portfolio variance is determined by a weighted combination of the individual variances of each of the positions adjusted by their co-variances. For our purposes the individual variances are replaced by the inverse of the leverage offered by the exchange (e.g. 10x = 0.1). Also, for the purposes of calculating a USD based initial margin figure the weights of the portfolio are the USD valuation of each position in the portfolio.
The full formula is as follows:
For details regarding the leverage and correlation values set by the exchange please see the support pages “3.8 Perpetual Contract Limits”、“3.9 Futures Contract Limits”、“3.10 Correlations”
For a simple portfolio with only two positions:
|Market||Position||Current Mark Price||Max Leverage|
* correlation is 0.7 between these two markets for the 100x leverage tier. This is an example of a long spread position for the BTC-Dec21 – BTC-Perp spread.
The portfolio margin is calculated by the following, derived from the general formula described in the documentation above: