Case study: one wrong price, and what a system should do about it

All positions are paper. The subject of this case study is data engineering and process — not returns, and not investment advice.

The observation (a human, reading his own page)

On August 14, reviewing my paper portfolio, one row stopped me: QBTS recorded as bought yesterday at $16.21 — a price I remembered from weeks earlier. The stock had traded above $20 for days. No alert had fired. The desk ran ~50 automated checks at the time; every one was green.

The diagnosis (mechanism, not blame)

The recorded fills were real closes from earlier bars, stamped under later dates. Two distinct incidents, separable in the data:

The trading engine was innocent — it faithfully recorded what the feed said. The feed even self-healed days later. But a written row is never re-read, so the error fossilized in a permanent record. Root cause: the desk validated every layer of analysis (benchmarks, clustering, survivorship, effective sample size) and had never validated the raw inputs underneath them.

The correction (and the mistake I made making it)

Fourteen rows were restated to the tape, with every before/after logged. Then I found that my restatement had violated the desk's own standing rule: a closed row keeps the number it was scored with; corrections may be added as new columns, never overwritten. Nobody caught it but the record itself, a day later. I reverted every scored number and carried the tape's values in companion columns (*_tape), so the book now shows both what was scored and what was true — and I amended the integrity check, which as written demanded the impossible (a closed row matching the tape), into the achievable and sharper demand: a divergence must be declared; an undeclared one fails.

The generalization (the part that matters)

The wrong price was never the finding. The finding was a class of defect that then surfaced four more times in one week, wearing different clothes:

  1. The price check read entry fills only — the largest error in the book was on an exit (a trade booked −0.01% where the tape said +23.3%).
  2. The refresh pipeline had silently omitted its data fetchers for three weeks — every weekly “no drift” verdict had been arithmetic on a frozen panel.
  3. The front page's headline figures were hand-typed SVG that nothing recomputed; the “figures are stamped and current” check was green because it audited three other figures.
  4. The automation registry was missing five running jobs — alive, unwatched, invisible to the weekly audit if they died.
One sentence covers all five: a green light is only as good as what it is wired to, and nothing knew what the lights were wired to.

The fixes (structural, each proven by breaking it first)

Outcome

The corrections moved the desk's headline numbers against the strategies being promoted that week (two books had been overstated by the bad fills), and were published that way. Verified prices: 1,750 across both legs, zero undeclared divergences. The check count grew from ~50 to 53, with the new ones pointed at inputs — and at the checks themselves.

What I'd tell a team about this