Look-Ahead Bias in Backtesting: How to Avoid It with Point-in-Time Data

Look-Ahead Bias in Backtesting: How to Avoid It with Point-in-Time Data
Measured on 62 large US companies' SEC filings via /v1/fundamentals on December 2, 2026.

On February 15, 2026, 16 of the 38 December-year-end companies in my sample still hadn't filed their 2025 annual report. A backtest that joins fundamentals on the fiscal year end date had been trading on those numbers since December 31.

Look-ahead bias in backtesting means using data your strategy could not have had on the trade date. With fundamentals, it usually comes from joining statements on the period end date instead of the filing date, and from using restated values. The fix is point-in-time data: every number indexed by when it became public, as first reported.

Key takeaway: Look-ahead bias in a fundamentals backtest comes from joining statements on the period end date and using restated values. In 62 large caps the median 10-Q arrived 30 days after the quarter and the median 10-K 46 days after the year. Join on the filing date with first-reported values instead.
Edgrapi serves SEC filings and US federal data as clean JSON, plus an MCP server for AI agents. Free key, no card.Get a free API key

What is look-ahead bias?

Look-ahead bias is an error in a backtest where a trading decision uses information that only became available after the decision date. The backtest looks better than any real strategy could, because it knows things before they happened. With fundamentals it's easy to miss, because the data looks historical: last year's revenue feels like a fact that was always there.

Spotting it is the hard part, because nothing in a typical financial data table tells you when a number became known.

A row says "fiscal 2025, revenue $94.2 billion" and that's it. Your code has to bring the date the market learned it, and most code doesn't.

A backtest with look-ahead bias tends to fail in one direction. Signals built on earnings surprises, revenue growth or margin changes trade a few weeks early, right into the price move that the real filing caused. The returns look great and then don't show up live.

How does look-ahead bias get into a fundamentals backtest?

Three ways, and most backtests have at least one. They join statements on the period end date, which is weeks before the filing. They use today's restated values for old periods. They build the stock universe from companies that exist today. The first two are about the data itself, and they're the ones point-in-time fundamentals fix.

The period end date is the trap people fall into first, because it's the date on the row. A quarter that ends September 30 is not public on October 1. In my sample of 41 companies with a September quarter in 2025, one had filed its 10-Q by October 15, and 28 by October 31.

Restated values are quieter. Data vendors usually show the latest number for every past period, which is what you want for a chart and wrong for a backtest.

When a company spins off a division, splits its stock or corrects an error, the old periods get rewritten in later filings. Your backtest then trades on numbers nobody saw at the time.

The third, survivorship bias, is a universe problem: a list of today's S&P 500 members excludes the companies that went bankrupt or were acquired. It's a separate fix, which I come back to in the limits section.

How long after the quarter do the numbers arrive?

In a sample of 62 large US companies, the median 10-Q arrived 30 days after the quarter ended, and 90% within 38 days. The median 10-K arrived 46 days after the fiscal year ended, and 90% within 56 days. So joining on the period end date puts annual numbers in your backtest about six to eight weeks early.

Here's the share of reports filed by each number of days after the period ended:

Days after period end10-Qs filed10-Ks filed
205.6%0.5%
2530.0%2.2%
3054.7%8.9%
3582.2%21.2%
4099.0%38.6%
4599.6%48.5%
5099.6%64.5%
6099.6%99.8%

That's 719 quarterly reports and 586 annual reports, from the last 12 quarters and 10 fiscal years of each company. These are large accelerated filers, which have the shortest deadlines in the SEC's Form 10-K and 10-Q rules: 60 days for a 10-K and 40 for a 10-Q. Smaller companies get up to 45 and 90 days, so for small caps the gap is wider. The SEC filing deadlines guide has the full table.

The calendar of a single filing season shows the same thing. For fiscal 2025, 7 of the 38 December-year-end companies had filed their 10-K by January 31, 2026, 22 by February 15, 37 by February 28, and the last one, UnitedHealth, on March 2. Netflix and Intel were first, on January 23.

Filing lag after period end for 10-Qs and 10-Ks
Half of 10-Qs are out by day 30, half of 10-Ks by day 46.

How much do restatements change old numbers?

A lot, and in both directions. In my sample, 29.8% of annual income statement rows have at least one field whose latest value differs from the first-reported one. Stock splits rewrite earnings per share, spin-offs rewrite revenue, and accounting changes move smaller amounts. Here are examples from SEC filings, first reported against the value filed later:

CompanyFiscal yearFieldFirst reportedLatest valueWhy
NVIDIA2024Diluted EPS$11.93$1.1910-for-1 split, June 2024
Amazon2021Diluted EPS$64.81$3.2420-for-1 split, 2022
Tesla2021Diluted EPS$4.90$1.633-for-1 split, 2022
J&J2022Revenue$94.9B$80.0BKenvue consumer health separated
GE2022Revenue$76.6B$29.1BGE HealthCare and GE Vernova spin-offs
3M2023Revenue$32.7B$24.6BSolventum health care spin-off
Pfizer2019Revenue$51.8B$40.9BUpjohn moved to discontinued operations
Wells Fargo2021Diluted EPS$4.95$5.08Revised in a later 10-K

