In this article, we’ll walk you through the key metrics in copy trading.

**- How to Calculate Realized PNL and Unrealized PNL?**

For USDT-Margined perpetual contracts:

Realized PNL for a position = direction of the order * ( exit price - entry price) * position size

Unrealized PNL for a position = direction of the order * (mark price - entry price) * position size

*Direction of the order: 1 for long order; -1 for short order

Portfolio's Realized PNL = Cumulative Realized PNL for the positions - net funding fees - cumulative trading commission

Portfolio's unrealized PNL = Unrealized PNL of all open positions

**- How is Portfolio Balance calculated?**

Portfolio balance = Wallet balance = Net deposits + Portfolio's Realized PNL

**- How is Portfolio Assets calculated?**

Margin balance = Wallet balance + Unrealized PNL

**- How to calculate MDD?**

The maximum drawdown (MDD) is the maximum observed loss from a peak to a trough of a portfolio, before a new peak is attained. Maximum drawdown is an indicator of downside risk over a specified time period. The higher the MDD, the greater the risk is.

Maximum drawdown is a specific measure of drawdown that looks for the greatest movement from a high point to a low point, before a new peak is achieved. However, it's important to note that it only measures the size of the largest loss, without taking into consideration the frequency of large losses. Because it measures only the largest drawdown, MDD does not indicate how long it took an investor to recover from the loss, or if the investment even recovered at all.

30D MDD: Portfolio's maximum drawdown in the past 30 days.

MDD calculation rule: MDD = (M-N)/M *100%

M refers to the peak value of the IOPV in the period

N refers to the trough value of the IOPV in the period

**- How are ROI and PNL calculated?**

Return on Investment (ROI) is a ratio or percentage value that reflects the profitability or efficiency of a trade or investment. ROI can also be used to compare different types of investments or multiple trading operations.

In order to present a more accurate depiction of portfolio performance, the ROI calculation has been adjusted.

Calculating the ROI with it’s Indicative Optimized Portfolio Value(IOPV) will avoid the ROI distortion caused by deposits and withdrawals.

ROI =（IOPV at the end of the period - Initial IOPV）*100%

Total PNL = Margin Balance - Initial deposit - cumulative deposits + cumulative withdrawals

*When a portfolio is created, the initial IOPV for the portfolio is 1. If deposit or withdrawals are conducted, the IOPV will be updated immediately

T : value after deposits / withdrawals

T-1: value before any deposits / withdrawals

When adding funds:

T(IOPV) = [T(Margin Balance) - Deposit Amount)] / (T-1)(Margin Balance)*(T-1)(IOPV)

When withdraw funds:

T(IOPV) = [T(Margin Balance) + Withdrawal amount)] / (T-1)(Margin Balance)*(T-1)(IOPV)

If no deposit or withdrawal occurred：

IOPV at the end of a period = Current Margin Balance / Initial Margin Balance*Initial IOPV