PnL and Entry Price
Realized/unrealized PnL, average entry price behavior, and examples
- Unrealized PnL: marked to current mark price; fluctuates with market movement
- Realized PnL: crystallized on position close, funding settlement, fee deduction, or liquidation
For a long position:
Unrealized PnL=(Mark Price−Entry Price)×Position Size
For a short position:
Unrealized PnL=(Entry Price−Mark Price)×Position Size
Realized PnL comprises:
- Trade PnL on position close
- Execution fees (maker/taker)
- Funding payments and receipts
- Liquidation outcomes (if applicable)
When adding to an existing position, entry price is recalculated as a size-weighted average:
New Entry=Qexisting+Qfill(Qexisting×Pexisting)+(Qfill×Pfill)
Where Q is quantity and P is price for the existing position and the new fill respectively.
Long position:
- Buy 0.10 BTC at 50,000
- Buy 0.20 BTC at 52,000
Entry:
0.30(0.10×50,000)+(0.20×52,000)=51,333.33
If mark is 52,100:
(52,100−51,333.33)×0.30=230.00
Unrealized PnL is approximately +230 USDC.