Quant Analytics: from scratch to pro · Quant foundations: returns, risk and clean data · Intermediate
Time series basics: random walks, autocorrelation and stationarity
A price series and a return series behave very differently. This lesson covers random walks, autocorrelation, the AR(1) model with its half-life, volatility clustering and unit roots, the vocabulary needed before any model of market data.
In this lesson
- Explain why prices are usually treated as non-stationary and returns as roughly stationary
- Compute and test a sample autocorrelation against its noise band
- Use the AR(1) model to find autocorrelations and a half-life
- Recognise volatility clustering and a unit root
Read first: Returns: simple, log and compounded, Volatility: from daily moves to an annual figure
A time series is a list of values in time order. Order is the whole point: tomorrow's value depends on what came before in ways a plain average ignores. Before any model, three questions: does the series wander or stay near a level, do values depend on their own past, and does the spread of values change over time? This lesson gives the vocabulary for each.
Prices wander, returns stay put
In a random walk, each step is a random shock added to the last value: P_t = P_(t-1) + e_t. Nothing pulls the series back. After t steps the standard deviation of the price change is sigma x sqrt(t), so the spread grows without limit. With 1% a day it is 10% after 100 days and 20% after 400 (strictly this describes log prices, whose steps are returns).
A series is stationary (in the weak sense) if its mean and variance are constant and its autocorrelation between two points depends only on the gap between them. A random-walk price is not stationary. Its returns, the differences, are much closer to it. This is why analysis works on returns rather than on price levels. Fitting a relationship between two trending prices can produce a strong-looking result from nothing but the trends.
Autocorrelation
Autocorrelation at lag k is the correlation of a series with itself k steps earlier: rho_k = corr(r_t, r_(t-k)). Values lie between -1 and 1. A positive value means moves tend to continue; negative means they tend to reverse.
A sample autocorrelation from n independent observations has a standard error of about 1 / sqrt(n). For 1,000 returns that is 3.16%, and the 95% noise band is plus or minus 1.96 / sqrt(n), which is 6.20%. Daily index returns usually show small autocorrelations, close to the band. Lo and MacKinlay's variance-ratio test, cited above, was built to check this more sharply across horizons.
Worked example: AR(1)
The simplest model with memory is the AR(1): x_t = phi x_(t-1) + e_t. For stationarity, phi must lie between -1 and 1. Its autocorrelation at lag k is phi^k. With phi = 0.9:
| Lag | 1 | 2 | 3 | 5 | 10 |
|---|---|---|---|---|---|
| Autocorrelation | 0.90 | 0.81 | 0.73 | 0.59 | 0.35 |
A shock fades geometrically. The half-life is the time for it to halve: ln(0.5) / ln(phi). For phi = 0.9 it is 6.58 periods. For phi = 0.95 it is 13.51: a small rise in phi doubles the memory. Spread series that revert to a level are described this way, and half-life is one of the inputs to judging whether reversion is fast enough to matter.
Now a test. Suppose 1,000 returns give a lag-1 autocorrelation of 0.04. The z-score is 0.04 x sqrt(1000) = 1.26, inside the band. That value cannot be told from zero.
Unit roots
If phi = 1, the AR(1) is a random walk. The shock never decays and the half-life is infinite. This is a unit root. The Dickey-Fuller test, from 1979, checks whether phi is 1. Its distribution is not the usual t-distribution, so ordinary t-tables mislead. With limited data, phi = 0.99 and phi = 1 are hard to separate; do not treat a failed or passed test as a fact about the market.
Volatility clustering
Returns show little autocorrelation, but their size does. Large moves tend to follow large moves, and quiet days follow quiet days. This is volatility clustering, one of the stylised facts reviewed by Cont (2001). The correlation of squared or absolute returns with their own past is positive and slow to decay. Direction is hard to forecast; the size of the next move is easier. Models such as GARCH are built on this.
Common mistakes
- Analysing price levels as if they were stationary.
- Reading a small autocorrelation without comparing it to the noise band.
- Testing 50 lags and highlighting the one that crosses the band; at 5% about two or three will by chance.
- Treating a half-life estimated from short data as fixed.
- Assuming no autocorrelation in returns means the volatility is constant.
In practice
Plot the series, its returns and the autocorrelation of both returns and absolute returns before choosing a model. Analytics on FinUties applies measures like these to the markets it covers, so they are at hand when you read a chart.
Autocorrelation of an AR(1) series at each lag
- phi = 0.9
- phi = 0.5
- phi = 1 (random walk)
Worked numbers
Each result is recomputed from the formula shown.
| What | Formula | Result |
|---|---|---|
| number of returns | 1000 | 1,000 |
| one standard error of a sample autocorrelation | 1 / sqrt(n_obs) | 3.16% |
| 95% noise band | 1.96 / sqrt(n_obs) | 6.20% |
| z-score of a lag-1 autocorrelation of 0.04 | 0.04 * sqrt(n_obs) | 1.26 |
| AR(1) coefficient | 0.9 | 0.9 |
| AR(1) autocorrelation at lag 1 | ar_coef**1 | 0.90 |
| at lag 2 | ar_coef**2 | 0.81 |
| at lag 3 | ar_coef**3 | 0.73 |
| at lag 5 | ar_coef**5 | 0.59 |
| at lag 10 | ar_coef**10 | 0.35 |
| half-life with phi 0.9 | ln(0.5) / ln(ar_coef) | 6.58 |
| half-life with phi 0.95 | ln(0.5) / ln(0.95) | 13.51 |
| random walk, 1% a day, 100 days | 0.01 * sqrt(100) | 10% |
| random walk, 1% a day, 400 days | 0.01 * sqrt(400) | 20% |
Check yourself
A daily return series of 1,000 observations has a lag-1 autocorrelation of 0.04. Is that distinguishable from zero?
The noise band is about 1.96 / sqrt(1000) = 6.20%. The z-score is 0.04 x sqrt(1000) = 1.26. A value of 4.0% lies inside the band, so it cannot be told apart from luck.
In an AR(1) with phi = 0.9, what is the autocorrelation at lag 5, and the half-life of a shock?
Lag 5: 0.9^5 = 0.59. Half-life: ln(0.5) / ln(0.9) = 6.58 periods.
A daily volatility of 1% and a random walk in prices. What is the standard deviation of the price change after 100 days?
0.01 x sqrt(100) = 10%. It grows with the square root of time and has no upper limit.
Returns have no autocorrelation. Does that mean the size of returns cannot be forecast?
No. Squared or absolute returns are typically autocorrelated: large moves tend to follow large moves. That is volatility clustering. The direction is hard to forecast; the size is not.
Key terms
Sources
- Time Series Analysis. Princeton University Press (James D. Hamilton), 1994. Accessed 9 Nov 2026
- Distribution of the Estimators for Autoregressive Time Series with a Unit Root. Journal of the American Statistical Association 74(366), 427-431 (David A. Dickey, Wayne A. Fuller), 1979. Accessed 9 Nov 2026
- Stock Market Prices Do Not Follow Random Walks: Evidence from a Simple Specification Test. The Review of Financial Studies 1(1), 41-66 (Andrew W. Lo, A. Craig MacKinlay), 1988. Accessed 9 Nov 2026
- Empirical properties of asset returns: stylized facts and statistical issues. Quantitative Finance 1(2), 223-236 (Rama Cont), 2001. Accessed 9 Nov 2026