Understanding how to calculate profit and loss before a trader opens a position is extremely important. Profit and loss calculations are made against the contract’s collateral.
For example, a linear perpetual contract will be denominated in USDT with the USDT equivalent as collateral and an inverse perpetual contract will be denominated in the underlying asset with the asset as collateral.
To calculate the profit and loss for perpetual contracts, a trader must understand the following components:
- Entry Price
- Unrealized Profit and Loss
- Realized Profit and Loss
Entry Price
Entry price of a position is the price of an asset when a trader opens the contract. If the trader adds onto their position, their entry price will also change.
For example: Suppose that a trader opens a position on BTCUSDT-P contract with an entry price of $40000 for a position size of .2 BTC. He then decides to increase his position size by adding another .3 BTC at an entry price of $45,000. His average entry price will now be calculated by the following formula.
Average Entry Price = Total Value in USDT/ Position Size
Total Value in Contracts = ((Entry Price(1) * Position Size(1)) + (Entry Price (2) * Position Size(2)) +….. )
In case of the example given above, the average entry price will be:
Total Value in USDT
= (($40000*.2 + $45000*.3)
= $21500
Position Size
= .2BTC + .3BTC
= .5BTC
Average Entry Price
= $21500/.5
= $43000
Unrealized Profit and Loss
Unrealized profit and loss is the estimated gain or loss against a position a trader has opened. The unrealized PnL will be shown in the positions tab of your perpetual orders.
The formula for calculating unrealized PnL is:
Unrealized PnL = Position Size * Direction of the Trade * Difference between Mark and Entry Price
Note: Direction of the Trade = 1 for long positions and -1 for short positions
For Long Positions
Suppose that a trader holds a long position on BTCUSDT contract for .5 BTC at an entry price of $40000. For the mark price of $45000, his unrealized PnL will be
Unrealized PnL
= .5 * 1 * ($45000 - $40000)
= 2500 USDT
If the mark price in the order book is showing $35000, his unrealized PnL will be
Unrealized PnL
= .5 * 1 * ($35000 - $40000)
= -2500 USDT
For Short Positions
Suppose that a trader holds a short position on BTCUSDT contract for .5 BTC at an entry price of $40000. For the mark price of $35000, his unrealized PnL will be
Unrealized PnL
= .5 * -1 * ($35000 - $40000)
= 2500 USDT
If the mark price in the order book is showing $45000, his unrealized PnL will be
Unrealized PnL
= .5 * 1 * ($45000 - $40000)
= -2500 USDT
Realized PnL
When a trader finally closes his position, his PnL becomes realized and his profit/loss is added/deducted from his account. Realized PnL values are different from unrealized PnL values as trading fees is also deducted when calculating realized PnL.
|
Calculation of Unrealized PnL |
Calculation of Unrealized PnL |
Position Profit and Loss |
Yes |
Yes |
Trading Fee Deduction |
No |
Yes |
Funding Fee Deduction |
No |
Yes |
The formula for calculating realized PnL is:
Realized PnL = Position Profit and Loss + Trading Fee + Funding Fee
For example: Suppose that a trader opens a BTCUSDT long contract for .5 BTC at an entry price of $40000. When the price reaches $45000, he decides to close the contract. Based on the example given above, he will have an unrealized PnL of 2500 USDT. But his realized PNL will be a bit less due to deduction of trading and funding fee.
Comments
0 comments
Article is closed for comments.