Profit and loss calculation of margin
Margin mode of single currency account
Profit and loss
Long margin with base crypto, PnL is quoted with base crypto (using Mark price and Last price)
Mark price PnL = Assets in position - (Debt + Interest) / Mark price
Last price PnL = Assets in position - (Debt + Interest) / Last price
Long margin with quote crypto, PnL is quoted with quote crypto (using Mark price and Last price)
Mark price PnL = Assets in position * Mark price - (Debt + Interest)
Last price PnL = Assets in position * Last price - (Debt + Interest)
Short margin with quote crypto, PnL is quoted with quote crypto (using Mark price and Last price)
Mark price PnL = Assets in position - (Debt + Interest) * Mark price
Last price PnL = Assets in position - (Debt + Interest) * Last price
Short margin with base crypto, PnL is quoted with base crypto (using Mark price and Last price)
Mark price PnL = Assets in position / Mark price - (Debt + Interest)
Last price PnL = Assets in position / Last price - (Debt + Interest)
Rate of return = PnL / Margin of opening position
By incorporating both mark price and last price into the profit and loss calculations, users can gain a more comprehensive understanding of their position's performance. Mark price helps to minimize the impact of abnormal market volatility, while last price provides insight into the most recent trading activity for the margin or contract.