About Perpetuals Margin Terms

Coinex India
4 min readJul 18, 2020

1) Account Income:

Definition: it refers to the actual assets in the user’s perpetual account.

Formula: Account Income = Transferred-in Amount — Transferred-out Amount + Realized PNL + Unrealized PNL

2) Available Balance:

Definition: Funds available for new positions or margin.

Formula: Available Balance = Account Balance — Frozen Margin;

Account Balance = Transferred-in Amount — Transferred-out Amount + Realized PNL — (Margin Balance — Unrealized PNL)

3) Position Amount:

Definition: it refers to the contract amount of the current position. The red number short positions and the green number is long positions

4) Avg. Open Price:

Definition: the average price of long positions/short positions

Computation: Avg. Open Price = Position Amount * Contract Value / Cumulative Open Value

5) Open Value/Cumulative Open Value

Definition: Open Value refers to the value after the position is opened; Cumulative Open Value refers to the current value after the position is added to/lightened;

Computation: Open Value = Position Amount * Contract Value / Open Strike Price;

Cumulative Open Value = ∑Cumulative Historical Open Value — ∑Cumulative Historical Liquidation Value

6) Position Value

Definition: The nominal value of the current position calculated by the mark price.

Computation: Position Value = Position Amount * Contract Value / Mark Price

7) Position Margin

Definition: It refers to the amount of assets locked for the position. In isolated margining, when the position margin is lower than the maintenance margin, the position will be forcedly liquidated, and the user can manually increase or decrease the maintenance margin; In cross margining, when the position margin is lower than the maintenance margin, the available margin will be automatically transferred to the position.

Formula: Position Margin = Open Value / Leverage(Initial Margin) + Increased Margin — Decreased Margin + Unrealized PNL

Note: When increasing margin, the position value will be increased by the corresponding amount;

When decreasing margin, it will be deducted by ratio.

When increasing leverage, the maintenance margin will remain the same if the initial margin is decreased;

When decreasing leverage, if increasing the initial margin, and the initial margin < the position margin, then the portion margin remains the same; if the initial margin > the position margin, then an amount will be transferred from the available balance to offset the differential; If the available amount is insufficient, then the leverage cannot be adjusted. Please note that here it refers to the situation where the the available balance is not sufficient to increase the margin to the initial margin other than the maintenance margin.

Unrealized PNL will change according to the mark price.

8) Initial Margin:

Definition: the minimum amount of margin for position open.

Formula: Initial Margin = Open Value * Initial Margin Rate;

Initial Margin Rate = 1 / Leverage * 100%

9) Maintenance Margin:

Definition: the minimum amount of margin required to keep your position open.

Formula: Maintenance Margin = Cumulative Open Value * Maintenance Margin Rate;

Cumulative Open Value = ∑ Historical Position Value

10) Frozen Margin

Definition: It refers to the frozen initial margin and trading fees when the current order cannot be executed.

Formulas:

A. (Frozen) Open Buying Margin = Contract Amount * Contract Value / Limit Buying Price * Initial Margin Rate

Buying Trading Fees = Contract Amount * Contract Value / Buying Limit Price * Taker Rate

Note: Initial Margin Rate = 1 / Leverage * 100%

B. (Frozen) Open Selling Margin = Contract Amount * Contract Value / Limit Selling Price * Initial Margin Rate

Selling Trading Fees = Contract Amount * Contract Value / Selling Limit Price * Taker Rate

Note: Frozen buying/selling limit price will be calculated at the lowest price of their own direction.

11) Profit Rate

Calculation: Profit Rate = Unrealized PNL / Initial Margin

12) Unrealized PNL

Definition: provided the position is liquidated at the mark price, and the current position will calculate the PNL based on the the strike price.

Computation:

(Longs) Unrealized PNL = Contract Amount * Value * (1/Avg. Open price — 1/Mark price)

(Shorts) Unrealized PNL = Contract Amount * Value * (1/Mark price — 1/Avg. Open price)

13) Realized PNL

Definition: The realized PNL since opening the position, including the realized PNL after liquidation, funding, and trading fees.

Computation:

(Longs) Realized PNL = Contract Amount * Value * (1/Avg. Open price — 1/Liquidation price)

(Shorts) Realized PNL = Contract Amount * Value * (1/Liquidation Price — 1/Avg. Open Price)

Unit: BCH/BTC/ETH; Minimum Precision: 0.00000001; No rounding.

14) Liquidation Risk

Definition: it is calculated based on the position margin and the maintenance margin of the current position. The larger the number is, the higher the risk. When the risk reaches 70%, the platform will alert the user of forced liquidation which will be trigged when it reaches 100%.

(Cross Margin) Risk Limits = Maintenance Margin / Position Margin * 100%

(Isolated Margin) Risk Limits = Maintenance Margin / (Balance + Position Margin) * 100%

--

--