Time-Series Diagnostics

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.

Fixed lag declaredMacKinnon referencesNo stationarity 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.

Entered

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 boundary: The null is a unit root under the chosen constant or constant-plus-trend specification. A low reference probability is not proof of stable mean reversion, tradability or future persistence.

ADF reference output

Entered Stationarity and Cointegration 1.0.0.

Derived
Enter one series to beginThe result will expose the regression size, fixed lag, coefficient uncertainty, MacKinnon reference and every critical boundary.

How the fixed-lag ADF calculation works

Δyt = γyt−1 + ΣδiΔyt−i + deterministic terms + εt
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.

  1. The fixed-lag regression retains 46 rows and estimates the lagged-level coefficient as −0.49116638 with standard error 0.14685782.
  2. 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.

Comparison of nulls, alternatives, reference families and lag roles
DiagnosticNull hypothesisAlternativeReference familyLag role
Augmented Dickey–FullerUnit rootNo unit root under constant or trend choiceLower-tail MacKinnon approximationFixed augmentation lag
KPSSLevel or trend stationarityUnit-root component under chosen nullPublished 0.01–0.10 tableFixed Newey–West lag
Engle–GrangerNo cointegration for Y on XCointegration under two-series assumptionsN=2 MacKinnon approximationFixed residual ADF lag
Ljung–BoxNo residual autocorrelation through hAt least one nonzero residual autocorrelationChi-square approximationMaximum 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

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.

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.

XM

Review applicable statements, symbol specifications and execution terms.

Check XM terms

FBS

Confirm account-history and trading-cost conventions for your region.

Check FBS terms

FXOpen

Verify statement, charge and execution records before deriving inputs.

Check FXOpen terms

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.

Disclaimer: The results from this tool are estimates for educational and informational purposes only and may differ from your broker's figures. This is not financial or investment advice. Trading forex and CFDs carries a high level of risk and can result in the loss of all your capital. Always verify calculations with your broker and trade within your risk tolerance.