Stationarity / unit-root tests
Native unit-root and stationarity tests in
makystats.stationarity_test (not estimation models).
Inspectable OLS tables, multi-specification compares, and sequential ADF strategy.
Guide:
makystats/stationarity_test/README.md
Import
from makystats import (
adf, adf_sequential,
kpss, pp, dfgls, za,
engle_granger, unit_root_summary,
)
# aliases: phillips_perron, zivot_andrews_test, df_gls, ers, kpss_test
Quick examples
print(adf(y, regression="ct").summary())
print(adf(y, regression="ct").ols.summary())
seq = adf_sequential(y)
print(seq.summary())
seq.plot() # decision tree, active path highlighted
print(kpss(y, regression="c").summary())
print(pp(y, regression="ct", lags="auto").summary())
print(dfgls(y, regression="ct", autolag="MAIC").summary())
print(za(y, regression="ct").summary())
print(unit_root_summary(y))
Available tests
| Test | H₀ | Highlights |
|---|---|---|
| ADF | unit root | MacKinnon p-values; .ols.summary() |
| ADF sequential | unit root (strategy) | models 3→2→1, Φ joint tests, path plot |
| KPSS | stationarity | Newey–West; level / trend |
| Phillips–Perron | unit root | Z(τ), Z(ρ) |
| DF-GLS (ERS) | unit root | GLS detrending; MAIC; Perron–Qu lag policy |
| Zivot–Andrews | unit root without break | one endogenous break |
| Engle–Granger | no cointegration | two series |
Helpers: kpss_compare, pp_compare, dfgls_compare,
za_compare, adf_joint_test.