How to Calculate Margin in Multi-Assets Mode?
In Multi-Assets Mode, your margin balance is used to support all your positions. It is crucial to keep an eye on your margin ratio to avoid liquidation of all your positions when the margin ratio reaches 75%.
How to calculate the margin ratio in the Multi-Assets Mode?
You can calculate your margin ratio in Multi-Assets Mode using this equation:
Account Margin Ratio = Account Maintenance Margin / Account Equity
The Account Maintenance Margin is the total sum of the maintenance margin for all cross positions in USD, while the Account Equity is the total sum of margin balance for all cross positions in USD.
You want to trade two contracts, BTCUSDT perpetual and ETHBUSD_210326 with leverage of 100x and 50x respectively. In this scenario, the Maintenance Margin Ratio will be 0.8% and 1% respectively. Whether you are using the Isolated or the Cross Margin Mode, the account status and calculation changes of various parameters are as follows:
Initial state - No open positions
Symbol
BTCUSDT
ETHBUSD_210326
Margin Asset
USDT
BUSD
Asset Wallet Balance
200
220
Asset Equity
200
220
Maintenance Margin Ratio
0.008
0.01
Initial Margin Ratio
0.01 (100x)
0.02 (50x)
Unrealized PnL
0
0
Under the Single-Asset Mode:
USDT available for order = 200 BUSD available for order = 220
Under the Multi-Assets Mode:
Account Equity = ∑min(assetEquity*bidRate, assetEquity*askRate) = 200 * 0.9801 + 220 * 1 = 416.02
As there are no open positions, assetCrossInitialMargin = 0
uniAvailableForOrder = accountEquity-∑(assetCrossInitialMargin*askRate) = 416.02 - 0 = 416.02
USDT Available for Order = 416.02 / 0.99495 = 418.13
BUSD Available for Order = 416.02 / 1 = 416.02
Account Maintenance Margin Ratio = 0
Margin Ratio = Account Maintenance Margin / Account Equity = 0
With open positions
Symbol
BTCUSDT
ETHBUSD_210326
Margin Asset
USDT
BUSD
Asset Wallet Balance
200
220
Asset Equity
200
220
Maintenance Margin Ratio
0.008
0.01
Initial Margin Ratio
0.01 (100x)
0.02 (50x)
Position Quantity
0.5
20
Entry Price
20,000 USDT
600 BUSD
Mark Price
20,000 USDT
600 BUSD
Unrealized PnL
0
0
Account Maintenance Margin = ∑assetMM*askRate = 0.5 * 20,000 * 0.008 * 0.99495 + 20 * 600 * 0.01 * 1 = 199.596
As there is no unrealized PnL, Account Equity = accountWalletBalance = 416.02
uniAvailableForOrder = Account Equity - ∑(assetCrossInitialMargin * askRate) = 416.02 - (0.5 * 20,000 * 0.01 * 0.99495 + 20 * 600 * 0.02 * 1)= 76.525
USDT Available for Order = 76.525 / 0.99495 = 76.91
BUSD Available for Order = 76.525 / 1 = 76.525
Margin Ratio = Account Maintenance Margin / Account Equity = 199.596 / 416.02 = 0.47977 = 47.98%
With open positions and unrealized PnL
Symbol
BTCUSDT
ETHBUSD_210326
Margin Asset
USDT
BUSD
Asset Wallet Balance
200
220
Asset Equity
200 - 500 = -300
220 + 400 = 620
Maintenance Margin Ratio
0.008
0.01
Initial Margin Ratio
0.01 (100x)
0.02 (50x)
Position Quantity
0.5
20
Entry Price
20,000 USDT
600 BUSD
Mark Price
19,000 USDT
620 BUSD
Unrealized PnL
0.5 * (19,000 - 20,000) = -500
20 * (620 - 600)= 400
Account Maintenance Margin = ∑assetMM*askRate = 0.5 * 19,000 * 0.008 * 0.99495 + 20 * 620 * 0.01 * 1 = 199.61
With unrealized PnL, Account Equity = ∑min(assetEquity*bidRate, assetEquity*askRate) = -300 * 0.99495 + 620 * 1 = 321.515
uniAvailableForOrder = Account Equity - ∑(assetCrossInitialMargin * askRate) = 321.515 - (0.5 * 19,000 * 0.01 * 0.99495 + 20 * 620 * 0.02 * 1) = -21
USDT Available for Order and BUSD Available for Order are both 0
Margin Ratio = Account Maintenance Margin / Account Equity = 199.61 / 321.515 = 0.62084 = 62.08%
Last updated
Was this helpful?