Profit and loss calculation of margin
A. Cross margin mode of single currency account
Profit and loss
Long margin with trading crypto, PnL is quoted with trading 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 pricing crypto, PnL is quoted with pricing 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 pricing crypto, PnL is quoted with pricing 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 trading crypto, PnL is quoted with trading 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
B. Isolated margin mode of Single / Multi-currency and Portfolio margin account
Profit and loss
Long position PnL (using Mark price and Last price)
Mark price PnL = Assets in position - Margin - (Debt + Interest) / Mark price
Last price PnL = Assets in position - Margin - (Debt + Interest) / Last price
Short position PnL (using Mark price and Last price)
Mark price PnL = Assets in position - Margin - (Debt + Interest) * Mark price
Last price PnL = Assets in position - Margin - (Debt + Interest) * Last price
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.