Augmented Dickey-Fuller Test Calculator
Enter one ordered, equally spaced numeric series, choose a fixed augmentation lag and deterministic specification, then calculate the Augmented Dickey-Fuller statistic, MacKinnon approximate p-value and finite-sample critical references. The page does not turn those conditional outputs into a stationarity, mean-reversion or trading verdict.
Enter the ordered series
Use one consistent observation frequency and oldest-to-newest order. The calculator does not select a lag or inspect timestamps.
Choose before interpreting the statistic; the null changes with this field.
Whole lags only. Version 1.0.0 uses the entered lag exactly and performs no hidden selection.
Enter 20 to 500 finite values without percent signs, oldest to newest, using one observation frequency.
ADF reference output
Entered Stationarity and Cointegration 1.0.0.
On smaller screens, scroll horizontally to inspect the complete audit table.
| Reference level | Critical value | Test statistic | Statistic minus critical |
|---|
How the fixed-lag ADF calculation works
ADF statistic = fitted γ ÷ standard error of γ
Version 1.0.0 first differences the entered series. At fixed lag p, each usable row regresses the current difference on the prior level, p lagged differences and either a constant or a constant plus linear trend. The augmentation terms address entered serial correlation only to the extent allowed by the declared lag.
The test statistic is the ordinary-least-squares t statistic on the lagged-level coefficient. Because its unit-root null does not follow an ordinary Student-t distribution, the page uses MacKinnon response-surface approximations for the p-value and 1%, 5% and 10% finite-sample critical references.
The browser engine scales regression columns before solving the normal equations, rejects singular designs and keeps full precision until display. It does not run AIC, BIC or another lag search, so an unreported optimizer cannot silently change the tested model.
Worked example from the audited fixture
The audited fixture contains 48 ordered values, uses one lag and selects the constant-only specification.
- The fixed-lag regression retains 46 rows and estimates the lagged-level coefficient as −0.49116638 with standard error 0.14685782.
- The resulting ADF statistic is −3.34450260, the MacKinnon approximate p-value is 0.01300268 and the finite-sample 5% critical reference is −2.92678491.
Reproduce it: select “Load audited example” above. The governed engine retains full precision and rounds only the visible interface.
How to interpret the result
- Read the null and deterministic specification before reading the statistic. Constant-only and constant-plus-trend models ask different stationarity questions.
- More negative ADF statistics sit farther into the left tail of the selected MacKinnon reference, but the page deliberately reports the arithmetic without an accept-or-reject badge.
- Compare the declared lag with the observation frequency and data-generating context. Too few augmentation terms can leave serial correlation; too many can consume power and degrees of freedom.
- A result can change materially after adding observations, changing the window, transforming prices into returns or changing the deterministic terms.
- ADF addresses a unit-root null. It does not establish economic mean reversion, stable parameters, execution feasibility or a profitable entry and exit rule.
Assumptions and limits
- Enter 20 to 500 finite observations in meaningful oldest-to-newest order. Missing intervals are not inferred or repaired.
- The model cannot verify equal spacing, data source, timezone, corporate actions, rollover treatment, outliers or preprocessing.
- The declared lag is used exactly; version 1.0.0 performs no AIC, BIC, t-statistic or data-dependent lag selection.
- MacKinnon p-values and critical values are response-surface approximations under their stated model family, not direct finite-sample probabilities for this exact series.
- Structural breaks, nonlinear dynamics, volatility changes and seasonal effects can materially alter unit-root-test behavior.
- No stationarity, mean-reversion, strategy-validation, future-performance, forecast, grade, signal, position instruction or recommendation verdict is generated.
Which time-series diagnostic answers which question?
ADF, KPSS and Engle–Granger do not produce one interchangeable stationarity score. Their null hypotheses, deterministic terms, lag roles and reference distributions differ. The comparison below keeps those choices visible before any user interprets a p-value or critical boundary.
| Diagnostic | Null hypothesis | Alternative | Reference family | Lag role |
|---|---|---|---|---|
| Augmented Dickey–Fuller | Unit root | No unit root under constant or trend choice | Lower-tail MacKinnon approximation | Fixed augmentation lag |
| KPSS | Level or trend stationarity | Unit-root component under chosen null | Published 0.01–0.10 table | Fixed Newey–West lag |
| Engle–Granger | No cointegration for Y on X | Cointegration under two-series assumptions | N=2 MacKinnon approximation | Fixed residual ADF lag |
| Ljung–Box | No residual autocorrelation through h | At least one nonzero residual autocorrelation | Chi-square approximation | Maximum lag and fitted orders |
Frequently asked questions
- It calculates a left-tail reference for the null that the entered series has a unit root under the selected constant or constant-plus-linear-trend specification.
- A constant-only model asks about stationarity around a level, while a constant-plus-trend model asks about stationarity around a fitted deterministic trend.
- The declared number of lagged first differences is included in the ADF regression exactly; Version 1.0.0 performs no hidden AIC, BIC or t-statistic lag search.
- It is the fitted coefficient on the lagged level divided by that coefficient’s ordinary-least-squares standard error.
- The unit-root null has a nonstandard distribution, so the page uses the MacKinnon response-surface approximation for the chosen deterministic family.
- They are MacKinnon finite-sample lower-tail reference boundaries at 1%, 5% and 10%, calculated from the retained ADF regression-row count.
- No. Unit-root evidence does not establish stable economic mean reversion, cost-adjusted tradability, a durable parameter or future profitability.
- No. It generates no stationarity verdict, strategy validation, forecast, grade, signal, position instruction or recommendation.
Sources and methodology
- statsmodels — Augmented Dickey-Fuller — Official implementation documentation for the fixed-lag regression output and MacKinnon references.
- MacKinnon — Critical Values for Cointegration Tests — Primary working paper for the finite-sample response-surface critical values.
Version 1.0.0 was locked after its regression statistics, reference values and example outputs were independently recomputed with statsmodels 0.14.6 and SciPy 1.13.1. The browser calculator performs local arithmetic and does not upload entered observations. Reference probabilities remain conditional on the disclosed model and data assumptions.
Continue the stationarity evidence review
Verify the ordered evidence before testing it
Reconcile the exact symbol, price basis, statement window, observation timestamps, timezone, sampling frequency, missing rows, spread, commission, financing, currency conversion, rollover adjustments and preprocessing before entering a series. Correct regression arithmetic cannot repair selected, misaligned or cost-inconsistent evidence.
Risk and affiliate disclosure: Leveraged forex and CFD trading can result in substantial losses. These are affiliate links, so ForexMT4Indicators.com may receive compensation if you register or trade through them, at no additional cost to you. Availability and terms vary by jurisdiction and broker entity.

