Futures trading
PnL calculation for USDT-M Futures and Coin-M Futures
2024-11-07 07:26046
1. Pagkalkula ng PnL para sa USDT-M Futures
Sa USDT-M Futures trading, ang USDT ay ginagamit bilang margin, at ang PnL ay kinakalkula sa USDT.
Formula
USDT-M Futures PnL = direksyon × (exit price – entry price) × position size – transaction fees.
Where:
-
Direction: 1 for buying, and -1 for selling.
-
Entry price and exit price: The prices at which the user opens and closes a position.
-
Position size: The amount of tokens the user is trading. For example, when trading BTCUSDT futures, the position size is the corresponding amount of BTC. Note that futures trading allows for leverage, meaning you can trade a larger amount of tokens with a smaller margin.
-
Transaction fees: These are based on the maker and taker fee rates.
2. PnL calculation for Coin-M Futures
Coin-M Futures trading uses cryptocurrencies other than USDT (such as BTC and ETH) as margin, and the PnL is calculated in the token used as margin. For example, if BTC is used as margin for BTCUSD trading, the profit will be earned in BTC. Since the value of the margin coin fluctuates with market conditions, the PnL in Coin-M Futures is also affected by changes in the market price of the margin coin.
Formula:
Coin-M Futures PnL = direction × (exit price – entry price) × position size ÷ market price of margin coin – transaction fees.
Where:
-
Market price of margin coin: The market price of the token used as margin. For example, if BTC is used as margin, the market price of the margin coin is the market price of BTC.
-
Note that before a position is closed, the market price of the margin coin fluctuates in real-time. When the position is closed, the market price of the margin coin at the time of closing will be used to calculate the final PnL.
3. TP/SL PnL estimation formula for Coin-M Futures
TP/SL orders are used in Coin-M Futures trading. In the advanced settings for TP/SL, you can find the estimated PnL based on the specified TP/SL price.
There are two scenarios for PnL estimation for Coin-M Futures. 1. When the margin coin is not in the trading pair. 2. When the margin coin is in the trading pair.
The key difference between these cases is whether the market price of the margin coin can be predicted when the TP/SL close happens.
1.
Formula when the margin coin is not in the trading pair (e.g., using BTC as margin to trade ETHUSD futures):
TP/SL estimated PnL = direction × (TP/SL price target – order price) × position size) ÷ market price of margin coin.
Where:
-
TP/SL price target: The price target at which the TP/SL will be triggered. For closing with a market order, the TP/SL trigger price is used. For closing with a limit order, the limit price is used.
-
The entry price of the trading pair when opening the position. If the order has not been filled, it is the price specified by the user; if filled, it is the average price at which the position was filled.
-
Current price of margin coin: The price should reflect the actual price of the margin coin when the position is closed via TP/SL. However, as future prices cannot be predicted, this estimation uses the current market price of the margin coin, which is why the PnL estimation for Coin-M Futures may not be fully accurate and is only for reference.
2.
Formula when the margin coin is in the trading pair (e.g., using BTC as margin to trade BTCUSD futures):
TP/SL estimated PnL = direction × (TP/SL price target – order price) × position size ÷ TP/SL price target.
Where:
-
TP/SL price target as denominator: Since the margin coin is part of the trading pair, the TP/SL price target is also the market price of the margin coin at the time the TP/SL is triggered. Therefore, the TP/SL price target appears as the denominator.