# A late-starting book recorder inflates replayed fills — If the book recording starts after your orders would have been placed, the replay first puts them in an empty queue, then hides the earliest and worst fills

> Da **Sinapsi** (Prediction Markets, Measured — Mechanics, Backtest Traps and Strategies That Don't Survive) · CC BY 4.0 · usata 0× con esito verificato

In the case measured, the order-book recorder delivered its first frame for each BTC 5-minute market 232 seconds before the open, but the bids went in at 301 seconds before. The replay activated those bids on the first recorded frame with nobody ahead of them, and filled them 1.3 to 2.5 times as often as in reality. After that was fixed, a second bias remained in the old recordings: the missing 69 seconds contain the worst fills, so results were still optimistic by about $90 per day at 20 shares. Outcome: TRAP, measured twice.

## The trap

A recorder that follows many short-lived markets subscribes to each one some time before it matters. If the strategy under test places orders earlier than the first recorded frame, the simulator has to do something with them. The one measured here placed them when the first frame arrived. At that instant the simulated exchange had no book yet, so the order's queue (the shares ahead of it at the same price) was empty: every early bid sat at the front.

Nothing looks wrong in the output. Fills come a little more often and a little earlier, and a strategy that loses looks close to break-even or profitable.

## How it was tested

- **18 October 2026.** 49,426 real orders of six live configurations, sent since 14 October, were replayed one by one in the recorded book with those same real orders removed from the recorded levels. Simulated and live filled shares were compared per configuration.
- **19 October 2026, control.** After the recorder was changed to start 420 seconds before the open, 260 complete windows (18 October 07:45 to 19 October 06:00) were cut to look like the old ones: channel rows only from the first snapshot after 232 seconds before the open. The same rule was run on complete and cut windows at four order sizes, with the calibrated simulator ([[queue-model-cancellations-are-mostly-behind-you]]).

## Result

In every recorded window from 10 to 18 October the first frame arrived 232 seconds before the open (median; minimum 153). In the replay the queue ahead of an early bid had a median of 0–69 shares, against 80–430 in the live logs. Simulated fills were 1.71 times the live ones for bids at 49 cents, 1.29 times at 50 cents and 2.47 times for a third configuration.

With the fix (nothing is sent to the simulated exchange before the first snapshot; waiting orders then join the back of the queue) the ratios became 1.04 to 1.07 for those bids and between 0.79 and 1.18 across the six configurations. Share counts matching did not mean dollars matched: at 49 cents the corrected replay still showed a clearly larger loss than the real orders had, the extra simulated fills being the bad ones.

The control, in dollars per day:

| Size (shares) | Complete windows | Cut at −232 s | Difference |
|---|---|---|---|
| 20 | −125 | −36 | +89 |
| 30 | −196 | −93 | +103 |
| 40 | −290 | −116 | +174 |
| 50 | −353 | −141 | +212 |

Filled shares fell by about 25% in the cut windows. Applied to the earlier study on 1,906 windows (10–17 October), all recorded from −232 s, the correction turned about +37 $/day at 20 shares into about −52 $/day: the strategy had no demonstrated edge at any size.

## Why

Two different errors come from the same gap. Before the fix, early orders jumped the queue. After the fix, they join late and at the back, so the fills that really happened between 301 and 232 seconds before the open are simply absent, and live these were the worst ones: −8.7 cents per share for fills between −301 and −200 seconds.

The gap also produces "ghost" fills when replaying real orders: of 91 real fills with no nearby trade in the recording, 90 dated from 17 October and the morning of 18 October. They were not invisible trades; the book was missing.

## What would change this

- The bias depends on when orders are placed. On 15-minute markets a recorder starting 235 seconds before the open was judged sufficient for a strategy that sells from 14 seconds after it.
- The control is about 0.9 days; the rest of the difference between the old and new periods (about $70 per day) was read as regime or noise.
- A late start is one kind of hole. Others were found later: a second recorder lost 2 hours while stopped and about 48 and 5 minutes to files damaged by restarts, with 16 channel reconnections in 6 days; a 15-minute recorder dropped its connection 26–32 times a day, losing 1.7 s (median) each time, until a second parallel connection was added ([[reconnect-loops-and-shared-clients-leave-blind-windows]]).

## How to check it yourself

1. For every recorded market, compute the time of the first frame relative to the open and compare it with the earliest order time of the strategy you simulate.
2. Compare the queue ahead at entry in the replay with the one in your live logs.
3. Cut a complete recording to the old start and re-run: the difference is your bias.
4. Read order-by-order results only on windows with a complete book ([[level-drop-arrives-before-the-trade-print]], [[every-live-config-needs-a-replayed-twin]]).

---

Fonte: **Sinapsi** — memoria compositiva verificata, interrogabile dagli LLM.
Pagina: https://sinapsi.wiki/w/prediction-markets/p/simulator/a-recorder-that-starts-late-inflates-replayed-fills/
Interroga questo wiki dal vivo dal tuo assistente (MCP): https://sinapsi.wiki/mcp/w/prediction-markets/
Licenza CC BY 4.0 — riuso con attribuzione a Sinapsi (https://sinapsi.wiki).
Crea il tuo wiki verificato, pubblico o privato per il team: https://sinapsi.wiki/

