LearnFinance
← Quantitative Finance Lesson 3 of 6 · 15 min · +50 XP
Quantitative Finance · Lesson 03

Time series basics: stationarity, autocorrelation, and mean reversion

Financial data arrives in time order, and that order matters. Which series wander forever and which get pulled back; autocorrelation; mean reversion and its half-life, worked step by step with a calculator; where mean reversion shows up; and how Granger and Newbold showed in 1974 that regressing one random walk on another, unrelated one often looks 'significant', the spurious regression trap.

Facts reviewed Oct 2026

Regress the Sensex on the number of cars sold in India over twenty years. You’ll find a stunning relationship: a high R², a tiny p-value, a beautiful line.

It means almost nothing. Both series simply grew over time, and any two things that trend upward will look related. Statisticians call this a spurious regression. It’s the first trap of time-series analysis.

Financial data comes in time order. That order changes which statistics you can trust.

Stationarity: does the series have a home?

A series is stationary if its statistical behaviour stays roughly the same over time: its mean, its variance, and its correlation with its own past. It has a “home” it keeps returning to.

  • Stock prices aren’t stationary. The Nifty in 2005 and the Nifty today live at completely different levels. Nothing pulls the price back to an old average. Prices behave roughly like a random walk: each day’s level is yesterday’s, plus a random step.
  • Daily returns are roughly stationary. They move around a small average, with a variance that, clustering aside, doesn’t trend away forever.
  • Many spreads and ratios can be stationary too. Examples are the gap between two bond yields, a currency’s distance from its trend, and the price ratio of two closely related stocks.

Most statistical tools assume stationarity. That’s why quants model returns rather than prices, and why regressing one trending price series on another is so dangerous. The standard test for a random walk, or “unit root”, is the augmented Dickey-Fuller (ADF) test.

Quick check

A spread follows an AR(1) model with φ = 0.9, and today sits 3.0 above its average. What gap would you expect in 3 days?

Autocorrelation: does the past predict the future?

Autocorrelation is a series’ correlation with its own past values. It answers a question: if today was above average, is tomorrow likely to be above average too?

  • For daily returns of large, liquid stocks and indices, autocorrelation is close to zero. Yesterday’s return tells you almost nothing about today’s. That’s a core piece of evidence for efficient markets.
  • For squared returns, or absolute returns, autocorrelation is clearly positive. That’s volatility clustering again.
  • For less liquid assets, returns can show positive autocorrelation, partly because stale prices update slowly. Treat their smooth-looking histories with suspicion.

Mean reversion and the AR(1) model

A stationary series that gets pulled back towards its average is mean-reverting. The simplest model is the AR(1), or autoregressive model of order 1:

Deviation(tomorrow) = φ × Deviation(today) + random shock

Here, φ, between 0 and 1, measures how much of today’s deviation survives to tomorrow. The half-life, the time for a deviation to shrink by half, is:

Half-life = ln(0.5) ÷ ln(φ)

φ close to 1 means slow reversion, and a long half-life. φ near 0 means deviations vanish almost at once.

Worked example. A spread has φ = 0.8, and today sits 2.0 above its average.

  1. Half-life: ln(0.5) ÷ ln(0.8) ≈ −0.693 ÷ −0.223 ≈ 3.1 days.
  2. Expected gap tomorrow: 0.8 × 2.0 = 1.6.
  3. Expected gap in 5 days: 2.0 × 0.8⁵ ≈ 0.66.
  4. But that’s only the average path. Fresh shocks arrive every day, so the actual gap can stay wide, or widen.
Mean reversion: how fast does a gap close?
Half-life (days)
13.51
Expected deviation after 20 days
0.72
Typical deviation in the long run (1 SD)
0.96
Expected pathExpected + 1 SDExpected − 1 SD

The expected path decays towards zero, but random shocks keep the actual path wandering inside a band whose width settles at the long-run deviation.

Notice the two forces. The expected gap shrinks steadily, but uncertainty grows from zero to the long-run band. With φ = 0.95, half of today’s gap is expected to close in about two weeks. Yet the series can easily sit a full standard deviation away at any time. A trade betting on reversion can be right on average, and still lose money for a long stretch.

