Skip to content
All library documents

Expanding-Window Z-Scores and Backtest Start-Date Dependence

Article Quant Q&A · Author: Dhruv Mahajan

Summary

The document raises a problem with using expanding-window z-scores to standardize valuation measures, such as price-to-earnings ratios, across asset classes. Because the historical mean and standard deviation depend on the available observations, changing the backtest start date can produce substantially different scores. The question considers a rolling window based on the measure's estimated half-life as an alternative, while recognizing that the half-life itself can change over time.

The response explains that a live-style expanding estimate can be used in a backtest without look-ahead bias if, at each assessment date, it uses only observations available by that date. Its example describes extending the estimation history as time advances. This addresses data timing, not the stability of scores across different start dates or the choice between expanding and rolling windows. No empirical comparison or preferred window length is provided.

Key ideas

  • An expanding-window z-score can change when the backtest start date changes because its estimated mean and standard deviation depend on the available history.
  • A rolling window tied to an estimated half-life is proposed, but the half-life may vary over time.
  • An expanding estimate avoids look-ahead bias when each historical score uses only data available at that date.
  • The response clarifies timing discipline but does not resolve how to choose or stabilize the window.

Tags

Full text
# Expanding window vs Rolling window z-score


# Expanding window vs Rolling window z-score












I wish to find the z-score of a value measure( e/g P/E ratio) to compare them across asset classes, currently i am using an expanding window z-score to calculate the long-term mean and standard deviation upto that point in time. But the problem with that is my z-scores vary by quite a lot if a start my backtesting from 1999 vs if I start my backtesting from 2001. If a value measure was completely mean-reverting this would not have ideally happened.

So currently I am thinking of calculating the half-life of a particular value measure and use a rolling window z-score with that half life. But i am sure that may be better ways of solving this problem (because the half life would also vary with time) and i'd appreciate some inputs.

## Answer by Chris (score 1)

https://quant.stackexchange.com/a/45943

@DhruvMahajan, there's no look-ahead bias if you set it up properly. You simply don't use data post your snap date (eg, if you're assessing as of 12/31/2001 and your data set starts 1/1/2000, your LT mean would just be taken over the two years of data you have at that point). You'd simply extend this in subsequent years, as you would if you were creating this live, to three, four, etc. years. That's the nature of backtesting in any form.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.