I want to compute information shares for a data set of spot prices x and futures prices y.
First, I estimate this:
Code: Select all
@johmle(lags=10,det=constant,vectors=direct,dual=dual)
# x y
compute alphaperp=%xcol(dual,1)
compute beta=%xcol(direct,1)
compute betaperp=%perp(beta)
compute cstar=betaperp*tr(alphaperp)
compute f=%decomp(%sigma)
compute split=cstar*f
compute contrib=split.^2
compute [vector] variance=contrib*%fill(%cols(contrib),1,1.0)
ewise contrib(i,j)=contrib(i,j)/variance(i)
disp "Decomposition of Long-run variance" contrib
... and get this result:
Likelihood Based Analysis of Cointegration
Variables: X Y
Estimated from 11 to 907
Data Points 897 Lags 10 with Constant
Unrestricted eigenvalues and -T log(1-lambda)
Rank EigVal Lambda-max Trace Trace-95% LogL
0 7855.9113
1 0.0190 17.2488 19.7802 15.4100 7864.5358
2 0.0028 2.5313 2.5313 3.8400 7865.8014
Cointegrating Vector for Largest Eigenvalue
X Y
-382.867863 375.388255
Decomposition of Long-run variance
0.00808 0.99192
0.00808 0.99192
However, when I use/ adjust your code for the five markets
Code: Select all
sstats(mean) / (x-y)>>meanxy
equation(coeffs=||1.0,-1.0,-meanxy||) eqxy
# x y constant
system(model=vecm)
variables x y
lags 1 to 10
ect eqxy
end(system)
*
estimate
*
compute alphaperp=%perp(%vecmalpha)
compute psi=tr(alphaperp)
*
* Compute Choleski factorization of sigma
*
compute f=%decomp(%sigma)
*
* Compute decomposition of long-run variance
*
compute split=psi*f
compute contrib=split.^2/%dot(split,split)
*
disp "Decomposition of Long-run variance" contrib
... I get this:
Decomposition of Long-run variance
0.94680 0.05320
Isn't that the exact opposite of the above?
Thank you very much!