The GE line is the one to look at.

In February 2023 GE reported $76.6 billion of revenue for 2022. Two spin-offs later, its filings say $29.1 billion for the same year. A revenue growth signal built on the latest numbers for 2022 measures a company that didn't exist yet.

Restatements are common on the balance sheet too. Across all three statements, 597 of 1,800 annual rows had a restated field, most often total equity and cash.

First reported vs latest revenue for GE, 3M, J&J and Pfizer
Spin-offs rewrite revenue for years that already happened.

Is every restated number look-ahead bias?

No. A split restatement is consistent if your price data is split-adjusted too, which most price feeds are. NVIDIA's $1.19 against a split-adjusted price gives the same P/E as $11.93 against the price of the day. The real look-ahead is in restatements the market couldn't have known about, like revenue recast for a spin-off that hadn't happened.

So the rule I use is to match the data to what the trade could see. For per-share values, either use first-reported EPS with unadjusted prices, or latest EPS with split-adjusted prices, and don't mix them. For revenue, income and balance sheet values, use first-reported values, because the later versions describe a different company.

Restated values do have a place. If your research question is about the business as it is today, like comparing segment growth over time, the latest values are the better data. That's a different question from what a trader could have known on a date.

Try it on real data. A company's SEC filings, each with its document URL:
curl -H "X-API-Key: edgr_your_key" "https://api.edgrapi.com/v1/filings/AAPL"
Get a free API key  50 free credits, no card.

What is point-in-time data?

Point-in-time data stores every value with the date it became public, as first published. A point-in-time query asks what was known on a date and gets only the numbers filed by then, at the values filed then. Commercial vendors sell this separately. With SEC data you can build it yourself, because every XBRL fact carries its filing date.

The SEC's company facts API returns every value a company has tagged, with the form and filing date of each. The same period shows up many times: first in its own 10-Q or 10-K, then again as a comparison column in later filings. The earliest one is the first-reported value, and its filing date is when it became public.

Doing that by hand is work. You need to match tags across years, since companies switch tags for the same line item, sort out duplicate periods, and separate quarterly from year-to-date values. I wrote about the mess in why parsing XBRL is harder than it looks.

Edgrapi's /v1/fundamentals endpoint does it per row. Every row has four point-in-time fields next to the values:

FieldWhat it is
period_endThe last day of the fiscal period
first_reportedThe date the period's numbers first appeared in an SEC filing
restatedFields whose latest value differs from the first-reported one
first_valuesThose fields as first reported

The row values themselves are the latest filed, so the same call works for charts and for backtests.

How do you avoid look-ahead bias in Python?

Index each row by first_reported instead of period_end, swap restated fields back to their first-reported values, and join to your trade dates with pandas merge_asof, which takes the last row on or before each date. Two changes to a normal fundamentals pipeline, and the backtest only sees what was public.

Here's the code. It needs pandas and requests, and an API key in the EDGRAPI_KEY environment variable:

import os
import pandas as pd
import requests

URL = "https://api.edgrapi.com/v1/fundamentals/{}"
HEADERS = {"X-API-Key": os.environ["EDGRAPI_KEY"]}


def point_in_time(ticker, period="quarterly", limit=12):
    """Income statement rows as first reported, indexed by the date they became public."""
    r = requests.get(URL.format(ticker), params={"period": period, "limit": limit},
                     headers=HEADERS, timeout=60)
    r.raise_for_status()
    rows = r.json()["income_statement"]
    for row in rows:
        row.update(row["first_values"])   # undo later restatements
    df = pd.DataFrame(rows).drop(columns=["restated", "first_values"])
    df["period_end"] = pd.to_datetime(df["period_end"])
    df["first_reported"] = pd.to_datetime(df["first_reported"])
    return df


def as_of(df, dates, on="first_reported"):
    """For each date, the latest row that was known on that date."""
    left = pd.DataFrame({"date": pd.to_datetime(dates)})
    return pd.merge_asof(left, df.sort_values(on), left_on="date", right_on=on)


nvda = point_in_time("NVDA")
dates = ["2025-08-01", "2025-08-20", "2025-08-28"]
cols = ["date", "period", "revenue", "eps_diluted"]
print("Joined on period_end (look-ahead):")
print(as_of(nvda, dates, on="period_end")[cols].to_string(index=False))
print("\nJoined on first_reported (point-in-time):")
print(as_of(nvda, dates)[cols].to_string(index=False))

The as_of function is the whole fix. pandas' merge_asof matches each date to the last row whose key is on or before it, so with on="first_reported" a filing only counts from the day it was filed. Swap your price dates in for dates and every signal is point-in-time.

What does the point-in-time join change?

