
Understanding the calculation and concepts of profit and loss (PnL) in futures grid is crucial for optimizing trading strategies. This guide explains Matched PnL, Unmatched PnL, Realized PnL, and Unrealized PnL, with practical examples.
I. Concepts
1. Matched PnL
Matched PnL (also referred to as arbitrage profit), is generated when a short position (or a long position) is matched with a corresponding buy (or sell) order, completing a buy-sell arbitrage transaction. This PnL represents the realized PnL from specific buy-sell matches in the grid trading strategy.
2. Unmatched PnL
Unmatched PnL is the gain or loss from positions that have not yet been matched with a counter order. During grid trading, these positions remain open until they're closed with an opposing trade, contributing to either profits or losses.
3. Realized PnL
In a grid strategy, each open position and close position are merged into a single perpetual futures position. Realized PnL refers to the total profit or loss from all closed positions within the strategy. The calculation differs based on the side of the position:
For Open Long: Realized PnL = Position Size * (Average Close Price − Average Open Price).
For Open Short: Realized PnL = Position Size * (Average Open Price − Average Close Price).
4. Unrealized PnL
Unrealized PnL refers to the cumulative profit or loss from all open positions that have not yet been closed. The calculation also depends on the side of the position:
For Open Long: Unrealized PnL = Position Size * (Mark Price − Average Open Price).
For Open Short: Unrealized PnL = Position Size * (Average Open Price − Mark Price).
II. Examples
Take the BTCUSDT contract pair as an example. Assume a neutral grid strategy is established at a price of 95,000, with long orders placed at 91,000, 92,000, 93,000, and 94,000, each buying 1 BTC.
When the price drops from 95,000 to 91,000 and then rises to 92,500, the grid bot opens long positions at the four price levels. And at 92,000, a 1 BTC position is closed to match the 91,000 long order.
Average Open Price = (91,000 + 92,000 + 93,000 + 94,000) / 4 = 92,500. This is the average of the multiple open prices, which serves as the benchmark for subsequent PnL calculations.
Realized PnL = Position Size * (Average Close Price − Average Open Price) = 1 * (92,000 − 92,500) = −500. Since the close price is lower than the average open price, a loss of 500 is incurred.
Unrealized PnL = Position Size * (Mark Price − Average Open Price) = 3 * (92,500 − 92,500) = 0. With 3 BTC remaining open, and the mark price equals to the average open price, unrealized PnL is zero.
Total Revenue = Realized PnL + Unrealized PnL + Trading Fee + Funding Fee = −500 (Assuming trading and funding fees are 0). The overall trading result shows a net loss of 500.
Matched PnL = Size * (Close Price − Open Price) =1 * (92,000−91,000) = 1,000. The matched PnL is derived from multiplying the size by the price difference between the 91,000 open order and the 92,000 close order.
Unmatched PnL = Total Revenue − Matched PnL - Funding Fees = −500−1,000 - 0 = −1,500. By subtracting the matched PnL and funding fees (assumed to be zero in this case) from the total revenue, the unmatched PnL is calculated, reflecting the PnL from positions that remain unmatched.
Through these detailed explanations and examples, we hope to help you better understand the PnL calculation methods and related revenues in Futures Grid. In real trading, closely monitor market dynamics and position changes to make more informed trading decisions.
III. How Do They Affect Trading Decisions
Adjusting Positions Based on PnL: If realized PnL shows significant losses, consider reducing position sizes to mitigate risks. Conversely, if realized PnL is positive and market trends remain favorable, increasing positions might be viable. If unrealized PnL shows significant losses without clear signs of market reversal, consider stop-loss measures to prevent further deterioration.
Optimizing Strategy Based on Profit Composition: A higher proportion of matched PnL indicates a successful arbitrage strategy. Optimize grid settings to capture more arbitrage opportunities. Conversely, if unmatched PnL exhibit high volatility, reassess the grid’s price level settings, interval, and order size to minimize the risk of unmatched positions.