Skip to content
homethesisprojectswritingaboutworkquestionsarithmeticsequencesresume
Loading
~/blog/unit-roots0%dark
  1. home/
  2. writing/
  3. Unit Roots and Stationarity Tests

08 July 2026 · 3 min read · updated 23 Sept 2026

Unit Roots and Stationarity Tests

A stationary series reverts to a level and a regression on it behaves. An integrated series carries a unit root, wanders without bound, and makes a regression on it spurious. Separating the two regimes is the first task of any econometric pipeline. We derive the scaling limit of a random walk from the functional central limit theorem, read the two stochastic integrals that govern every unit-root law off it, and build the Dickey-Fuller test with the unit root as its null and the KPSS test with stationarity as its null. Run together the two pin the order of integration, the input the cointegration analysis needs.

  • 4 equations
  • 5 connections
  • time-series
  • econometrics
  • stochastic-processes
On this page▾
  • The scaling limit of a random walk
  • The Dickey-Fuller test
  • The confirmatory test

3 min left

  • The scaling limit of a random walk1m
  • The Dickey-Fuller test1m
  • The confirmatory test1m

Whether a series reverts to a level or wanders from it decides which models apply. A stationary series holds a fixed mean and a finite variance, so a regression on it behaves and its past informs its future. An integrated series carries a unit root, its variance growing without bound and its level drifting, so a regression on it is spurious and its sample moments never settle. This is the boundary the autoregression left off, where the dominant root reaches the unit circle. Separating the two regimes is the first task, and it is done by a pair of complementary tests built on the limit theory of integrated processes, one taking the unit root as its null and one taking stationarity [1], [2].

#The scaling limit of a random walk

Both tests rest on what a normalised random walk converges to. Write ⇒\cvW⇒ for weak convergence of the sample path on [0,1][0,1][0,1], →p\cvPp​ for convergence in probability, and WWW for standard Brownian motion.

::: lemma [lem

] Let {ut}\{u_t\}{ut​} be iid with mean zero and variance σ2<∞\sigma^2 < \inftyσ2<∞, and let S⌊Tr⌋=∑t=1⌊Tr⌋utS_{\lfloor Tr\rfloor} = \sum_{t=1}^{\lfloor Tr\rfloor} u_tS⌊Tr⌋​=∑t=1⌊Tr⌋​ut​ be the partial-sum process. Then T−1/2S⌊Tr⌋⇒σ W(r)T^{-1/2}S_{\lfloor Tr\rfloor}\cvW\sigma\,W(r)T−1/2S⌊Tr⌋​⇒σW(r) on [0,1][0,1][0,1]. :::

The normalised partial sum of the shocks converges to a Brownian path, so a random walk yt=∑s≤tusy_t = \sum_{s\le t}u_syt​=∑s≤t​us​ scaled by T−1/2T^{-1/2}T−1/2 is asymptotically σW\sigma WσW. Two functionals of that path generate every unit-root law below.

::: lemma [lem

] Let yt=∑s=1tusy_t=\sum_{s=1}^{t}u_syt​=∑s=1t​us​ with utu_tut​ iid mean zero variance σ2\sigma^2σ2. Then

T−2∑t=1Tyt−12  ⇒  σ2 ⁣∫01W(r)2 dr,T−1∑t=1Tyt−1ut  ⇒  σ2 ⁣∫01W dW=σ22(W(1)2−1).(1)T^{-2}\sum_{t=1}^{T} y_{t-1}^2\;\cvW\;\sigma^2\!\int_0^1 W(r)^2\,\dd r,\qquad T^{-1}\sum_{t=1}^{T} y_{t-1}u_t\;\cvW\;\sigma^2\!\int_0^1 W\,\dd W=\tfrac{\sigma^2}{2}\bigl(W(1)^2-1\bigr). \tag*{(1)}T−2t=1∑T​yt−12​⇒σ2∫01​W(r)2dr,T−1t=1∑T​yt−1​ut​⇒σ2∫01​WdW=2σ2​(W(1)2−1).(1)

:::

::: proof For the first, y⌊Tr⌋=S⌊Tr⌋y_{\lfloor Tr\rfloor}=S_{\lfloor Tr\rfloor}y⌊Tr⌋​=S⌊Tr⌋​, so T−1/2y⌊Tr⌋⇒σW(r)T^{-1/2}y_{\lfloor Tr\rfloor}\cvW\sigma W(r)T−1/2y⌊Tr⌋​⇒σW(r) by ??. The sum is a Riemann average of its square, T−2∑t=1Tyt−12=T−1∑t=1T(T−1/2yt−1)2T^{-2}\sum_{t=1}^T y_{t-1}^2 = T^{-1}\sum_{t=1}^T\bigl(T^{-1/2}y_{t-1}\bigr)^2T−2∑t=1T​yt−12​=T−1∑t=1T​(T−1/2yt−1​)2, which converges under the continuous map r↦W(r)2r\mapsto W(r)^2r↦W(r)2 to σ2∫01W2\sigma^2\int_0^1 W^2σ2∫01​W2.

