Data Quality Monitoring Checks
A backtest built on data no one is watching for corruption will silently degrade until a stale price or a duplicated row produces a Sharpe ratio that is really a data-feed bug wearing a costume.
Prerequisites: Point-in-Time Data
A vendor's small-cap feed returns yesterday's close for a stock halted three days running, without flagging it stale. A mean-reversion strategy sees a "price" that never moves against a book that's actually crashing, calculates zero risk, and sizes up. No line of the strategy's logic is wrong. The bug lives in the data underneath it, and a backtest re-run on the same feed reproduces the same bad decision every time, because nothing in a standard backtest asks whether the input was ever real.
Where corruption enters
Every stage between a vendor's raw feed and your model's input is a place for silent damage: a duplicated row that double-counts a fill, a missing bar a naive forward-fill turns into a fake zero-return day, a corporate action applied twice, a timestamp in the wrong timezone shifting a day's bars by hours. None of these throw an error. They just quietly change the numbers a model trains and trades on.
Checks that catch it, and what they cost you if skipped
Staleness. Flag any series where a value repeats for more bars than that instrument's normal quote frequency allows — six unchanged one-minute bars is suspicious for a large-cap, normal for a micro-cap, so the check needs a per-instrument baseline.
Jump-and-revert. Flag any return exceeding roughly 8 standard deviations of trailing realized volatility that reverts by a similar magnitude within one to three bars. A real 8-sigma news move doesn't revert cleanly; a bad tick usually does.
Cross-source reconciliation. Where two feeds exist, diff closing prices daily. A gap beyond a few basis points with no adjustment event on record means one feed is wrong.
Corporate-action consistency. Check a split or dividend was applied to price, volume, and share-count fields, and applied exactly once.
Worked example: the phantom edge from a duplicated bar
A five-minute mean-reversion strategy backtests at Sharpe 2.3. A staleness check finds 0.4% of bars are exact duplicates of the prior bar — a vendor re-send bug during one hour of the day. Each duplicate shows zero return, which the volatility filter reads as "quiet regime," trading more aggressively into those windows. Removing duplicates: Sharpe falls to 1.1. Roughly half the apparent edge was a feed artifact correlated with the strategy's own entry filter.
Worked example: catching a look-ahead bug with reconciliation
A daily earnings-drift strategy aligns announcements using a vendor's "as of" date field. A cross-source check against a second vendor's press-release timestamps finds 6% of announcements dated one calendar day before the actual release, because the first vendor recorded fiscal period end rather than announcement date. The strategy was trading on data effectively released a day early for those events. Fixing the alignment drops the information ratio by 30% — what a live desk would actually see.
Data quality checks are not a one-time cleaning step before research starts — they need to run continuously, because vendor feeds change behavior without notice. A check that ran clean last month tells you nothing about this month's feed.
The classic confusion: treating a clean-looking backtest as evidence the data was clean. Bad data rarely produces obviously broken output — it produces plausible output that's wrong in a way correlated with your strategy's own logic, because the same conditions (illiquidity, halts, feed lag) that generate bad ticks are what your strategy is designed to react to. A Sharpe ratio cannot tell you it was computed on garbage.
What this means in practice
Run staleness, jump-and-revert, and reconciliation checks as an automated gate before any backtest, log flagged rows with instrument and date, and re-run any strategy whose window overlaps elevated flags. See Point-in-Time Data for the related discipline of ensuring your backtest sees exactly what a live system would have, timestamp for timestamp.
Related concepts
Practice in interviews
Further reading
- López de Prado, Advances in Financial Machine Learning (ch. 2)
- Bailey & López de Prado, The Sharpe Ratio Efficient Frontier