Page 2 of 2

Re: Hasbrouck(1995) Information Shares

Posted: Fri Oct 05, 2018 7:44 am
by sheriared
A full example is provided by hasbrouck.rpf. This does the calculation with both an empirically chosen cointegrating vector and also the theoretical cointegrating space (which has a single common trend).



Hi Tom,

In the example with empirically determined cointegrating vector, is it possible to change to a 3-variable system with 2 cointegrating vectors?

Many thanks!

Re: Hasbrouck(1995) Information Shares

Posted: Thu May 16, 2019 1:47 pm
by Frank
TomDoan wrote:Isn't that the same thing but with:

*
* Compute Cholesky factorization of sigma
*
compute f=%decomp(%sigma)

replaced with an eigenvalue-based factorization

eigen(dmatrix=identity) %sigma * f
Sorry, didn't get it. Did you mean:
.......
* Compute Cholesky factorization of sigma

compute f=eigen(dmatrix=identity) %sigma

* Compute decomposition of long-run variance
compute split=psi*f
dis "split=" split
compute contrib=split.^2
....




Frank

Re: Hasbrouck(1995) Information Shares

Posted: Thu May 16, 2019 8:59 pm
by TomDoan
No, I meant

eigen(dmatrix=identity) %sigma * f

EIGEN is an instruction, not a function (it has quite a few options to allow it to deal with real or complex matrices).

Re: Hasbrouck(1995) Information Shares

Posted: Thu May 16, 2019 9:54 pm
by Frank
TomDoan wrote:No, I meant

eigen(dmatrix=identity) %sigma * f

EIGEN is an instruction, not a function (it has quite a few options to allow it to deal with real or complex matrices).


Tom,
I know eigen is an instruction, but if
compute f=%decomp(%sigma) is replaced by eigen(dmatrix=identity) %sigma * f
how about the matrix "f" ?

I used the new code to calculate but the result is nothing different to the results of Cholesky factorization of sigma.
I have no idea what's going on.

Re: Hasbrouck(1995) Information Shares

Posted: Tue Aug 15, 2023 3:37 pm
by TomDoan
If you do it correctly, that's only possible if %sigma is diagonal


compute f=%decomp(%sigma)
*
* Compute decomposition of long-run variance
*
compute split=psi*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



eigen(dmatrix=identity) %sigma * f
*
* Compute decomposition of long-run variance
*
compute split=psi*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

with Cholesky

Decomposition of Long-run variance
0.68224 0.31776
0.68224 0.31776

with eigen

Decomposition of Long-run variance
0.84417 0.15583
0.84417 0.15583