Regardless of any trades, it is important to understand how P&L is calculated before entering one. In sequential order, traders need to understand the following variables in order to accurately calculate their P&L.
1) Average Entry Price of position
2) Unrealized P&L and unrealized P&L% of position
1) Average Entry Price (AEP) of position
In Bybit, due to our inverse contract trading (BTCUSD, ETHUSD, EOSUSD, and XRPUSD), whenever traders add on to their position via new orders, AEP will change.
For example: Trader A holds an existing BTCUSD open buy position of 1,000 qty with an entry price of USD 5000. After an hour, Trader A decided to increase his buy position by opening an additional 2,000 qty with an entry price of USD 6,000. Below shows how the formula for AEP and the computation steps.
Average entry price = Total quantity of contracts / Total contract value in BTC
By using the figures above:
a) Total quantity of contracts
= 1,000 + 2,000
= 3,000
Total contract value in BTC
= (1000 / 5000) + (2000 / 6000)
= 0.53333334 BTC
Average entry price
= (3000 / 0.53333334 BTC)
= 5625.00 USD
2) Unrealized P&L
Once an order is successfully executed, an open position and its real-time unrealized P&L will be shown inside the positions tab.
Depending on which side of the trade you are in, the formula used to calculate the unrealized P&L will differ.
For long position:
For example:
Trader B holds an existing BTCUSD open buy position of 1,000 qty with an entry price of USD 5000. When the Last Traded Price inside the order book is showing USD 5,500, the unrealized P&L shown will be 0.01819 BTC.
Unrealized P&L = Contract Qty x [(1/Avg Entry Price) - (1/Last Traded Price)]
= 1000 x [ (1 / 5000) - (1 / 5500) ]
= 1,000 x 0.00001819 BTC
= 0.01819 BTC
For short position
For example: Trader C holds an existing BTCUSD open sell position of 1,000 qty with an entry price of USD 5000. When the Last Traded Price inside the order book is showing USD 4,500, the unrealized P&L shown will be 0.02223 BTC.
Unrealized P&L = Contract Qty x [(1/Last Traded Price) - (1/Avg Entry Price)]
= 1000 x [ (1 / 4500) - (1 / 5000) ]
= 1,000 x 0.00002223 BTC
= 0.02223 BTC
Note:
a) Due to the characteristics of inverse contracts, your P&L is settled in coin type instead of USD. The USD serves mainly as a price quote mechanism for the convenience of traders.
b) This means that when the price movement is by a certain price (example USD 500) in the profitable or non-profitable direction, it does not mean that you will gain or lose USD 500 respectively.
c) Increasing leverage does not multiply your profits/losses directly. Instead, profits and losses are determined by the position size and price movement. In short,
- The higher the leverage, the lower the margin collateral needed to open your position
- The larger the contract quantity, the bigger the profits/losses.
- The larger the price movement relative to entry price, the bigger the profits/losses.
d) The default unrealized P&L is shown based on Last Traded Price. When hovering a mouse cursor on top of the figure, the unrealized P&L will change and show an unrealized P&L based on Mark Price
e) Last but not least, unrealized P&L does not factor in any trading or funding fees which traders may have received/paid out in the process of opening and holding the position.
2A) Unrealized P&L%
Unrealized P&L% basically shows the Return on Investment (ROI) of the position in its percentage form. Just like the Unrealized P&L, this figure also varies depending on the movement of Last Traded Price. As such, the Unrealized PNL% or ROI formula is below.
Unrealized P&L% = [ Position's unrealized P&L / Position Margin ] x 100%
Position Margin = Initial margin + Fee to close
Again using Trader B as an example, Trader B holds an existing BTCUSD open buy position of 1,000 qty with an entry price of USD 5000. When the Last Traded Price inside the order book is showing USD 5,500, the unrealized P&L shown will be 0.01819 BTC. Assuming the leverage used is 20x.
Based on our earlier calculation, the position's unrealized P&L = 0.01819 BTC
Initial margin = Qty / (entry price x leverage) = 1000 / (5000 x 20) = 0.01 BTC
Fee to close = ( Qty / Bankruptcy Price ) x 0.075% = ( 1000 / 4762 ) x 0.075% = 0.00015750 BTC
Unrealized P&L% = [ 0.01819 BTC / ( 0.01 BTC + 0.00015750 BTC ) ] x 100% = 179.087%
Note:
a) Some traders may misunderstood this but adjustments to increase leverage does not increase your unrealized profits. Instead, traders will see an increase in unrealized P&L% due to a reduction in your position margin and not because of an increase in actual profits. Using Trader B as an example again, notice that regardless if leverage is 20x, 10x or 50x, the unrealized P&L remains the same.
- If Trader B uses the same 20x leverage, his unrealized P&L = 0.01819 BTC, unrealized P&L% = 179.09%
- If Trader B reduces the leverage to 10x, his unrealized P&L = 0.01819 BTC, unrealized P&L% = 90.20%
- If Trader B increases the leverage to 50x his unrealized P&L = 0.01819 BTC, unrealized P&L% = 437.99%
b) For cross margin mode, the position margin will be calculated base on the leverage used for the particular coin.
3) Closed P&L
When traders finally closed their position, the P&L becomes realized and is recorded inside the Closed P&L tab within the Assets page. Unlike unrealized P&L, there are some major differences in the calculation. Below summarizes the differences between the unrealized P&L and closed P&L.
Calculation of Unrealized P&L | Calculation of Closed P&L | |
Position Profit and Loss (P&L) | YES | YES |
Trading Fee(s) | NO | YES |
Funding Fee(s) | NO | YES |
Therefore, assuming full closing of the entire position, the formula for calculating Closed P&L is as follows
Closed P&L = Position P&L - Fee to open - Fee to close - Sum of all funding fees paid/received
Using Trader C as an example, Trader C holds an existing BTCUSD open sell position of 1,000 qty with an entry price of USD 5000. When the Last Traded Price inside the order book is showing USD 4,500, trader C decided to close the entire position via Close by Market function. Assuming that Trader C also opened the position via a market order and funding fees totaling 0.00005 BTC was paid out while holding the position.
Based on our earlier calculation, the position's P&L = 0.02223 BTC received
Fee to open = (1000 / 5000) x 0.075% = 0.00015 BTC paid out
Fee to close = (1000/4500) x 0.075% = 0.00016667 BTC paid out
Sum of all funding fees paid/received = 0.00005 BTC paid out
Closed P&L = 0.02223 - 0.00015 - 0.00016667 - 0.00005 = 0.02186333 BTC
Note:
a) The above example only applies when the entire position is opened and closed via a single order in both directions.
b) For partial closing of positions, Closed P&L will pro-rate all fees (fee to open and funding fee(s)) according to percentage of position partially closed and use the pro-rated figure to compute the Closed P&L
4) Definition of P&L terms
Inside the Closed P&L tab, traders will be able to see various P&L terms right under the Closed P&L table. Each P&L term has its uses and definition.
What is the total realized P&L?
Total realized P&L = Sum (since first trade) of all position P&L + trading fees + funding fees
Note:
a) Total realized P&L is permanent and cannot be changed or reset to zero.
What is the daily realized P&L?
Daily realized P&L = Sum (with 24 hours) of all position P&L + trading fees + funding fees
Note:
a) Daily realized P&L accounts for a time period between 0000 UTC and 0000 UTC the following day
b) This figure is not permanent and will be reset to zero when it reaches 0000 UTC
What is the unrealized P&L (Mark Price)?
Unrealized P&L (Mark Price) = Unrealized P&L of existing open position based on current Mark Price
What is the unrealized P&L (Last Traded Price)?
Unrealized P&L (Last Traded Price) = Unrealized P&L of existing open position based on current Last Traded Price