For the second, telescoping yt2−yt−12=2yt−1ut+ut2y_t^2-y_{t-1}^2 = 2y_{t-1}u_t + u_t^2yt2​−yt−12​=2yt−1​ut​+ut2​ gives ∑t=1Tyt−1ut=12(yT2−∑t=1Tut2)\sum_{t=1}^T y_{t-1}u_t = \tfrac12\bigl(y_T^2 - \sum_{t=1}^T u_t^2\bigr)∑t=1T​yt−1​ut​=21​(yT2​−∑t=1T​ut2​). Dividing by TTT, the first term is 12(T−1/2yT)2⇒12σ2W(1)2\tfrac12(T^{-1/2}y_T)^2\cvW\tfrac12\sigma^2 W(1)^221​(T−1/2yT​)2⇒21​σ2W(1)2 and the second is 12T−1∑ut2→p12σ2\tfrac12 T^{-1}\sum u_t^2\cvP\tfrac12\sigma^221​T−1∑ut2​p​21​σ2 by the law of large numbers, so the difference tends to σ22(W(1)2−1)\tfrac{\sigma^2}{2}(W(1)^2-1)2σ2​(W(1)2−1), which is the Ito integral σ2∫01W dW\sigma^2\int_0^1 W\,\dd Wσ2∫01​WdW. :::

#The Dickey-Fuller test

The first test reads the unit root off the estimated autoregressive coefficient.

::: definition [def

] For yt=ρyt−1+uty_t=\rho y_{t-1}+u_tyt​=ρyt−1​+ut​ with ordinary least squares estimator ρ^\hat\rhoρ^​, the Dickey-Fuller coefficient and ttt-statistics are T(ρ^−1)T(\hat\rho-1)T(ρ^​−1) and τ=(ρ^−1)/se⁡(ρ^)\tau=(\hat\rho-1)/\operatorname{se}(\hat\rho)τ=(ρ^​−1)/se(ρ^​). :::

::: theorem [thm

] Under H0 ⁣:ρ=1H_0\!:\rho=1H0​:ρ=1 with utu_tut​ iid mean zero variance σ2\sigma^2σ2,

T(ρ^−1)⇒12(W(1)2−1)∫01W2,τ⇒12(W(1)2−1)(∫01W2)1/2.(2)T(\hat\rho-1)\cvW\frac{\tfrac12\bigl(W(1)^2-1\bigr)}{\int_0^1 W^2},\qquad \tau\cvW\frac{\tfrac12\bigl(W(1)^2-1\bigr)}{\bigl(\int_0^1 W^2\bigr)^{1/2}}. \tag*{(2)}T(ρ^​−1)⇒∫01​W221​(W(1)2−1)​,τ⇒(∫01​W2)1/221​(W(1)2−1)​.(2)

:::

::: proof Least squares gives ρ^−1=∑yt−1ut/∑yt−12\hat\rho-1=\sum y_{t-1}u_t/\sum y_{t-1}^2ρ^​−1=∑yt−1​ut​/∑yt−12​, so

T(ρ^−1)=T−1∑yt−1utT−2∑yt−12,(3)T(\hat\rho-1)=\frac{T^{-1}\sum y_{t-1}u_t}{T^{-2}\sum y_{t-1}^2}, \tag*{(3)}T(ρ^​−1)=T−2∑yt−12​T−1∑yt−1​ut​​,(3)

and Equation (1) supplies numerator and denominator with the σ2\sigma^2σ2 cancelling, giving the first limit. For τ\tauτ, the standard error obeys se⁡(ρ^)2=σ^2/∑yt−12\operatorname{se}(\hat\rho)^2=\hat\sigma^2/\sum y_{t-1}^2se(ρ^​)2=σ^2/∑yt−12​ with σ^2→pσ2\hat\sigma^2\cvP\sigma^2σ^2p​σ2, so

τ=ρ^−1σ^ (∑yt−12)−1/2=T−1∑yt−1utσ^ (T−2∑yt−12)1/2⇒12(W(1)2−1)(∫01W2)1/2,(4)\tau=\frac{\hat\rho-1}{\hat\sigma\,(\sum y_{t-1}^2)^{-1/2}} =\frac{T^{-1}\sum y_{t-1}u_t}{\hat\sigma\,\bigl(T^{-2}\sum y_{t-1}^2\bigr)^{1/2}} \cvW\frac{\tfrac12(W(1)^2-1)}{(\int_0^1 W^2)^{1/2}}, \tag*{(4)}τ=σ^(∑yt−12​)−1/2ρ^​−1​=σ^(T−2∑yt−12​)1/2T−1∑yt−1​ut​​⇒(∫01​W2)1/221​(W(1)2−1)​,(4)

one factor of σ\sigmaσ cancelling against σ^\hat\sigmaσ^ and one against the square root of the denominator. :::

