Spot Margin

Explaining isolated margin trading position and ROI

2023-08-17 03:501833040

1. Isolated margin trading position

1) What is an isolated margin trading position?

An isolated margin trading position represents the overall current status of a trade made with a trading pair in isolated margin mode. Understanding the isolated margin trading position helps you make better judgement on the profit and loss of your margin account from the perspective of trading, and facilitates subsequent investment decision-making.

2) Position and asset

Positions are created by trades and display the overall data about the trades. In contrast, assets are the balance and debt of certain coins.

For example, a user holds 1 BTC and borrows 2 BTC to short. The user sells 3 BTC in margin trading to earn 90,000 USDT. Neglecting the interest, the isolated margin trading position of BTC/USDT is now a short position of 3 BTC. The position details include the position cost basis, position assets, and position PnL. The assets in the account total 90,000 USDT, and the debt is 2 BTC

3) How is the isolated margin trading position calculated?

In isolated margin mode, buying is recognized as an increase and selling as a decrease in the position. If the final position value is greater than 0, it is a long position. If it is equal to 0, the position is closed, If it is less than 0, it is a short position. You can use the calculation of buying (long) or selling (short) to determine your current position size and direction.

For example, a user selects BTC/USDT for isolated margin trading, and we neglect the interest:

  1. The user buys 10 BTC, and the user's position is a long position of 10 BTC.

  2. The user sells 3 BTC, and the position becomes a long position of 7 BTC.

  3. The user sells 10 BTC, and the position becomes a short position of 3 BTC.

  4. The user buys 3 BTC, and now the position is closed.

Notes:

  1. In step 1, if the user has an asset of 1 BTC in addition to the long position of 10 BTC, and the user wants to transfer out 2 BTC, the system will first transfer the 1 BTC from the asset. So after the transfer, the user will have a long position of 9 BTC.

  2. In step 2, when the user has the long position of 7 BTC, and wants to transfer in 2 BTC, the transfer will be credited to the assets. So after the transfer, the user will still have a long position of 7 BTC, plus an asset of 2 BTC.

It should be clear now that the trading position only represents one direction (long or short), and is independent from inbound asset transfer or borrowing. It is affected by transactions, outbound transfer, repayment, and liquidation.

2. ROI of isolated margin trading

2) How is the ROI of isolated margin trading calculated?

a. How is the position cost basis calculated?

The position cost basis is the average price of all position holdings.

The position cost basis for a long position = (total open interest of t0 × position cost basis of t0 + buying volume of t1 × price of t1) ÷ total open interest of t1.

The position cost basis for a short position = (total open interest of t0 × position cost basis of t0 + selling volume of t1 × price of t1) ÷ total open interest of t1.

t0: The position before a new trade.

t1: The new trade.

The logic behind the change in the position cost basis is that the position cost basis is subject to actions in the same direction as the position.

The cost basis of a long position is affected by the buy price and the amount.

The cost basis of a short position is affected by the sell price and the amount.

If user trades in the opposite direction of the position and thus reverses the position direction, the position cost basis will be recalculated at the time of reversal.

For example, the user buys 2 A/USDT at the price of 100 USDT. Now the position is a long position of 2 A, and the position cost basis is 100 USDT.

The user sells 1 A/USDT at the price of 50 USDT. Now the position is 1 A, still a long position, so the position cost basis is only affected by the buy price and stays 100 USDT.

The user sells 3 A/USDT at the price of 20 USDT. Now the position is a short position of 2 A, which means the direction has reversed. So the position cost basis becomes the last order price, 20 USDT.

b. How is the ROI calculated?

* Note that "curren t price" in this article refers to the current index price.

Leaving out the leverage multiples, the ROI is calculated as follows:

ROI without leverage multiple for a long position = (current price – position cost basis) ÷ position cost basis

ROI without leverage multiple for a short position = (position cost basis – current price) ÷ position cost basis

Bitget can also take the leverage multiple into account when calculating the ROI. Users can select with type of ROI to display:

ROI with leverage multiple for a long position = ROI without leverage multiple for the long position × leverage multiple

ROI with leverage multiple for a short position = ROI without leverage multiple for the short position × leverage multiple

The leverage multiple used here is the highest leverage of the margin trading of the trading pair in isolated mode.

3. Unrealized PnL of isolated margin account

1) What is the unrealized PnL of isolated margin account?

Unrealized PnL is calculated based on the current price and the position cost basis of a position.

2) How is the unrealized PnL calculated?

Unrealized PnL of a long position = open interest × (current price – position cost basis)

Unrealized PnL of a short position = open interest × (position cost basis – current price)

Despite any trading history or asset of a trading pair, if the position of the trading pair is closed (buy volume equals sell volume), the unrealized PnL is zero.

For example, the user trades BTC/USDT in isolated margin mode and holds a long position of 3 BTC. The position cost basis is 2000 USDT, and the current index price of BTC/USDT is 3000 USDT.

Now the user's unrealized PnL of the position = 3 × (3000 – 2000) = 3000 USDT.

With the same position cost basis and index price, if the user has instead a short position of 3 BTC, then the unrealized PnL of the position = 3 × (2000 – 3000) = –3000 USDT.

4. Glossary

Position: The position held by the user of the trading pair A/B consists of the open interest and the position direction (long or short).

Position asset: The asset of a position comes from the trade that results in this position.

Close position: Closing a position only involves the position asset, where a market order is placed in the opposite direction of the position and in the full position asset amount. Closing a long position will sell all asset in the position. Closing a short position means buying the shorted coin with the position asset.

Position PnL: The unrealized PnL of all position holdings.

Position ROI: A percentage calculated based on the index price and the position cost basis, including ROI without the leverage multiple and ROI with the leverage multiple.

Disclaimer

Cryptocurrencies are subject to high market risk and volatility despite high growth potential. Users should make investment decisions on their own behalf and invest at their own discretion. Bitget shall not be liable for any investment losses.

Join Bitget, the World's Largest Crypto Copy Trading Platform

Sign up on Bitget now >>>

Follow us on Twitter >>>

Join our Community >>>