# [R-SIG-Finance] [R-sig-finance] Fw: Testing for cointegration: Johansen vs Dickey-Fuller

Bogaso bogaso.christofer at gmail.com
Mon Jan 12 05:18:04 CET 2009

```I feel whether the form Y = a + bX will be taken or zero-intercept form will
be taken should be entirely based on economic theory, not from a regression
analysis. Because, in this case, as both series are non-stationary, it is
not legitimate to infer anything on the coef.

Bogaso wrote:
>
> I have one question. What is the point to keep constant in cointegration
> euqation? I think you should consider zero intercept in cointegrating
> equation.
>
>
>
> Jae Kim-3 wrote:
>>
>> From: "Jae Kim" <jh8080 at hotmail.com>
>> Sent: Saturday, January 10, 2009 10:04 AM
>> To: "Paul Teetor" <paulteetor at yahoo.com>
>> Subject: Re: [R-SIG-Finance] Testing for cointegration: Johansen vs
>> Dickey-Fuller
>>
>>> Hi,
>>>
>>> 1. If you are using the ADF test here, you are giving the restriction
>>> that
>>> the  cointegrating vector between the two is (1, -1.2534). That is, you
>>> are saying that the two variables are related in the long run with the
>>> cointegrating vector given. Under this restriction, you find the spread
>>> stationary, so they are cointegrated with given cointegrating vector.
>>>
>>> 2. If you are using Johansen method, you are doing unrestricted
>>> estimation
>>> of cointegrating vector. But if you believe that the above restriction
>>> is
>>> sensible economically, the ADF result should be preferred to Johansen
>>> result.
>>>
>>> 3. This is the bivariate case, so Johansen method may not be necessary.
>>> try Engle-Granger 2-stage method, you might find cointegration. In
>>> addition, Johansen method assumes normality, which may often be
>>> violated.
>>>
>>> hope this helps. JHK
>>>
>>>
>>> --------------------------------------------------
>>> From: "Paul Teetor" <paulteetor at yahoo.com>
>>> Sent: Saturday, January 10, 2009 8:38 AM
>>> To: <r-sig-finance at stat.math.ethz.ch>
>>> Subject: [R-SIG-Finance] Testing for cointegration: Johansen vs
>>> Dickey-Fuller
>>>
>>>>
>>>> I am checking a futures spread for mean reversion.  I am using the
>>>> Johansen
>>>> test (ca.jo) for cointegration and the Augmented Dickey-Fuller test
>>>> (ur.df)
>>>> for mean reversion.
>>>>
>>>> Here is the odd part:  The Johansen test says the two futures prices
>>>> are
>>>> not
>>>> cointegrated, but the ADF test says the spread is, in fact,
>>>> mean-reverting.
>>>>
>>>> I am very puzzled.  The spread is a linear combination of the prices,
>>>> and
>>>> the ADF test says it is mean-reverting.  But the failed Johansen test
>>>> says
>>>> the prices are not cointegrated, so no linear combination of prices is
>>>> mean-reverting.  Huh??
>>>>
>>>> I would be very grateful is someone could suggest where I went wrong,
>>>> or
>>>> steer me towards some relevent reference materials.
>>>>
>>>>
>>>> Background:  I am studying the spread between TY futures (10-year US
>>>> Treasurys) and SR futures (10-year US swap rate), calculated as:
>>>>
>>>>    sprd = ty - (1.2534 * sr)
>>>>
>>>> where ty and sr are the time series of futures prices.  (The 1.2534
>>>> factor
>>>> is from an ordinary least squares fit.)  I execute the Johansen
>>>> procedure
>>>> this way:
>>>>
>>>>    ca.jo(data.frame(ty, sr), type="eigen", ecdet="const")
>>>>
>>>> The summary of the test result is:
>>>>
>>>> ######################
>>>> # Johansen-Procedure #
>>>> ######################
>>>>
>>>> Test type: maximal eigenvalue statistic (lambda max) , without
>>>> linear trend and constant in cointegration
>>>>
>>>> Eigenvalues (lambda):
>>>> [1]  2.929702e-03  6.616599e-04 -1.001412e-17
>>>>
>>>> Values of teststatistic and critical values of test:
>>>>
>>>>          test 10pct  5pct  1pct
>>>> r <= 1 | 2.00  7.52  9.24 12.97
>>>> r = 0  | 8.89 13.75 15.67 20.20
>>>>
>>>> <snip>
>>>>
>>>> I interpret the "r <= 1" line this way:  The test statistic for r <= 1
>>>> is
>>>> below the critical values, hence we cannot reject the null hypothesis
>>>> that
>>>> the rank is less than 2.  We conclude that the two time series are not
>>>> cointegrated.
>>>>
>>>> I run the ADF test this way:
>>>>
>>>> ur.df(sprd, type="drift")
>>>>
>>>> (I set type="drift" because that seems to correspond to ecdet="const"
>>>> for
>>>> the Johansen test.)  The summary of the ADF test is:
>>>>
>>>> ###############################################
>>>> # Augmented Dickey-Fuller Test Unit Root Test #
>>>> ###############################################
>>>>
>>>> Test regression drift
>>>>
>>>> <snip>
>>>>
>>>> Value of test-statistic is: -2.9624 4.4142
>>>>
>>>> Critical values for test statistics:
>>>> 1pct  5pct 10pct
>>>> tau2 -3.43 -2.86 -2.57
>>>> phi1  6.43  4.59  3.78
>>>>
>>>> I interpret the test statistics as meaning we can reject the null
>>>> hypothesis
>>>> of a unit root (at a confidence level of 90% or better), hence the
>>>> is
>>>> mean-reverting.  I get similar results from the adf.test() procedure.
>>>>
>>>> F.Y.I., I am running version 2.6.2 of R.
>>>>
>>>> Paul Teetor
>>>> Elgin, IL   USA
>>>>
>>>> _______________________________________________
>>>> R-SIG-Finance at stat.math.ethz.ch mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>>> -- Subscriber-posting only.
>>>> -- If you want to post, subscribe first.
>>>>
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Fw%3A-Testing-for-cointegration%3A-Johansen-vs-Dickey-Fuller-tp21382220p21408233.html
Sent from the Rmetrics mailing list archive at Nabble.com.

```