Hi Paul and thanks for your most helpful and informative posting!
Best regards, 
Ken Erickson


-----Original Message-----
From: r-sig-finance-bounces@stat.math.ethz.ch on behalf of Matthieu Stigler
Sent: Sat 1/10/2009 1:53 AM
To: paulteetor@yahoo.com
Cc: r-sig-finance@stat.math.ethz.ch
Subject: Re: [R-SIG-Finance] Fw: Testing for cointegration: Johansen vsDickey-Fuller
 
Hi

First of all, when dealing with time series, having contradictory 
results is not the exception but almost the rule! You may have opposite 
results between tests, with a same test with different specifications 
and finally with same test, same specification but different number of lags!

Your contradictory results come maybe from the way you apply the DF 
test, as pointed out by Jae Kim. In the residual based approach (or 
"Engle and Granger", or "two steps"), one applies unit root tests on the 
residuals from the cointegrating vector. If this cointegrating vector is 
known (from theory), just use the ADF.

Nevertheless, if the cointegrating vector has to be estimated (with 
usual OLS, as you did), one has to take into account this uncertainty 
and correct the distribution (which is then "larger") what EG did with 
Monte-Carlo, and Philips and Ouliaris more theoretically. The last one 
is implemented  in package urca under ca.po.

So maybe your two favorable result come from the fact that you estimate 
the cointegrating value but then take it as known a priori. Note 
nevertheless that studying spreads one typically assumes the vector (1, 
-1).

Small point, as residuals from a regression have zero mean, I don't 
think you need to test a model with a drift.

Finally, for your data, you may be interested in testing for threshold 
cointegration, that is, cointegration and error correction occurring 
only when deviations from long-run are big enough, which is more 
realistic and theory consistent. Some functions (as for your case a test 
of no cointegration against threshold cointegration with known vector) 
are availabe in dev version of package tsDyn (see TVECM_SeoTest).

Matthieu

Jae Kim a écrit :
> From: "Jae Kim" <jh8080@hotmail.com>
> Sent: Saturday, January 10, 2009 10:04 AM
> To: "Paul Teetor" <paulteetor@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@yahoo.com>
>> Sent: Saturday, January 10, 2009 8:38 AM
>> To: <r-sig-finance@stat.math.ethz.ch>
>> Subject: [R-SIG-Finance] Testing for cointegration: Johansen vs 
>> Dickey-Fuller
>>
>>> R SIG Finance readers:
>>>
>>> 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 
>>> spread 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@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@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@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.


	[[alternative HTML version deleted]]

