1
$\begingroup$

I am performing Engle-Granger cointegration test on my data as below

import pandas as pd
from statsmodels.tsa.stattools import coint
from statsmodels.tsa.stattools import adfuller

dat = pd.DataFrame.from_dict({'var1': {0: -0.10825745622277619, 1: 1.7548111666278878, 2: -0.33625004689444876, 3: 0.9618620307084542, 4: 1.6347894823619555, 5: 0.6739234232270807, 6: 0.1920157665703801, 7: 0.27185324790946996, 8: 0.5230728028557227, 9: -0.2188973491277819, 10: -1.0481701196982356, 11: -1.557301258124994, 12: -1.937503320078663, 13: -2.0071456983025406, 14: -2.537889485174821, 15: -0.8066528626141674, 16: -1.035544577576307, 17: -0.28852987257615187, 18: 0.3230695164286165, 19: 0.28152827242538064, 20: -0.8361325612752296, 21: 0.7325842388112291, 22: 0.833261685247434, 23: 0.2617331193448563, 24: -1.3684206089626265, 25: -0.4070477748774042, 26: -0.9375775490486001, 27: 0.17476172778101126, 28: 0.4240613010152278, 29: 0.01399465447940219, 30: 2.144614878958984, 31: 1.401333689741768, 32: 0.3632087698796896, 33: 0.6633379042758231, 34: 0.45484774551418894, 35: 0.1721685901071702, 36: 0.5419633151196618, 37: 0.051401175769061995, 38: 0.3410657185183659, 39: 0.6747181172671688, 40: -0.6363203338136364, 41: -1.3558593883519074, 42: -0.1878730795769842, 43: 0.4633456406647453, 44: 0.3812558210644839, 45: 1.1229425103837385, 46: 0.4449099805589778, 47: 0.4145060209812663, 48: -0.2676473641926526, 49: 0.03484628061816599}, 'var2': {0: 1.4119268065058848, 1: 1.4347972752896627, 2: 1.504765510818826, 3: 1.6341968103494096, 4: 1.8635217917474673, 5: 2.0944971518664994, 6: 2.422172081138031, 7: 2.8343957742212518, 8: 3.44347150676767, 9: 4.091052947431035, 10: 4.642388934071729, 11: 5.131592563443792, 12: 5.414927317559274, 13: 5.70291348122816, 14: 6.212989565461995, 15: 6.553557890065595, 16: 6.632474338424518, 17: 6.531547601086743, 18: 6.324288470932777, 19: 6.121759391647611, 20: 5.863045275930186, 21: 5.731897268115899, 22: 5.531391377937976, 23: 5.284448766069687, 24: 5.1448916779560925, 25: 5.054843338632252, 26: 4.864626221996885, 27: 4.674096189330794, 28: 4.382332580608114, 29: 4.061324405559952, 30: 3.8126289646856555, 31: 3.581928936568684, 32: 3.451529950539032, 33: 3.231213708727147, 34: 3.1039023774568424, 35: 2.9210457098345, 36: 2.754082322994011, 37: 2.5715877865816013, 38: 2.361318088330347, 39: 2.2513584121369545, 40: 2.183688191229416, 41: 2.1019814688394116, 42: 2.0626821578667203, 43: 2.0332294751652955, 44: 1.9744422046953152, 45: 1.9239081770508453, 46: 1.862081311620955, 47: 1.8415259311971646, 48: 1.791221497281685, 49: 1.7922063945379239}})

print(coint(dat['var1'], dat['var2'])[1]) ## p-value -> 0.002587166627880317

This result suggest that there may be strong con-integration among variables.

Now I perform unit root test on first variable:

print(adfuller(dat['var1'], autolag = None, maxlag = 1)[1])  ## p-value -> 0.04313385141744861

This test rejects the unit root i.e. this variables appears to be stationary.

So I wonder how to interpret the result of cointegration test? My variables appear to be stationary, yet Engle-Granger cointegration test points towards strong cointegration.

$\endgroup$

1 Answer 1

0
$\begingroup$

A precondition to cointegration is the integration of the individual variables. Without the latter, there can be no talk of the former. If you use the Engle-Granger cointegration test on variables that are not integrated to begin with, you will find "cointegration"*, but that will be a nonsense finding because the assumptions of the test are not fulfilled.

*The first step of the Engle-Granger procedure is to check whether the original variables are integrated. If they are not, there can be no cointegration. If they are, you proceed to the second step where you check whether the residual from a linear regression of one variable on another has a unit root. If it does not, the variables are declared cointegrated. Now suppose you skip the first step and apply only the second one on two nonintegrated variables. Since every linear combination of nonintegrated variables is nonintegrated, the residual definitely does not have a unit root, and thus "cointegration" is found. But that finding is not worth much given that the first step has been skipped.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.