Use Mark-to-Market P&L to Avoid Trade-Ordering Effects
Summary
The document examines how FIFO trade matching can produce different realized P&L and residual inventory when trades from two locations are concatenated in different orders. Its example uses offsetting trades at locations A and B: the order changes which purchase remains unmatched, even though the final net position is the same. Clock drift can make a precise interleaving of trades difficult.
The answer recommends marking the overall position to market instead of relying on realized P&L plus open-position P&L. A market price, such as the latest trade for an intraday strategy or a recent close for a longer-term one, values the open inventory and reduces the importance of arbitrary matching order. The response argues that if timestamps are too close to order reliably, local prices should also be similar; this is an intuition rather than a demonstrated guarantee. Marking to market does not resolve accounting or tax rules that may require a specific lot-matching convention.
Key ideas
- FIFO matching can make realized P&L depend on how trades from separate locations are ordered.
- Different matching sequences can change which lots remain open while leaving the net position unchanged.
- Marking the combined position to market reduces the influence of arbitrary trade ordering on reported total P&L.
- The chosen market price may be the latest trade intraday or a recent close for longer horizons.
- Tax and accounting reporting may still require a specified method for matching lots.
Tags
Full text
# What P&L netting should one use when a strategy has trades in two different geographic locations? # What P&L netting should one use when a strategy has trades in two different geographic locations? I am familiar with the FIFO methodology of netting buys and sells to obtain a realized P&L and outstanding position. Suppose there's a strategy which runs in two different places A, and B and tries to place trades at A and B which are offsetting (like pair trading). In practice, they will both generate a log of trades (A.trades and B.trades). When I backtest the strategy I look at the trades in the order from concatenating B.trades to A.trades. This pnl can be very different from concatenating the other way, or interleaving more realistically by matching timezone adjusted trades. For example. For illustration only. Suppose we had: A.trades ``` Sell 1 for 10$ Buy 2 for 10$ Sell 3 for 7$ ``` and B.trades: ``` Buy 1 for 5$ Buy 2 for 5$ ``` If I concatenate B.trades to A.trades and run a fifo algorithm I get a realized PNL of 1$ with 1 share left long. However, if interleave them I could have: Interleaved.trades: ``` Sell 1 for 10$ Buy 1 for 5$ Buy 2 for 5$ Buy 2 for 10$ Sell 3 for 7$ ``` And then in that case the FIFO algorithm gives me a realized P&L of 6$ with one share long in the end. I can see from running this by hand that the reason is that the "more expensive" buy is left unmatched in the second case. But it illustrates how strongly it can influence P&L. Now, it's not always straightforward to interleave trades in correct order of time if the units are small and there is clock drift (measuring time in two different places with different clocks) so it's not always clear we can capture a universal ordering. What could be done or is done in practice with a situation like this? ## Answer by RaveTheTadpole (score 2) https://quant.stackexchange.com/a/18903 I would definitely want to mark to market, instead of reporting realized + open p&l. Because the time ordering doesn't really affect the p&l, just the breakdown between realized and open. Which I don't think matters to most people. To do this you need a market price, to mark your open position at. In an intraday context you could use the last traded price. In a long term context you could use the most recent close. If your timestamps are so close as to make A & B clocks not reliably ordered, the prices at A & B should be pretty much the same too. Otherwise you have some pretty awesome pairs opportunities. So this problem might only matter to a tax accountant (which you may be, of course).
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.