I ran the code on December 2, 2026 with pandas 3.1.2. NVIDIA's quarter ended July 27, 2025, and its 10-Q was filed August 27. The period-end join knows the quarter's revenue on August 1. The point-in-time join keeps the previous quarter until the filing:

Joined on period_end (look-ahead):
      date     period     revenue  eps_diluted
2025-08-01 2025-07-27 46743000000         1.08
2025-08-20 2025-07-27 46743000000         1.08
2025-08-28 2025-07-27 46743000000         1.08

Joined on first_reported (point-in-time):
      date     period     revenue  eps_diluted
2025-08-01 2025-04-27 44062000000         0.76
2025-08-20 2025-04-27 44062000000         0.76
2025-08-28 2025-07-27 46743000000         1.08

For a month, from July 27 to August 27, the first backtest knew NVIDIA's revenue was $46.7 billion and EPS $1.08. Anyone trading that month had $44.1 billion and $0.76. A growth signal built on the first version would have bought ahead of the report, and the profit from that is fake.

The annual call shows the restatement side. For fiscal 2024, NVIDIA's row has eps_diluted 1.19 and first_values of {"eps_basic": 12.05, "eps_diluted": 11.93}, first reported on February 21, 2024. The function above puts 11.93 back.

Period-end join vs point-in-time join for NVIDIA
The period-end join knew the July quarter a month early.

What are the limits of first_reported?

It's the date the numbers hit EDGAR in a 10-Q or 10-K, which can be later than the earnings release. Many companies publish results in an 8-K press release a week or more before the full report. So first_reported errs on the late side: no look-ahead, but sometimes a few days of lag that a real trader wouldn't have had.

NVIDIA filed this 10-Q on the day of its August earnings release, so there was no gap. For companies that don't, you can get the release date from 8-K filings with Item 2.02, results of operations.

A few other cases to know about:

How did I measure the filing lag?

I pulled 10 fiscal years and 12 quarters of income statements for 62 large US companies from /v1/fundamentals on December 2, 2026, and measured the days from period_end to first_reported. The restatement examples come from the SEC's company facts data, comparing the earliest and latest filed value for each period.

The sample is large caps across sectors: tech, banks, energy, health care, retail and industrials, from Apple and JPMorgan to Target and FedEx. For the filing-time table I dropped lags outside 0 to 120 days, which removed the registrant changes above, and left out J&J's annual rows, for a reason that follows.

The data also turned up a bug in my own API.

J&J's fiscal years sometimes end in the first days of January, so its fiscal 2022 ended January 1, 2023. The endpoint labeled years by the calendar year of the end date, which merged fiscal 2022 into 2023 and gave the merged row a filing date before its period end. A row filed before its own period ended is a sign of exactly this kind of problem. I fixed it the same day, and fiscal years that end in the first week of January now belong to the prior year.

Run the point-in-time join on your own tickers

Look-ahead bias in a fundamentals backtest comes down to two choices: the date you join on and the values you use. Join on the filing date, use the first-reported values, and the backtest only knows what the market knew.

Get a free key at edgrapi.com/app, which comes with 50 credits, and run the code above on your own tickers. Each /v1/fundamentals call costs 3 credits. The financial statements API guide covers the endpoint's other fields, and the docs list every parameter.

Frequently asked questions

What is look-ahead bias in simple terms?

Look-ahead bias is when a backtest uses information that wasn't available yet on the day of the trade. A common example is using a company's quarterly earnings from the day the quarter ended, when the report was filed about a month later. The backtest looks profitable because it trades on news before the news existed.

What is the difference between look-ahead bias and survivorship bias?

Look-ahead bias uses data before it was public. Survivorship bias tests only on companies that still exist today, leaving out the ones that went bankrupt or were acquired. Both make backtests look better than reality. Point-in-time data fixes the first; building your stock universe from historical membership fixes the second.

How do you avoid look-ahead bias in a backtest?

Index every input by the date it became public, not the period it describes. For fundamentals, that means the filing date of the 10-Q or 10-K and the values as first reported. Then join to trade dates with an as-of join, such as pandas merge_asof, so each date only sees earlier data.

What does point-in-time mean for financial data?

Point-in-time financial data records each value with the date it was published and keeps the original value even after a restatement. You can ask what was known on any past date and get exactly that. Regular databases overwrite history with the latest restated values, which is fine for charts but leaks future information into backtests.

How long after the quarter ends are 10-Qs filed?

For large US companies, about 30 days. In a sample of 62 large caps, the median 10-Q came 30 days after the quarter ended and 90% within 38 days. The SEC deadline is 40 days for large accelerated filers and 45 for smaller ones. Annual 10-Ks took a median 46 days, against deadlines of 60 to 90.

Do restatements cause look-ahead bias?

Some do. Recasting revenue after a spin-off or correcting an error changes numbers in ways nobody could know at the time, so using the restated value leaks later information. A stock split also rewrites past EPS, but that's consistent with split-adjusted prices. Use first-reported values unless you know the restatement is purely mechanical.

Related guides: SEC EDGAR data and filings

Get a free API key