Where mean reversion shows up in finance

  • Interest rates and spreads: rates don’t wander off to infinity. Central banks and the economy pull them back over time.
  • Volatility: India VIX spikes, then reverts towards its long-run range.
  • Valuation ratios: market-wide P/E ratios have tended to revert over long periods, though very slowly, with no guarantee about timing.
  • Pairs trading: two closely related stocks, say two large private banks with similar businesses, may have a stationary price ratio, even though each price wanders. Their prices may be cointegrated, meaning some combination of them is stationary. Then traders buy the cheap one and sell the dear one when the gap widens. They bet the gap will close.

A real case: spurious regressions, 1974

  • 1974: Clive Granger and Paul Newbold published “Spurious regressions in econometrics” in the Journal of Econometrics.
  • Their worry: many published economic studies regressed trending series on each other. They reported high R² values, but with signs that the leftover errors were strongly autocorrelated.
  • Their experiment: they simulated pairs of independent random walks, series with no link at all, and regressed one on the other.
  • The result: the regressions often looked “significant”, with high R², far more often than chance should allow. The usual tests simply don’t work on non-stationary data.
  • 2003: Granger shared the Nobel prize in economics with Robert Engle. Granger’s part was for methods of analysing series with common trends, called cointegration.

Worked example: the same data, two ways. These figures are illustrative. Two unrelated series both trend up over 20 years.

  1. Regress the levels: R² comes out at about 0.9. It looks like a strong link.
  2. Regress the yearly changes instead: R² falls to about 0.05. There’s almost nothing there.
  3. The lesson: the trend made the levels look related. The changes tell the truth.

The lessons:

  • Never regress trending levels without testing for stationarity first.
  • Work with returns or changes, or test for cointegration.
  • A high R² can be a warning sign, not a success.

Going further: why cointegration matters for traders. Two prices can each wander like random walks, yet stay tied together. Think of a company’s shares listed in two markets, or two very similar banks. Some combination of the two prices, the spread, stays stationary. That’s cointegration, and it’s what pairs traders hope to find. Engle and Granger’s 1987 paper gave a way to test for it. But the test only says the link held in the past. Traders still need a reason the link should last, and a plan for when it breaks.

Common mistakes

  • Regressing price levels on each other.
  • Assuming a stationary spread will stay stationary.
  • Ignoring how slow mean reversion can be.
  • Trusting smooth returns from illiquid assets.
  • Reading autocorrelation of returns as a sure trading signal.
Practice 1: Set φ to 0.99. What happens to the half-life and the long-run band, and what does that mean for a trader?
  1. Half-life: ln(0.5) ÷ ln(0.99) ≈ 69 days.
  2. Long-run band: with shocks of 0.3, the long-run deviation grows to roughly 2.1.
  3. For a trader: reversion is so slow that a “2-sigma” gap may take months to close. Meanwhile, the position soaks up financing costs, and the risk that the link breaks. Slow mean reversion is hard to tell apart from a random walk.
Practice 2: What value of φ gives a half-life of 10 days?
  1. The rule: after 10 days, half the gap is left, so φ¹⁰ = 0.5.
  2. Solve: φ = 0.5^(1/10) ≈ 0.933.
  3. Check: ln(0.5) ÷ ln(0.933) ≈ 10 days.

Key takeaways

  • Stationary series keep returning to a stable average; prices are not stationary, but daily returns roughly are.
  • Regressing trending series on each other creates spurious relationships; model returns or test for stationarity (ADF test) first.
  • Autocorrelation of liquid-market returns is near zero, but squared returns are autocorrelated (volatility clustering).
  • AR(1) mean reversion has a half-life of ln(0.5) ÷ ln(φ); expected gaps close while random shocks keep the path wandering.
  • Mean reversion appears in rates, volatility, valuations, and cointegrated pairs, but relationships can break, so size and stop-loss accordingly.
  • Granger and Newbold showed in 1974 that regressions of unrelated random walks often look “significant”.

Go deeper

Complete this lesson
Pass the quiz below (60% or more) to earn +50 XP and unlock the next lesson.
Quiz not passed yet
🧠

Quiz: Time series basics

5 questions · pass 60% to complete