I am trying to test for cointegration between two series that based on qualitative reasoning, should be cointegrated. They are the prices of XLE ETF (XLE US equity
) and 1st futures of Brent (CO1 Comdty
). However, the results that I arrive at using two different methods both show that there exists no cointegration between the two series - not sure if my execution or the interpretation of the data is wrong?
(Both XLE and Brent 1st Futures have been tested for non-stationarity using ADF test from "urca" package)
1st test - Engle Granger 2-step test:
In doing this, I referenced Using R to Test Pairs of Securities for Cointegration by Paul Teetor
(1) Conducting Spread
> M<-lm(XLE~Brent+0,data=XLE.Brent)
> beta<-coef(M)[1]
> spread<-XLE.Brent$XLE-beta*XLE.Brent$Brent
>
> summary(M)
Call:
lm(formula = XLE ~ Brent + 0, data = XLE.Brent)
Residuals:
Min 1Q Median 3Q Max
-20.363 -9.543 -2.909 13.294 36.269
Coefficients:
Estimate Std. Error t value Pr(>|t|)
>Brent 0.74962 0.02004 37.4 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 16.37 on 68 degrees of freedom
Multiple R-squared: 0.9536, Adjusted R-squared: 0.953
F-statistic: 1399 on 1 and 68 DF, p-value: < 2.2e-16
(2) Testing the stationarity of the spread using ADF test (from package "urca"):
> spread.ADF<-ur.df(spread,type="none",selectlags="AIC")
> summary(spread.ADF)
###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
#########################################
Test regression none
Call:
lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
Residuals:
Min 1Q Median 3Q Max
-6.1449 -2.2523 0.5559 2.9194 8.4567
Coefficients:
Estimate Std. Error t value Pr(>|t|)
z.lag.1 -0.0003928 0.0266919 -0.015 0.988
z.diff.lag 0.1207084 0.1278700 0.944 0.349
Residual standard error: 3.443 on 65 degrees of freedom
Multiple R-squared: 0.01395, Adjusted R-squared: -0.01639
F-statistic: 0.4596 on 2 and 65 DF, p-value: 0.6335
Value of test-statistic is: -0.0147
Critical values for test statistics:
1pct 5pct 10pct
tau1 -2.6 -1.95 -1.61
My interpretation: since $t$-value = -0.0147
is bigger than -1.61
, do not reject null. Spread is not stationary. Hence no cointegration between XLE and Brent.
Second Test: Johansen Test
> XLE.brent.coint<-ca.jo(data.frame(XLE,Brent),type="trace",ecdet="trend",K=2,spec="longrun")
> summary(XLE.brent.coint)
>
>######################
># Johansen-Procedure #
>######################
>
>Test type: trace statistic , with linear trend in cointegration
>
>Eigenvalues (lambda):
>[1] 8.179514e-02 6.025284e-02 2.775558e-17
>
>Values of teststatistic and critical values of test:
>
> test 10pct 5pct 1pct
>r <= 1 | 4.16 10.49 12.25 16.26
>r = 0 | 9.88 22.76 25.32 30.45
>
>Eigenvectors, normalised to first column:
>(These are the cointegration relations)
>
> XLE.l2 Brent.l2 trend.l2
>XLE.l2 1.000000 1.0000000 1.0000000
>Brent.l2 1.467806 -0.4346323 0.1610563
>trend.l2 1.896366 -0.4903454 -0.8891875
>
>Weights W:
>(This is the loading matrix)
>
> XLE.l2 Brent.l2 trend.l2
>XLE.d -0.01629102 -0.13534537 -4.695795e-17
>Brent.d -0.03819241 -0.03886418 5.127543e-17
My interpretation: Since $t$-value for r=0: 9.88<22.76
, do not reject null. Hence r=0
, there exists no cointegration between XLE and Brent.
Additionally, I have carried out cointegration tests (both methods) on US 10 year and 2 year yields, and the results on both tell me that the series are not co-integrated, which does not make sense intuitively. Something must be wrong with the way I'm doing the tests!