Portfolio margin mode: cross margin trading

Published on Mar 21, 2023Updated on Apr 15, 202413 min read

Portfolio margin mode allows you to trade spot, margin, futures, and options with one account and uses a risk-based model that determines margin requirements.This mode takes into consideration positions in spot, margin, futures, and options combined, thus potentially reducing the margin requirements of a portfolio. Portfolio margin allows for effective margin coverage while preserving efficient use of capital.Similar to multi-currency margin mode, your equity in different currencies will be calculated into an equivalent USD amount to be used as the margin for order placement and holding positions.

How can I be qualified for portfolio margin?


To be qualified for portfolio margin, you:

  • Must maintain a minimum net equity of 10,000 USD.

  • Must declare to have an understanding of the concept of portfolio margin.


How does risk-offsetting work in portfolio margin?


OKX portfolio margin offers two modes:

  1. Derivatives-only mode: All derivatives are grouped into risk units based on their underlying assets (e.g. BTC-USD, BTC-USDT, ETH-USD, ETH-USDT, etc). Futures and options with the same underlying are considered holistically within the risk unit. Margin is calculated per risk unit, so as to factor in risk-offsetting among instruments.

Note: In OKX risk-unit groupings, crypto- and USDT-margined contracts are considered as different risk units.

  1. Spot-derivatives risk offset mode: Spot is included in the risk unit for margin calculation so that margin requirement can be significantly lowered if derivatives are hedged with spot.

Note: In the spot-derivatives risk offset mode, you can choose to place spot in either the USDT- or crypto-margined risk unit.In the spot-derivatives (USDT) risk offset mode, the underlying spot is included in the USDT-margined risk unit.In the spot-derivatives (Crypto) risk offset mode, the underlying spot is included in the crypto-margined risk unit.
Example:

When you use portfolio margin for the first time, the default mode will be spot-derivatives risk offset mode.To enable the spot-derivatives risk offset mode, and select the derivatives type, go to Settings > Spot-Derivatives risk offset.

You can see “Spot in use” under the “Open positions” tab.

How does Portfolio Margin calculate?


Maintenance margin requirement (MMR) is determined on the risk unit basis, where all instruments (futures, options, and spot under the spot-derivatives risk offset mode) are grouped by underlying assets to simulate the maximum loss that can occur in a portfolio under a specific set of market conditions. The USD value of the individual MMRs will then be summed up in a portfolio MMR (in USD value).Initial margin requirement (IMR) is then derived from MMR.
Spot-derivatives risk offset mode: Spot in use
In the spot-derivatives risk offset mode, spot in use, or how much spot is used under the risk unit is determined by the delta of derivatives that belong to the same risk unit. Spot is only added when derivatives of the corresponding risk unit can be hedged with the spot.For each risk unit,

  1. If spot equity >0 & derivatives delta < 0, spot in use = min (|equity|, |derivatives delta|)

  2. If spot equity <0 & derivatives delta > 0, spot in use (borrowing) = -min (|equity|, |derivatives delta|)

  3. Otherwise, spot in use = 0.


Portfolio margin componentsPortfolio margin consists of derivatives margin and borrowing margin. Portfolio margin sums up margin under each risk unit and then adds borrowing margin to obtain the margin at portfolio level.MMR = Sum of USD value of each risk unit Derivatives MMR+ account level Borrowing MMRIMR = 1.3 × Max (Positive-delta derivatives MMR, Negative-delta derivatives MMR, total derivatives MMR) + Borrowing IMRWhere,Positive-delta derivative MMR = MMR required for all derivative positions + MMR required for all open derivative order with positive delta (+ MMR required for all derivative orders in RFQ in Liquidity Marketplace)Negative-delta derivative MMR = MMR required for all derivative positions + MR required for all open derivative order with negative delta (+ MMR required for all derivative orders in RFQ in Liquidity Marketplace)Total derivatives MMR = MMR required for all derivative positions (+ MMR required for all derivative orders in RFQ in Liquidity Marketplace)
A. Derivatives MMR
Derivatives margin calculates 6 risks (MR1-6) by stress testing the portfolio under a specific set of market conditions of each risk unit, and then applying the minimum charge (MR7). The minimum charge is designed to cover any liquidation fee, transaction cost, and slippage. Details of corresponding market conditions are available in the Appendix.MR1: Spot shock (applicable for all derivatives / and spot under spot-derivatives risk offset mode)MR2: Theta decay risk (applicable for options only)MR3: Vega risk (applicable for options only)MR4: Basis risk (applicable for all derivatives)MR5: Interest rate risk (applicable for options only)MR6: Extreme move (applicable for all derivatives / and spot under spot-derivatives risk offset mode)MR7: Adjusted minimum charge (applicable for all derivatives)Derivatives MMR = max { [max(spot shock, theta decay risk, extreme move) + basis risk + vega risk + interest rate risk], adjusted minimum charge}
B. MR8: Borrowing MMR/IMR
Borrowing margin calculation calculates margin based on the borrowing amount on each underlying per corresponding tier. Please refer to margin level defined here.Both auto-borrow mode and non-borrow mode are available. In auto-borrow mode, you can sell a currency unavailable in account through spot or derivatives when the total USD-equivalent equity at portfolio level is sufficient. Borrowings could include margin borrowing, options buyer borrowing, and negative UPL (unrealized profit and loss) caused by opening derivatives positions.Maintenance margin rate refers to position tier, eg: IMR = 1 / borrowing leveragePlease note MR8 also includes the borrowings that might be required to cover derivatives MMR.
C. Margin level calculationThe USD value of margin:MMR/IMR of different currencies under each risk unit are converted into their USD value by spot indices.The USD value of portfolio equity:Due to the differences in market liquidity of each currency, we calculate the USD value of each currency in portfolio equity based on the latest discount rate table.The margin level of the portfolio is then determined by USD value of the portfolio equity divided by USD value of margin required.

