Augmented Dickey-Fuller unit root test
The Augmented Dickey-Fuller test can be used to test for a unit root in a univariate process in the presence of serial correlation.
Parameters : | x : array_like, 1d
maxlag : int
regression : str {‘c’,’ct’,’ctt’,’nc’}
autolag : {‘AIC’, ‘BIC’, ‘t-stat’, None}
store : bool
regresults : bool
|
---|---|
Returns : | adf : float
pvalue : float
usedlag : int
nobs : int
critical values : dict
icbest : float
regresults : RegressionResults instance
resstore : (optional) instance of ResultStore
|
Notes
The null hypothesis of the Augmented Dickey-Fuller is that there is a unit root, with the alternative that there is no unit root. If the pvalue is above a critical size, then we cannot reject that there is a unit root.
The p-values are obtained through regression surface approximation from MacKinnon 1994, but using the updated 2010 tables. If the p-value is close to significant, then the critical values should be used to judge whether to accept or reject the null.
The autolag option and maxlag for it are described in Greene.
References
Greene Hamilton
P-Values (regression surface approximation) MacKinnon, J.G. 1994. “Approximate asymptotic distribution functions for unit-root and cointegration tests. Journal of Business and Economic Statistics 12, 167-76.
Critical values MacKinnon, J.G. 2010. “Critical Values for Cointegration Tests.” Queen’s University, Dept of Economics, Working Papers. Available at http://ideas.repec.org/p/qed/wpaper/1227.html
Examples
see example script