Profit, Loss, and ROI

Realized Profit and Losses

Realized Profit and Loss (rPnL) are used to convey a position's total profit/ loss that has been resolved (paid or received). This includes all accumulated paid fees, such as the Open Position Fee, and is calculated as follows for each i i of all NNpartial closes.

rPnL=paidFees+i=1N{(closePriceiavgEntryPricei)×posQtyiif LONG(avgEntryPriceiclosePricei)×posQtyiif SHORTrPnL = paidFees + \sum_{i=1}^N \begin{cases} (closePrice_i - avgEntryPrice_i)\times posQty_i &\text{if } LONG \\ (avgEntryPrice_i - closePrice_i)\times posQty_i &\text{if } SHORT\end{cases}

Unrealized Profit and Losses

Unrealized Profit and Loss (uPnL) track the profit or loss of an open position, taking into account all unpaid accrued fees

uPnL=accruedFees+{(markPriceavgEntryPrice)×posQtyif LONG(avgEntryPricemarkPrice)×posQtyif SHORTuPnL = accruedFees + \begin{cases} (markPrice - avgEntryPrice)\times posQty &\text{if } LONG \\ (avgEntryPrice - markPrice)\times posQty &\text{if } SHORT\end{cases}

Note: Paid fees and/or accrued fees can be either negative (losses to trader) or positive (profits to trader) which occurs in cases where the funding rate is negative (ie: Short position when LongOI > ShortOI).

Return on Investment (ROI)

Return on Investment is used to establish how profitable a given trade is, and is a key metric in showcasing a trader's ability during competitions. We use the following calculation to determine position ROI for rPnL where max collateral is determined by the greatest number the collateral has reached for the position up until the time of each partial ii rPnL.

ROI(rPnL)=i=1NrPnli/maxCollateraliROI (rPnL) = \sum_{i=1}^N rPnl_i/maxCollateral_i

The ROI for uPnL is simply calculated as follows:

ROI(uPnL)=uPnL/positionCollateralROI (uPnL) = uPnL/positionCollateral

Last updated