The date on the row is not the date you knew
01.08.02 established the clock: a listed company files its quarterly results within 45 days of the quarter ending, and its annual results within 60. Until that filing appears, the numbers are unpublished price-sensitive information, and 01.08.03 established what may not be done with those.
Now look at how the data arrives. A financial database stores that quarter's revenue and profit against the period — the quarter that ended on the thirtieth — because that is what the figures describe. The date it was actually knowable is a different field, and it is often missing.
Join that table to a price series by date and the test now reads the quarter's profit on the quarter's last day. It has become an investor who reads results up to six weeks before they are filed. Every position it takes on that knowledge is one nobody could have taken.
Five things a test can know too early
Each one is ordinary data used on an ordinary date. Tap each to see when it was really available.
None of these requires a mistake in the code. Each is the natural result of joining two tables on a date.
Why it is the mistake you cannot see
A survivorship problem can be found by asking what is missing. Look-ahead cannot, because nothing is missing and nothing is wrong. Every number is correct, correctly attributed to the period it describes, sitting on the date that period ended.
It also improves results rather than breaking them, and a result that looks good invites far less inspection than one that looks broken. The test runs, the numbers are excellent, and the excellence is the symptom.
The reliable tell is behavioural: the result degrades sharply when you add the lag. If shifting fundamental data to its filing date, or acting one bar later, turns a strong result into an ordinary one, the strength was in the timing, not the idea.
- Quarterly results
- available at filing, within 45 days of the quarter end
- Annual results
- within 60 days of the year end
- Shareholding pattern
- within 21 days of the quarter
- A board decision
- 30 minutes after the meeting ends
- A session's close
- after that session has closed
A test buys companies whose quarterly profit grew, using profit dated to the quarter end, and returns an exceptional result. You re-run it with each figure lagged to its filing date and the result becomes ordinary. What have you learned?
Could a test have known this, on the date it used it?
For every fundamental figure, store the date it became public beside the period it describes, and join on that date rather than the period. It is one extra column and it removes the largest source of look-ahead in ordinary work. For prices, the equivalent is one rule: decide on a completed bar, act on the next one. Neither is clever. Both are the difference between a test of an idea and a test of hindsight.
Five lessons of ways data misleads. The last one is the practical answer: where the numbers come from in the first place, and the checks that tell you whether yours survived the journey.