statsmodels.tsa.tests.test_stattools.coint

statsmodels.tsa.tests.test_stattools.coint(y1, y2, regression='c')[source]

This is a simple cointegration test. Uses unit-root test on residuals to test for cointegrated relationship

See Hamilton (1994) 19.2

Parameters:

y1 : array_like, 1d

first element in cointegrating vector

y2 : array_like

remaining elements in cointegrating vector

c : str {‘c’}

Included in regression * ‘c’ : Constant

Returns:

coint_t : float

t-statistic of unit-root test on residuals

pvalue : float

MacKinnon’s approximate p-value based on MacKinnon (1994)

crit_value : dict

Critical values for the test statistic at the 1 %, 5 %, and 10 % levels.

Notes

The Null hypothesis is that there is no cointegration, the alternative hypothesis is that there is cointegrating relationship. If the pvalue is small, below a critical size, then we can reject the hypothesis that there is no cointegrating relationship.

P-values are obtained through regression surface approximation from MacKinnon 1994.

References

MacKinnon, J.G. 1994. “Approximate asymptotic distribution functions for
unit-root and cointegration tests. Journal of Business and Economic Statistics 12, 167-76.