0
$\begingroup$

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?

$\endgroup$
1
$\begingroup$

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).

$\endgroup$
  • $\begingroup$ So, intraday, if you buy @A and sell @B you net it to get some realized pnl but any leftover shares you mark to market? (i.e. to last trade or to close at EOD) $\endgroup$ – Alicia Myskina Jul 17 '15 at 13:01
  • $\begingroup$ @AliciaMyskina that's what I'm saying, yes. That the way you report it doesn't change reality. Reality is best measured with mark to market. It boils things down to a single p&l number too, which is much easier to work with. $\endgroup$ – RaveTheTadpole Jul 17 '15 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.