[R-SIG-Finance] cointegration using Johansen for VAR
algotr8der
algotr8der at gmail.com
Tue Apr 26 04:30:13 CEST 2011
Hello everyone -
I am trying to reconcile the methodology used by Enders to estimate a VAR
and determine the cointegration vector using the Johansen framework (Enders
pages 397-to-401) with the same as highlighted by Dr. Bernhard Pfaff in his
book.
My intent for the moment is to determine whether a cointegration vector
exists among X variables and if so the value of the estimates in the
cointegration vector.
According to Enders - the methodology is as follows:
1) Determine order of integration of each variable.
I have 4 variables that are I(1) - all are stock prices.
2) Determine optimal number of lag length to be included in the VAR.
I do this via the VARselect function in the 'vars' package in R as
highlighted in Dr. Pfaff's book.
> infocrit <- VARselect(vardat, lag.max=20, type="const")
> infocrit
$selection
AIC(n) HQ(n) SC(n) FPE(n)
17 3 2 17
FIRST QUESTION: As you can see I have a conflict with the information
criteria. How does one reconcile the conflict in terms of the number of lags
to include in the VAR? Enders uses another method that estimates VARs with
different lag lengths and then uses the likelihood ratio test (page 397
Enders).
3) Estimate the model and determine the rank of ∏.
> H1 <- ca.jo(vardat, type='trace', ecdet='const', K=17)
On a side note I also estimated the VAR by using "varestimate <- VAR(vardat,
p=17, type="const")".
I checked the residuals of each equation in the VAR for serial correlation
and normality (the residuals were white noise).
---------- snippet of output of ca.jo()-------------
test 10pct 5pct 1pct
r <= 3 | 2.20 7.52 9.24 12.97
r <= 2 | 6.63 17.85 19.96 24.60
r <= 1 | 15.47 32.00 34.91 41.07
r = 0 | 50.11 49.65 53.12 60.16
Eigenvectors, normalised to first column:
(These are the cointegration relations)
V1.l17 V2.l17 V3.l17 V4.l17
constant
V1.l17 1.0000000 1.0000000 1.0000000 1.0000000 1.00000000
V2.l17 -0.2041193 -1.1345264 -0.3982231 -0.4862289 -0.21197975
V3.l17 -0.2584363 2.6858123 -0.8965070 -0.7727329 -0.43277884
V4.l17 -0.5167626 -0.8169243 -0.4955091 0.5102647 0.06214863
constant 5.2281138 -65.4213338 84.4998981 28.3856062 0.05660371
SECOND QUESTION: Since I supplied K=17 lags (as per the AIC and FPE
criterion) I'm not quite sure how to interpret the output of ca.jo().
Here is my understanding. Based on the trace test, I can reject the null:
r=0 at the 90% critical value and accept r > 0. However, I must accept the
null: r<= 1 given 15.47 is less than the critical values at all significance
levels. So this means I have 1 cointegration vector and from documentation
for ca.jo() I believe it is that depicted in the first column under the
"These are the cointegration relations" heading.
However, I am confused by the 'l17' suffix in each of the variables in the
output. I know I have up to 17 lags in my VAR as per the AIC and FPE
criterion but what does this actually say about the equilibrium
relationship?
Would I be incorrect to say that the equilibrium (cointegration equation) is
the following:
V1 - 0.2041193*V2 - 0.2584363*V3 - 0.5167626*V4 + 5.2281138 = residuals
I would greatly appreciate it if someone could help steer me in the right
direction. Thank you.
--
View this message in context: http://r.789695.n4.nabble.com/cointegration-using-Johansen-for-VAR-tp3474574p3474574.html
Sent from the Rmetrics mailing list archive at Nabble.com.
More information about the R-SIG-Finance
mailing list