Skip to main content

Margin and profit/loss calculations

Opening Margin

The opening margin includes the initial margin and the opening loss.

Opening losses occur when the futures contract price moves unfavourably (that is, the mark price is lower than the order price of the long order). Incorporating opening losses into the cost of opening a position can help prevent forced liquidation when traders place orders. If the opening loss is not included in the cost of opening a position, users' positions are likely to be liquidated immediately when they place an order.

Formulas

Initial Margin:

Initial Margin=Notional ValueLeverage\text{Initial Margin} = \frac{\text{Notional Value}}{\text{Leverage}}

sCNH-margined Notional Value:

Notional Value=Order Price×Quantity\text{Notional Value} = \text{Order Price} \times \text{Quantity}

Opening Loss (sCNH-margined):

Opening Loss=Quantity×min[0,Order Direction×(Mark PriceOrder Price)]\text{Opening Loss} = \text{Quantity} \times \left| \min\left[0, \text{Order Direction} \times (\text{Mark Price} - \text{Order Price})\right] \right|

Order Direction: 1 represents a long order; −1 represents a short order

Example

sCNH-margined contract. The price is 1.94 sCNH. Open long 10,000 GMYD/sCNH contracts. Leverage 10×. The mark price now is 1.90 sCNH.

Initial Margin:

1.94×10,00010=1,940 sCNH\frac{1.94 \times 10{,}000}{10} = 1{,}940 \text{ sCNH}

Opening Loss:

10,000×min[0,1×(1.901.94)]=10,000×0.04=400 sCNH10{,}000 \times \left| \min\left[0, 1 \times (1.90 - 1.94)\right] \right| = 10{,}000 \times 0.04 = 400 \text{ sCNH}

Opening Margin:

1,940+400=2,340 sCNH1{,}940 + 400 = 2{,}340 \text{ sCNH}

Average Opening Price

When an open position occurs, the average price of the open position is recalculated.

Formula

Average Opening Price:

Average Opening Price=Total Contract Value in sCNHTotal Contract Quantity\text{Average Opening Price} = \frac{\text{Total Contract Value in sCNH}}{\text{Total Contract Quantity}}

Total Contract Value in sCNH:

Total Value=(Quantity1×Price1)+(Quantity2×Price2)+\text{Total Value} = (\text{Quantity}_1 \times \text{Price}_1) + (\text{Quantity}_2 \times \text{Price}_2) + \ldots

Example

Trader A now holds a GMYD/sCNH long position of 5,000 GMYD, opening price of 1.90 sCNH. An hour later, Trader A decides to open an additional 3,000 GMYD position at 2.00 sCNH.

Total Contract Value:

(5,000×1.90)+(3,000×2.00)=9,500+6,000=15,500 sCNH(5{,}000 \times 1.90) + (3{,}000 \times 2.00) = 9{,}500 + 6{,}000 = 15{,}500 \text{ sCNH}

Total Contract Quantity:

5,000+3,000=8,000 GMYD5{,}000 + 3{,}000 = 8{,}000 \text{ GMYD}

Average Opening Price:

15,5008,000=1.9375 sCNH\frac{15{,}500}{8{,}000} = 1.9375 \text{ sCNH}

Profit/Loss

After opening a position, the position and its profit and loss can be seen in real time in the position area.

Depending on the direction of your trade, the formula for calculating profit and loss is slightly different.

For Long Positions

Formula:

Profit/Loss=Quantity×(Mark PriceAverage Opening Price)\text{Profit/Loss} = \text{Quantity} \times (\text{Mark Price} - \text{Average Opening Price})

Example

Trader B now holds a GMYD/sCNH long position of 5,000 GMYD, opening price of 1.90 sCNH. When the latest mark price is shown as 2.00 sCNH, the unrealized profit and loss is displayed as 500 sCNH.

5,000×(2.001.90)=5,000×0.10=+500 sCNH5{,}000 \times (2.00 - 1.90) = 5{,}000 \times 0.10 = +500 \text{ sCNH}

For Short Positions

Formula:

Profit/Loss=Quantity×(Average Opening PriceMark Price)\text{Profit/Loss} = \text{Quantity} \times (\text{Average Opening Price} - \text{Mark Price})

Example

Trader C now holds a GMYD/sCNH short position of 8,000 GMYD, opening price of 2.00 sCNH. When the latest mark price is shown as 1.85 sCNH, the unrealized profit and loss is displayed as 1,200 sCNH.

8,000×(2.001.85)=8,000×0.15=+1,200 sCNH8{,}000 \times (2.00 - 1.85) = 8{,}000 \times 0.15 = +1{,}200 \text{ sCNH}

Summary of Formulas

FormulaLong PositionShort Position
Notional ValueQty × PriceQty × Price
Initial MarginNotional ÷ LeverageNotional ÷ Leverage
Opening LossQty × max(0, Order Price − Mark Price)Qty × max(0, Mark Price − Order Price)
Opening MarginInitial Margin + Opening LossInitial Margin + Opening Loss
Unrealized PnLQty × (Mark Price − Entry Price)Qty × (Entry Price − Mark Price)
Realized PnLQty × (Exit Price − Entry Price)Qty × (Entry Price − Exit Price)