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

For example,

Suppose there is 1000 USDT in a leader trader’s portfolio at T0. T0(IOPV)=1.T0(ROI)=0%

Then, the portfolio margin balance changes into 1200 USDT after one transaction at T1.

There is no transfer in and transfer out.

T1(IOPV)= [T(Margin Balance) - Deposit Amount+Withdrawal amount)] / (T-1)(Margin Balance)*(T-1)(IOPV) =[1200-0+0]/ 1000*1=1.2

TI(ROI) = T1(IOPV) - T0(IOPV) *100%= 1.2-1*100% = 20%

Now suppose the trader transfers 500 USDT to the portfolio and the portfolio margin balance gets to 1800 at T2.

T2(IOPV)= [T(Margin Balance) - Deposit Amount+Withdrawal amount)] / (T-1)(Margin Balance)*(T-1)(IOPV) =[1800-500+0]/ 1200*1= 1.0833

T2(ROI) = T2(IOPV) - T0(IOPV) *100%= 1.0833-1*100% = 8.33%