arch.unitroot.cointegration.engle_granger¶
-
arch.unitroot.cointegration.engle_granger(y: ndarray | Series, x: ndarray | DataFrame, trend: 'n' | 'c' | 'ct' | 'ctt' =
'c'
, *, lags: int | None =None
, max_lags: int | None =None
, method: 'aic' | 'bic' | 't-stat' ='bic'
) EngleGrangerTestResults [source]¶ Test for cointegration within a set of time series.
- Parameters:¶
- y: ndarray | Series¶
The left-hand-side variable in the cointegrating regression.
- x: ndarray | DataFrame¶
The right-hand-side variables in the cointegrating regression.
- trend: 'n' | 'c' | 'ct' | 'ctt' =
'c'
¶ Trend to include in the cointegrating regression. Trends are:
”n”: No deterministic terms
”c”: Constant
”ct”: Constant and linear trend
”ctt”: Constant, linear and quadratic trends
- lags: int | None =
None
¶ The number of lagged differences to include in the Augmented Dickey-Fuller test used on the residuals of the
- max_lags: int | None =
None
¶ The maximum number of lags to consider when using automatic lag-length in the Augmented Dickey-Fuller regression.
- method: 'aic' | 'bic' | 't-stat' =
'bic'
¶ The method used to select the number of lags included in the Augmented Dickey-Fuller regression.
- Returns:¶
Results of the Engle-Granger test.
- Return type:¶
See also
arch.unitroot.ADF
Augmented Dickey-Fuller testing.
arch.unitroot.PhillipsPerron
Phillips & Perron’s unit root test.
arch.unitroot.cointegration.phillips_ouliaris
Phillips-Ouliaris tests of cointegration.
Notes
The model estimated is
\[Y_t = X_t \beta + D_t \gamma + \epsilon_t\]where \(Z_t = [Y_t,X_t]\) is being tested for cointegration. \(D_t\) is a set of deterministic terms that may include a constant, a time trend or a quadratic time trend.
The null hypothesis is that the series are not cointegrated.
The test is implemented as an ADF of the estimated residuals from the cross-sectional regression using a set of critical values that is determined by the number of assumed stochastic trends when the null hypothesis is true.