PNL and Liquidation
Profit and Loss (PNL)
Unrealized PNL (Unpnl)
After a participant opens a position in crypto futures at time i, the PNL for that position at any subsequent time t (t ∈ [0, T)) before closing is referred to as Unrealized PNL (Unpnl). The formula for Unpnl at time t is as follows:
Where:
- The superscript L/S denotes long/short positions.
- The subscript t denotes the moment at time t.
- S_t represents the price of the underlying asset at time t (≥ 0).
- Q represents the position size.
- F_i,t represents the funding rate amount to be collected or compensated at time t for the position opened at time i.
Realized PNL (pnl)
After a participant opens a position in crypto futures at time i and chooses to close it at time T, the corresponding pnl is calculated as follows:
Where:
- The superscript L/S denotes long/short positions.
- S_T represents the price of the underlying asset at time T (≥ 0).
- Q represents the position size.
- F_i,T represents the funding rate amount to be collected or compensated at time T for the position opened at time i.
Liquidation Price (Liq)
After opening a position in cryptocurrency futures, the participant can choose to close their position at any subsequent time t (t ∈ [0, T)). The net asset value of the position at time t (the amount received after closing the position at time t) is calculated as follows:
Where:
- The superscript L/S denotes long/short positions.
- M_t represents the margin balance at time t (≥ 0).
- Unpnl_t denotes the unrealized PNL at time t.
The system's maintenance margin level (liquidation threshold) is defined as:
Where:
- a is the minimum residual balance parameter in the system, currently set to 15.
- m is the maintenance margin ratio, currently set at 0.5% for crypto, 0.05% for forex.
Therefore, the liquidation price formula at time t is as follows:
Where:
- The superscript L/S denotes long/short positions.
- S_0 represents the price of the underlying asset at time 0 (opening price).
- Mm represents the maintenance margin.
- Q represents the position size.
- F_i,t represents the funding rate amount to be collected or compensated at time t for the position opened at time i.
- M_t represents the margin balance at time t (≥ 0).