::: remark Augmenting the regression with ∑k=1ℓγkΔyt−k\sum_{k=1}^{\ell}\gamma_k\Delta y_{t-k}∑k=1ℓ​γk​Δyt−k​ whitens serial correlation, so the limits hold with σ2\sigma^2σ2 the innovation variance, which is the augmented Dickey-Fuller test [3]. A fitted constant or trend replaces WWW by the demeaned W−∫01WW-\int_0^1 WW−∫01​W or a detrended analogue, shifting the quantiles without changing the form. The Phillips-Perron variant corrects the statistic nonparametrically for serial correlation rather than by augmentation [4]. :::

In practice the test fits the augmented regression, selects the lag length by an information criterion, and compares the ttt ratio to the tabulated Dickey-Fuller critical values rather than the normal ones.

Augmented Dickey-Fuller test
  input   series y, maximum augmenting lags, deterministic case
  1  choose lags p by minimising an information criterion
  2  regress dy_t on y_{t-1}, the lags dy_{t-1}..dy_{t-p},
     and the deterministic terms
  3  tau <- t-statistic of the coefficient on y_{t-1}
  4  reject the unit root when tau is below the Dickey-Fuller
     critical value for the chosen deterministic case

The tabulated values sit well to the left of the normal ones, the practical mark of the skewed limit in Equation (2). The five percent quantile near −1.95-1.95−1.95 sits left of the normal −1.64-1.64−1.64, so reading a unit-root statistic off normal tables would reject far too often [5].

#The confirmatory test

Failing to reject a unit root is not evidence for one, so the coefficient test is not conclusive alone. The confirmatory test runs the hypotheses the other way, taking stationarity as its null.

::: definition [def

] With residuals e^t\hat e_te^t​ from regressing yty_tyt​ on a constant, or on a constant and trend, partial sums St=∑i=1te^iS_t=\sum_{i=1}^t\hat e_iSt​=∑i=1t​e^i​, and a heteroskedasticity- and autocorrelation-consistent estimator λ^2\hat\lambda^2λ^2 of the long-run variance, the statistic is η=T−2∑t=1TSt2/λ^2\eta=T^{-2}\sum_{t=1}^T S_t^2/\hat\lambda^2η=T−2∑t=1T​St2​/λ^2. :::

::: theorem [thm

] Under stationarity η⇒∫01V(r)2 dr\eta\cvW\int_0^1 V(r)^2\,\dd rη⇒∫01​V(r)2dr, where VVV is a standard Brownian bridge in the level case and a second-level bridge in the trend case. :::

::: proof Demeaning maps the functional limit WWW to the bridge V(r)=W(r)−rW(1)V(r)=W(r)-rW(1)V(r)=W(r)−rW(1), since the residuals sum to zero, so T−1/2S⌊Tr⌋⇒λV(r)T^{-1/2}S_{\lfloor Tr\rfloor}\cvW\lambda V(r)T−1/2S⌊Tr⌋​⇒λV(r) with λ2\lambda^2λ2 the long-run variance. The continuous map ∫V2\int V^2∫V2 together with λ^2→pλ2\hat\lambda^2\cvP\lambda^2λ^2p​λ2 gives η⇒∫01V2\eta\cvW\int_0^1 V^2η⇒∫01​V2 [6]. :::

Run on a genuinely integrated series the two verdicts agree, the level failing to reject a unit root under Dickey-Fuller yet rejecting stationarity under KPSS, so the series is integrated of order one and is differenced before any stationary model is fitted. That order of integration is exactly the input the next step needs. When several series each carry a unit root, a linear combination of them can still be stationary, which is the cointegration that underlies statistical arbitrage and the error-correction structure of the cointegration post.

[1]
J. D. Hamilton, Time Series Analysis. Princeton University Press, 1994.
[2]
R. S. Tsay, Analysis of Financial Time Series, 3rd ed. Wiley, 2010.
[3]
S. E. Said and D. A. Dickey, “Testing for unit roots in autoregressive-moving average models of unknown order,” Biometrika, vol. 71, no. 3, pp. 599–607, 1984.
[4]
P. C. B. Phillips and P. Perron, “Testing for a unit root in time series regression,” Biometrika, vol. 75, no. 2, pp. 335–346, 1988.
[5]
D. A. Dickey and W. A. Fuller, “Distribution of the estimators for autoregressive time series with a unit root,” Journal of the American Statistical Association, vol. 74, no. 366, pp. 427–431, 1979.
[6]
D. Kwiatkowski, P. C. B. Phillips, P. Schmidt, and Y. Shin, “Testing the null hypothesis of stationarity against the alternative of a unit root,” Journal of Econometrics, vol. 54, no. 1–3, pp. 159–178, 1992.

Part 4 of 6 in Econometrics

← previousSerial Dependence: moving averages, ARMA, and long memorynext →Cointegration

Explore connections

see in the atlas →

related

  • Autoregressive Models
  • Statistical Arbitrage
  • Autocorrelation in Financial Time Series

referenced by (2)

  • Cointegration
  • Serial Dependence: moving averages, ARMA, and long memory
cite
@misc{unit-roots,
  author = {Zac Kienzle},
  title  = {Unit Roots and Stationarity Tests},
  year   = {2026},
  month  = {07},
  url    = {https://zackienzle.com/blog/unit-roots}
}