Full-Sample Averages and Look-Ahead Bias: How "Cheap Versus Its Own History" Gets Faked

November 12, 2026 · Guides · 8 min read

Published by , founder of Equity Rank

A common way to judge a valuation is to compare it with the company's own past. A stock trading at 12 times earnings looks cheap if it has averaged 18 over the years, and expensive if it has averaged 8. Many screens and research notes build a signal from exactly this gap, often as a z-score: how many standard deviations today's figure sits from its historical average.

In a backtest, the way that average is computed matters a great deal. If the "historical" average is taken over the whole data set, then on every past date it includes years that had not happened yet. That quietly tells the test where the valuation was headed, and a signal with no skill at all can look strong. This guide uses a hypothetical simulation to show the size of the effect and how to build the comparison without it.


Key Points


How a full-sample average leaks future information

Take a stock whose price-to-earnings ratio is 15 today. Over the next five years its share price rises sharply while earnings grow slowly, so its ratio drifts up to 25. A backtest that measures "cheap versus own history" using the average ratio across all ten years of data will see an average near 20 and score today's 15 as cheap. The stock then rises, and the signal looks right.

Nothing about that call used information available today. The stock was scored as cheap only because the average included the later, higher ratios, and those ratios were high because the price went up. The same reasoning works in reverse: a stock whose price later falls will have a lower full-sample average, so its earlier ratio looks expensive against it, and the test is short a future loser.

This is a form of look-ahead bias, closely related to using financial figures before they were published and to back-adjusted prices that carry later stock splits. (See Point-in-Time Data Explained and Split-Adjusted Prices and Look-Ahead Bias.) It is easy to make by accident, because computing a z-score over a whole column of data is usually a single line of code.


A hypothetical simulation

We simulated 500 stocks over ten years of monthly data, repeated 200 times. Each stock had its own long-run price-to-earnings level, spread around 15. Prices moved with a common market component (0.6% a month, 4.5% volatility) and 8% a month of stock-specific noise; earnings grew about 0.5% a month with 3% monthly volatility. The price-to-earnings ratio was simply price divided by earnings.

We ran two cases. In the no-skill case, every stock had the same average return, so a valuation signal could have no real skill. In the small-skill case, each month's return included a weak pull back toward the stock's own long-run level, equal to 0.3% of the gap between its current and long-run log ratio, so a stock trading below its long-run level genuinely tended to do slightly better.

Each month from year four onward, we scored every stock on how far its current ratio sat below a reference average, held the 50 cheapest long and the 50 most expensive short, and measured the next month's return. We built the reference average three ways:

Measure (average across 200 histories) No skill: full sample No skill: expanding No skill: rolling 36 months Small skill: full sample Small skill: expanding Small skill: rolling 36 months
Rank information coefficient 0.087 0.001 0.000 0.100 0.020 0.013
Histories with IC t above 2 100% 4% 4% 100% 98% 76%
Long-short return per year 30.9% 0.3% 0.2% 35.2% 7.0% 4.5%
Histories with long-short t above 2 100% 4% 2% 100% 92% 56%

Hypothetical simulation from the stated assumptions; it does not represent any real security, index, strategy or Equity Rank output, and does not indicate future results.

Three things stand out.

The full-sample test found a large, consistent and entirely false result. In the no-skill case, the full-sample version produced an information coefficient near 0.09 and a long-short return of about 31% a year, significant in every history. (See Information Coefficient Explained.)

The past-data versions were correct. Built from expanding or rolling averages, the same signal had no skill in the no-skill case, and was flagged as significant about as often as chance alone would allow.

Where skill was real, the full-sample version overstated it about five times. In the small-skill case, the expanding-window version found a long-short result of about 7% a year and the full-sample version about 35%. The real effect was there, but most of what the full-sample test reported was leaked information. The rolling version measured less than the expanding one, because a 36-month average is a noisier estimate of a stock's long-run level; the right window is itself a choice that should be fixed before testing. (See Parameter Tuning and Lookback-Window Overfitting.)


How to build "versus its own history" signals safely

  1. Compute every reference figure as of the ranking date. Averages, standard deviations, percentiles, minimums and maximums should use only data up to that date, through an expanding or rolling window.
  2. Apply the same rule to the data behind the figure. The valuation history itself should be point-in-time: earnings as reported at the time, prices as seen at the time.
  3. Watch for hidden whole-sample steps. Scaling, winsorizing, fitting a trend, filling missing values or choosing outlier cutoffs over the full data set can leak the future in the same way. (See Outliers, Winsorizing and Rank IC.)
  4. Ranking across stocks on one date is safe. Standardizing a signal across the stocks available on a single date, or ranking them, uses only that date's information.
  5. Require a warm-up period. An expanding average built from a few months of data is unreliable. Start the test only once each stock has enough history, and treat stocks with short histories consistently.
  6. Remember that valuations do not always return to their past. Even built correctly, a stock's past average is only an estimate of where its valuation tends to settle, and businesses change. (See Regression to the Mean in Company Fundamentals and Backtest Biases Explained.)

Limits of the simulation

The simulation gives every stock a fixed long-run valuation level and simple, steady earnings growth. Real companies change business mix, profitability and risk, so their long-run valuation levels drift, and a past average can be a poor guide even without any leak. The size of the false result also depends on how much prices move relative to earnings and on how long the data set runs beyond each ranking date, so it will differ in real data. The direction does not depend on those details: any reference figure computed with later data can carry later information into an earlier ranking.


This content is for educational and informational purposes only and does not constitute investment advice. Equity Rank is not a registered investment adviser. All figures in this article are hypothetical illustrations computed from stated assumptions; they do not represent any real fund, security, strategy or Equity Rank output, and they do not indicate future results.