Paper testing · December 1, 2026

How to spot a stale order book in a paper test

When an order-book feed drops out, a simulator may keep showing the last bid and ask. Those numbers can look normal even though they no longer describe the market. In a paper test, mark that interval unverified rather than estimating fills from the old book.

Test an intentional gap

Replay a fictional stream that shows a best bid of $99.90 and a best ask of $100.00 at 10:00:00. Disconnect it for five seconds. The old prices may still be visible, but your test should mark the interval as missing and produce no snapshot-based fill estimate for it. A quiet market and a broken feed are not the same thing.

Check integrity before using new data

Kraken’s Level 2 book documentation describes snapshots and ordered updates, each carrying a checksum for the top ten levels on both sides. A failed check means the local copy is not trustworthy. Once the feed has reconnected, start from a fresh snapshot and verify it before using it. A matching checksum checks those levels, not the age of the data or whether an order could fill.

Keep the gap in your results

Record the last good update time, the first verified snapshot after reconnecting, and any simulated activity skipped between them. Count those skipped intervals separately from valid no-fill results. Otherwise a data problem can look like a strategy result.

The prices and times above are fictional and illustrate data quality in a simulation, not a trading recommendation.