How can I test portfolio margin on an existing/simulated portfolio?


Position Builder and corresponding API are available to test the portfolio margin for the existing positions (even if you're using other margin modes), as well as any simulated portfolio.

  1. You can simulate new positions in position builder. IMR and MMR are shown below. You can also include the existing positions with the simulated positions, such that he/she can also simulate the impact on IMR and MMR.


  1. When you hover on MMR, you can see the breakdown of MMR based on the above MR scenarios.


What will happen during liquidation?

When the margin level is lower than a certain threshold (eg. 300%), the system will send a liquidation alert to the account owner.The liquidation in portfolio margin mode is triggered based on whether the margin level reaches 100%. Due to potentially low liquidity of options, liquidation could result in new futures positions being opened, however, only to decrease the risk profile of the whole portfolio.The liquidation process will execute sequential steps. The flow will go to the next step if the account is still at risk after the previous one is completed and can never be undone. The flow is completed when the account returns to a safe status (margin level > 110%) or all the positions in the account are liquidated.

Step 1. Dynamic hedging process (DDH)

DDH refers to the use of the DDH principle to reduce the overall risk of the portfolio margin account by adjusting futures positions. DDH is applicable to options positions when spot shock risk (MR1) is largest among all risks (e.g. BTCUSD index is down 15%)

Step 2. Basis hedge process

The basis hedge process is to reduce the basis risk by liquidating futures at different expiry dates at the same time when basis risk (MR4) is the largest among all risks. Basis risk means the risk of different contract prices for the same underlying with different expiry dates.

Step 3. General position reducing process

The general position reducing process prioritizes the positions that can make the account positions safer to reduce the account maintenance margin. The number of positions to be reduced is determined by both default system configurations (the liquidity of each instrument) and the tradable positions.

Appendix: Margin calculations

Please note all the parameters listed below are subject to change based on the market environment.
MR1: Spot shockSpot shock scenario is comprised of market simulations moving the underlying up or down or unchanged in combination with moving implied volatility up or down or unchanged. MR1 is the maximum loss in these 21 market simulations (7 price movement simulations × 3 implied volatility change simulations; Implied volatility change could be in volatility points or percentage; MR1 takes the maximum loss)Price Move

Implied volatility change (Options only) in points or in %


MR2: Time decay risk (options only)

Time decay risk measures 24 hour decay in portfolio value assuming no change in underlying price move and implied volatility.

MR3: Vega term structure risk (options only)

Vega term structure risk arises from differences in options value for the same underlying with different expiry dates under the same implied volatility shock. It measures the risk of change in implied volatility across different expiry dates that is not captured in MR1.

MR4: Basis risk

Basis risk arises from differences in contract prices for the same underlying with different expiry dates. The futures with further expiry dates are likely to be more volatile than futures that are closer to expiry. It measures the risk of change in forward price across different expiry dates.The basis risk scenario is comprised of different market simulations, moving the forward price or forward basis up on positive delta on each expiry.

Example:Forward price at expiry 1 is 3000 USD/ETHForward price at expiry 2 is 3500 USD/ETHSpot is 3200 USD/ETHSimulated maximum forward price basis move at expiry 1 is -200 30% and maximum forward price move at expiry is 3000 0.6%Simulated maximum forward price basis move at expiry 2 is 300 30% and maximum forward price move at expiry is 3500 0.6%

MR5: Interest rate risk (options only)

Interest rate risk measures the risk of change in yield curve by populating a principal component analysis (PCA) style rate movement table. Interest rate here refers to interest rate used in options pricing model.Basic factor loadings:PC1 explains the parallel shift in yield curve. PC2 explains the slope change of yield curve.

Interest rate risk scenario is comprised of 8 market simulations by moving the yield curve proportionally to PC1 and PC2. For instance, scenarios include moving the existing yield curve by +/- 5% × PC1, +/- 2.5% × PC1, +/- 3% × PC2, +/- 2% × PC1. MR5 is the maximum loss that occurs in these 8 market simulations.

MR6: Extreme move

Extreme move scenario is similar to spot shock scenario, but the maximum underlying price move doubles the largest spot shock in MR1 and implied volatility remains unchanged. Extreme move is designed to capture the scenarios where options might be exercised when the underlying experiences extreme move. MR6 takes half of the maximum loss under 2 scenarios. For instance, MR6 of BTC-USD risk unit is half of the maximum loss when BTC-USD moves + 30% or -30%, whichever is larger. If the risk unit only contains futures, MR6 = MR1.


MR7: Minimum charge

Step 1. Raw minimum chargeRaw minimum charge is designed to cover any slippage, and transaction cost.Raw minimum charge per contract = slippage per contract + transaction cost per contractFutures minimum chargeTransaction cost per contract = Taker fee × Contract value × Contract multiplierSlippage per contract depends on the first tier futures MMR in unified account.Options minimum chargeTransaction cost per contract = min (Taker fee × Contract value × Contract multiplier, 12.5% × Mark price × Contract value × Contract multiplier)For long positions: Slippage per contract = min{max(min_per_delta, min_per_delta abs(delta)), Mark price} × Contract multiplierFor short positions, Slippage per contact = max(min_per_delta, min_per_delta × abs(delta)) × Contract multiplierTake BTC as an example, Minimum charge per delta (min_per_delta) = 0.02
Step 2. Adjusted minimum chargeAdjusted Minimum charge is derived from a scaling factor function based on futures and options short raw minimum charge under each risk unit. Scaling factor is designed to reflect the slippage to liquidate portfolios with different sizes.Adjusted minimum charge MR7 = (Futures + options short raw minimum charge) × Scaling factor + options long raw minimum chargeTier configuration on BTC, ETHPlease refer to the latest adjustment on scaling factor logic

Tier configuration of other underlyings


MR8: Borrowing margin

In auto-borrow mode, you can sell a currency unavailable in account through spot or derivatives when the total USD-equivalent equity is sufficient. A potential borrowing amount will be generated in your account and some of the adjusted equity will be used as margin requirement. When the currency's equity is less than 0 due to overselling or the derivative loss is settled in the currency, the real liability and the corresponding interest of this currency will be generated automatically.In non-borrow mode, you can only use the available balance or available equity of the currency to place orders of spot, futures,and options. There may be a situation in which the equity of a certain currency cannot pay off the loss settled in this currency. In this situation, if the account has surplus equity in other currencies and the overall USD value of the account is sufficient, the account will be safe, and the real liability will be passively generated. If the liability is within the interest-free range of the currency, no interest will be charged. When the liability of the currency exceeds the interest-free limit, a forced repayment (TWAP) will be triggered. The system will automatically use available equity of other currencies in the account to cover the liability and make it stay within the interest-free limit. TWAP will be executed by selling the positive assets into USDT and repaying the liability with USDT.Potential borrowing = Actual borrowing + Virtual borrowingActual borrowing refers to margin borrowing, options buyer borrowing, and negative UPL (unrealized profit and loss) caused by opening positions. Actual borrowing occupies your margin tier limit, main account limit, and the platform's total lending limit.Virtual borrowing refers to borrowing used for opening positions. Virtual borrowing occupies your margin tier limit, but does not occupy your main account limit and the platform's total lending limit.The negative UPL caused by the opening positions in actual borrowing enjoys the interest-free limit. While borrowing is caused by margin borrowing, options buyer borrowing, and the realized profit and loss of the contract does not enjoy the interest-free limit.Please refer to interest calculation for the details of the interest-free limit rules.