Stationarity and Unit Roots
Almost every quantity a portfolio optimizer estimates, expected returns, volatilities, correlations, assumes the series it is estimated from has a stable distribution. Stationarity is the name of that assumption, and the Augmented Dickey-Fuller test is how FolioLab checks whether your return series actually satisfies it.
Why It Matters Here
A mean is only a meaningful summary if there is a fixed mean to summarize. Run a sample average over a series that wanders, and the number you get describes the particular path history happened to take, not a property of the process. The same applies to a covariance matrix, and every optimizer in FolioLab consumes one.
This is why optimization runs on returns rather than prices. Prices are the textbook example of a non-stationary series: a random walk has no mean to revert to, and its variance grows without bound as the sample lengthens. Differencing a price series into returns removes the unit root, and the resulting series is usually stationary in the sense that matters here.
Usually, not always. Returns during a structural break, a series with a strong drift over the sample, or a thinly traded instrument with long runs of stale prices can all fail the test. When they do, the estimates built on them carry a fragility the point estimates themselves will never show you, which is the whole reason to run the diagnostic and report it.
What Stationarity Means
Strict and weak stationarity
A series is strictly stationary if the joint distribution of any collection of observations is unchanged by shifting all of them forward in time. That is far more than any test can check, and far more than the estimators need. The working definition is weak (or covariance) stationarity, which asks only that the first two moments are stable:
for all , with the autocovariance depending on the lag alone and not on where in the sample you are standing. Mean and variance both constant, and dependence between observations a function of their separation only.
The unit root
The canonical way a financial series fails weak stationarity is by containing a unit root. Consider the first-order autoregression
With , shocks decay geometrically and the series reverts to its mean: stationary. With the series is a random walk, every shock is permanently absorbed into the level, and the variance of grows linearly in . That boundary case is the unit root, and it is what the test is looking for.
The distinction is not academic. In a stationary series, a large move today tells you something is likely to be given back. In a unit-root series it tells you the level has moved and will stay moved. Those are opposite trading conclusions from the same observation.
The Augmented Dickey-Fuller (ADF) Test
The regression
Dickey and Fuller (1979) rewrite the autoregression in differences. Subtracting from both sides and writing turns the unit-root question into a t-test on a single coefficient. Said and Dickey (1984) then augment the regression with lagged differences so that serial correlation in the errors does not contaminate the test:
The hypotheses are (unit root present, series non-stationary) against (mean-reverting, stationary). Note the direction: the null is non-stationarity, so rejecting the null is the good outcome, and failing to reject is not evidence of stationarity so much as absence of evidence against a unit root.
Why the critical values are not the t-table
Under the null the regressor is itself non-stationary, which breaks the standard asymptotics. The statistic does not converge to a Normal distribution; it converges to a functional of Brownian motion, tabulated by Dickey and Fuller and refined into response-surface approximations by MacKinnon (1996). The critical values are substantially more negative than the ordinary t-table would suggest, so using the wrong table would declare stationarity far too often.
FolioLab reports the 1%, 5% and 10% critical values beside the statistic for exactly this reason. The comparison that matters is statistic against critical value: more negative than the critical value means reject.
What FolioLab Runs
Every optimization run tests each asset's return series individually, using a constant-only specification (a drift term, no deterministic trend) with the lag order selected automatically by AIC. Testing returns rather than prices is deliberate: prices are expected to carry a unit root, so testing them would only confirm the obvious. The interesting question is whether the differenced series is clean.
The per-asset row on the results page carries the ADF statistic, the p-value, the number of lags the selection procedure chose, the observation count, the three critical values, and a stationary flag set at the conventional 5% level. The card header summarizes as a count, for instance eleven of twelve assets stationary, which is the number to scan first.
Two admission rules keep the output honest. A series shorter than 30 usable observations is skipped rather than tested, because the test has almost no power at that length and a non-rejection would be meaningless. A series with essentially zero variance is skipped too. In both cases the asset simply does not appear in the table, rather than appearing with a fabricated verdict.
How To Read The Results
| Outcome | Reading | What to do |
|---|---|---|
| , statistic below the 5% critical value | Unit root rejected | The usual case for daily equity returns. Moment estimates rest on solid ground. |
| Marginal | Often a short sample or a regime shift inside the window. Check the observation count and consider a different date range. | |
| Cannot reject a unit root | Treat that asset's mean and variance with suspicion, and be particularly wary of the expected-return input it feeds. |
A single flagged asset in a large universe is usually a data problem worth investigating: a stock with a long halt, a recent listing, or a corporate action handled badly upstream. Several flagged at once more often points at the window than at the assets, typically because a structural break sits inside it.
Limitations
- Low power against near-unit roots. A series with is stationary but the test will frequently fail to say so, especially on a year or two of data. Non-rejection is weak evidence.
- Structural breaks masquerade as unit roots. A stationary series whose mean shifts once mid-sample is routinely misread as non-stationary. The ADF specification has no break term.
- It tests the mean, not the variance. Volatility clustering leaves the series non-stationary in a way this test is not designed to detect, and conditional heteroskedasticity is nearly universal in daily returns.
- Lag selection is a choice. AIC tends to pick generously; too many lags cost power, too few leave serial correlation in the residuals and distort the size of the test.
- Multiple testing. Run the test across fifty assets at the 5% level and roughly two or three will be flagged by chance alone. Read the count, not any single row.
References
- Dickey, D. A., & Fuller, W. A. (1979). "Distribution of the Estimators for Autoregressive Time Series with a Unit Root." Journal of the American Statistical Association, 74(366a), 427-431. doi:10.1080/01621459.1979.10482531.
- Said, S. E., & Dickey, D. A. (1984). "Testing for Unit Roots in Autoregressive-Moving Average Models of Unknown Order." Biometrika, 71(3), 599-607. doi:10.1093/biomet/71.3.599.
- MacKinnon, J. G. (1996). "Numerical Distribution Functions for Unit Root and Cointegration Tests." Journal of Applied Econometrics, 11(6), 601-618. doi:10.1002/(SICI)1099-1255(199611)11:6<601::AID-JAE417>3.0.CO;2-T.
Not investment advice. Past performance is not indicative of future results.