Introduction to Futures Trading Mechanics
Futures contracts on OKX involve complex calculations for margin requirements, profit/loss estimation, and risk management. This guide explains the key formulas and concepts every trader should master before engaging in perpetual contracts.
Core Components of Futures Trading
- Account Equity = Deposits + Realized P&L + Unrealized P&L
- Available Margin = Account Equity - (Position Size × Contract Face Value / (Mark Price × Leverage)) - Order Freeze Margin
- Yield Calculation = Profit / Initial Margin Required
Profit and Loss Formulas
Long Positions
Contract Profit = (Face Value/Entry Price - Face Value/Exit Price) × QuantityShort Positions
Contract Profit = (Face Value/Exit Price - Face Value/Entry Price) × QuantityUnrealized P&L
- Long: (Face Value/Settlement Price - Face Value/Mark Price) × Quantity
- Short: (Face Value/Mark Price - Face Value/Settlement Price) × Quantity
Margin Systems Explained
Cross Margin Mode
Initial Margin = Face Value × Quantity / Mark Price / LeverageMargin adjusts with price movements
Isolated Margin Mode
Initial Margin = Face Value × Quantity / Entry Price / LeverageFixed margin that doesn't change
Key Risk Metrics
Maintenance Margin Rate
The minimum margin required to maintain a position. When your margin ratio falls below this threshold plus taker fees, liquidation occurs.
Margin Ratio Calculations
Isolated Positions
Margin Ratio = (Fixed Margin + Unrealized P&L) / Position Value
Position Value = Face Value × Quantity / Mark PriceCross Margin
Margin Ratio = (Balance + Realized P&L + Unrealized P&L) / (Position Value + Order Freeze Margin × Leverage)Liquidation Mechanics
Estimated Liquidation Price
Cross Margin
Complex calculation considering:
- Maintenance margin rate
- Taker fees
- Total position size
- Net exposure
Isolated Long
(1 + Maintenance Rate) / (1/Entry Price + Fixed Margin/Face Value/Quantity)Isolated Short
(1 - Maintenance Rate) / (1/Entry Price - Fixed Margin/Face Value/Quantity)👉 Master advanced liquidation scenarios
Funding Fee System
Calculation Methodology
Funding Fee = Position Value × Funding Rate
Funding Rate = Clamp(MA((Contract Mid Price - Spot Index)/Spot Index), -0.3%, 0.3%)Charged every 8 hours at 08:00, 16:00, 24:00 HKT
Settlement Impact
- Cross Margin: Deducted from realized P&L
- Isolated Margin: Deducted first from realized P&L, then from fixed margin
Mark Price Determination
Mark Price = Spot Index + Moving Average Basis
Basis MA = MA((Best Bid + Best Ask)/2 - Spot Index)Daily Settlement Process
P&L Settlement at 16:00 HKT daily:
- Unrealized → Realized P&L transfer
- New settlement price becomes mark price
Loss Coverage Hierarchy:
- Risk reserve fund
- Profit-sharing among net profitable users
Position Adjustments
Leverage Changes
- Isolated: Recalculated based on entry price
- Cross: Recalculated based on current mark price
👉 Optimize your leverage strategy
Frequently Asked Questions
How is my available margin calculated?
Available margin deducts your current position requirements and any frozen margin from your total account equity. This determines how much you can use for new positions.
What happens during liquidation?
When triggered, the system takes over positions at bankruptcy price. Any surplus goes to the risk reserve fund. If losses exceed margins, they're first covered by the reserve fund, then shared among profitable traders.
Why does my liquidation price change?
For cross margin, it fluctuates with your overall account balance and unrealized P&L. For isolated positions, it remains fixed unless you manually adjust margin.
How often are funding fees charged?
Every 8 hours at Hong Kong time 08:00, 16:00, and 24:00. You only pay/receive if holding a position at these exact times.
What's the difference between mark and last price?
Mark price determines liquidation and P&L, while last price shows recent trades. The mark price mechanism prevents market manipulation affecting liquidations.
How can I avoid liquidation?
- Monitor your margin ratio closely
- Maintain adequate buffer above maintenance requirements
- Consider reducing leverage during high volatility
- Top up margin for isolated positions when needed