GET YOUR JOURNAL APPINCLUDED WITH ELITE+
All guides

Backtesting with L2 and tape

Yesterday's book cannot be bought ready-made nor reconstructed. Either you recorded it, or that session does not exist for you.

By Fabian Garcia and Daniel UrbayPublished Updated 6 min read

Why candles are not enough

A strategy based on absorption, icebergs or liquidity needs to know what was in the book and what executed, tick by tick. With one-minute candles that information is not there: it was lost when they were aggregated.

Testing a flow strategy on candles produces results that mean nothing, neither good nor bad.

What has to be stored

Two synchronised streams: the tape —every trade with price, size and side— and the book with its updates, both with a precise timestamp.

It takes up space and has to be recorded continuously, because there is no way of getting it back afterwards. That is why almost nobody has a history of microstructure.

  • Tape: for delta, footprint and execution patterns.
  • Book: for liquidity, spoofing, pulling and icebergs.
  • A shared clock: without synchronisation, crossing the two is worthless.

The mistakes that invalidate a test

Looking into the future without realising: using a candle's close to decide within that same candle is the classic one, and it turns any strategy into a brilliant one.

Forgetting the costs: commissions, slippage and the fact that your own order would have changed the book. On strategies with many trades, that alone eats the result.

And tuning until it works. If you have to touch ten parameters to make it work, what you have found is the past, not an edge.

Your own archive

Recording your own book-and-tape archive means you can go back to any session you recorded and test on real data, not on an approximation.

In Tradelix that is the archive feature of the Institutional plan, the same one that feeds replay with microstructure.

Frequently asked questions

Can historical book data be bought?
There are providers and they are expensive. Recording it yourself from the connection you already have is far cheaper, at the cost of only starting to build up from today.
How much space does it take?
Quite a lot: the book of a liquid instrument generates a huge number of updates per second. People usually record only what they trade.
Is a three-month backtest any good?
It depends how many trades it produces. What matters is the number of cases and that they cover different market conditions, not the length of the calendar.

Educational material. Trading leveraged futures carries a risk of loss that can exceed the capital deposited. None of the above is investment advice or a recommendation to buy or sell. Full risk disclosure.

See how this is read in Tradelix