What it looks like in practice
Say you test a rule that buys the companies with the fastest earnings growth each quarter. The result beats the market by a wide margin. When you trace the trades, you find your code read each quarter's earnings on the first day after the quarter ended. The market got those numbers weeks later, when the company filed its report. Your backtest traded on news nobody had yet.
Common causes with company financials
| Cause | What goes wrong | Fix |
|---|---|---|
| Joining on period end | A quarter ending 30 June is used on 1 July, but the 10-Q arrives up to 40 or 45 days later. | Join on the first-filed date. |
| Using the latest value | A number the company later restated is used in its corrected form. The market saw the first version. | Keep each version with its own filed date. |
| Fiscal labels used as dates | In SEC company facts, fy is the fiscal year of the filing that carried the number. | Use the start, end and filed fields. |
| Re-standardized vendor history | A vendor reworks old records to fit today's definitions. | Ask whether the vendor keeps snapshots as they existed at each date. |
The SEC sets the reporting gap. A 10-Q is due 40 days after quarter end for large accelerated and accelerated filers and 45 days for everyone else, and no 10-Q is filed for the fourth quarter. A 10-K is due 60, 75 or 90 days after the fiscal year ends, depending on filer category.
Two real examples from SEC data
A label that points two years late. Apple's Revenues concept on data.sec.gov holds the revenue for the fiscal year ended 24 September 2016, $215,639 million, with fy set to 2018. That row came from the 10-K filed on 5 November 2018, which repeated fiscal 2016 as a comparison year. If you treat fy as the period, you place a 2016 number in 2018. If you treat the row's filed date as the first time the number was public, you are two years late in the other direction, because Apple first filed it on 26 October 2016 under a different tag.
A restated number. Kraft Heinz first reported fiscal 2017 net income of $10,999 million in its 10-K filed on 16 February 2018. Its 10-K filed on 7 June 2019 restated the figure to $10,941 million. A backtest dated anywhere between those two filings must use $10,999 million. The article on original vs latest values walks through this case, and first-filed date vs period end shows how to find the earliest filing.
A research finding on vendor data
Matthew Lyle, Federico Siano and Teri Lombardi Yohn studied Compustat, a database used across accounting and finance research. They compared its common Annual and Quarterly files with its Snapshot product, which keeps the data as it existed at each point in time. Their July 2024 paper reports that the regular re-standardization of the common files alters key figures such as sales and earnings, and that research results change depending on when you pull the data. They describe this as a form of look-ahead bias.
The lesson for you: a clean history from any vendor can still hold today's view of the past. Ask how the vendor treats old records before you trust a backtest built on them.
Four checks for your own backtest
- Pick ten trades at random. Write down every financial number the signal used for each one.
- Find the first filing date of each number on EDGAR. Any date after the trade date means look-ahead.
- Rerun the test with one extra trading day of delay. A large drop does not prove a bug, but it shows the result leans on timing you may not have had.
- Run it twice more, once on first-filed values and once on latest values. A big gap tells you restatements drive part of the result.
Younesa is building US company data from SEC filings.