PnL and Entry Price

Realized/unrealized PnL, average entry price behavior, and examples

PnL Types

  • Unrealized PnL: marked to current mark price; fluctuates with market movement
  • Realized PnL: crystallized on position close, funding settlement, fee deduction, or liquidation

Unrealized PnL

For a long position:

Unrealized PnL=(Mark PriceEntry Price)×Position Size\text{Unrealized PnL} = (\text{Mark Price} - \text{Entry Price}) \times \text{Position Size}

For a short position:

Unrealized PnL=(Entry PriceMark Price)×Position Size\text{Unrealized PnL} = (\text{Entry Price} - \text{Mark Price}) \times \text{Position Size}

Realized PnL Components

Realized PnL comprises:

  • Trade PnL on position close
  • Execution fees (maker/taker)
  • Funding payments and receipts
  • Liquidation outcomes (if applicable)

Entry Price Updates

When adding to an existing position, entry price is recalculated as a size-weighted average:

New Entry=(Qexisting×Pexisting)+(Qfill×Pfill)Qexisting+Qfill\text{New Entry} = \frac{(Q_{\text{existing}} \times P_{\text{existing}}) + (Q_{\text{fill}} \times P_{\text{fill}})}{Q_{\text{existing}} + Q_{\text{fill}}}

Where QQ is quantity and PP is price for the existing position and the new fill respectively.

Example

Long position:

  • Buy 0.10 BTC at 50,000
  • Buy 0.20 BTC at 52,000

Entry:

(0.10×50,000)+(0.20×52,000)0.30=51,333.33\frac{(0.10 \times 50{,}000) + (0.20 \times 52{,}000)}{0.30} = 51{,}333.33

If mark is 52,100:

(52,10051,333.33)×0.30=230.00(52{,}100 - 51{,}333.33) \times 0.30 = 230.00

Unrealized PnL is approximately +230 USDC.

On this page