How to calculate Unrealized PNL and ROE%

09/14/2022 10:25 (UTC)New Guidance

How to calculate Unrealized PNL and ROE%

  • Users choose Mark price as the price basis:

ROE% =Unrealized PNL in USDT / entry margin = ( ( mark Price(1) - entry Price ) × direction of order × size ) / (position_amount × contract_multiplier × mark_price× IMR)

IMR = 1/Leverage

Unrealized PNL = position size × direction of order × (mark price - entry price)

  • Users choose the Latest price as the price basis:

Unrealized PNL = position size × direction of order × (latest price - entry price)

ROE% = Unrealized PNL in USDT / entry margin = ( ( latest price - entry Price ) × direction of order × size ) / (position_amount × contract_multiplier × mark_price× IMR)

direction of order: 1 for long order;-1 for short order

Example: Profit and Loss calculations for USDⓈ-margined contracts (BTC/USDT)

Assume you purchase (long) 10,000 USDT worth of BTCUSDT perpetual contracts at 20,000 USDT. The price increases and you exit at 25,000 USDT. Your profit will be:

((1 / Futures Entry Price) - (1 / Futures Exit Price)) × Position Size

( 1 / 20,000 - 1 / 25,000 ) × 10,000 = 0.1 Bitcoin

Conversion to USDT = 0.1 × 25,000 USDT = 2,500 USDT

 

Assume you sold (short) 10,000 USDT worth of BTCUSDT perpetual contracts at 20,000 USDT. The price decreases and you exit at 15,000 USDT. Your profit will be:

((1 / Futures Entry Price) - (1 / Futures Exit Price)) × (Position Size × -1)

( 1 / 20,000 - 1 / 15,000 ) × (-10,000) = 0.1667 Bitcoin

Conversion to USDT = 0.1667 × 15,000 USDT = 2,500 USDT

(1)Mark Price Calculation

Mark price of USDT-margined contracts is calculated by taking the median of three prices. USDT-margined swaps take the median among the funding rate basis fair price, the depth weighted fair price and the latest EMA; While USDT-margined futures take the median of the basic fair price of bid and ask middle price, the depth weighted fair price and the latest EMA. Please note that the algorithm of the depth-weighted fair price is the same as that of the latest EMA. Click to learn more about mark price