VARX-GARCH-BEKK
Posted: Tue Jun 21, 2016 2:17 pm
Hi. I have a VAR model with some exogenous variables (VARX model) with GARCH-BEKK.
I would like to shock one of the exogenous variables and see the response on endogenous variables. I followed the codes from MONTEEXOGVAR.RPF. But I have got the following errors:
## MAT2. Matrices with Dimensions 13 x 2 and 37 x 0 Involved in + Operation
The Error Occurred At Location 140, Line 6 of loop/block
After loading the data, here's the code I used:
## MAT2. Matrices with Dimensions 13 x 2 and 37 x 0 Involved in + Operation
The Error Occurred At Location 140, Line 6 of loop/block
@mcgraphirf(model=varxmodel,footer="Response to lwikibtc Shock",shocklabels=||"Rate Shock"||)
Could you tell me how to fix the problem in order to get the impulse response from exogenous variable shock?
Thanks
I would like to shock one of the exogenous variables and see the response on endogenous variables. I followed the codes from MONTEEXOGVAR.RPF. But I have got the following errors:
## MAT2. Matrices with Dimensions 13 x 2 and 37 x 0 Involved in + Operation
The Error Occurred At Location 140, Line 6 of loop/block
After loading the data, here's the code I used:
Code: Select all
log wikibtc / lwikibtc
log wikiltc / lwikiltc
log hashbtc / lhashbtc
log hashltc / lhashltc
dec symm[series] hhs(2,2)
clear(zeros) hhs
System(model=varxmodel)
variables logrbtc logrltc
lags 1
deterministic constant lwikibtc lwikiltc tranbtc tranltc lhashbtc lhashltc hhs(1,1) hhs(1,2) hhs(2,1) hhs(2,2)
end(system)
garch(model=varxmodel,p=1,q=1,mvhseries=hhs,pmethod=simplex,piters=15,iters=400,mv=bekk)
MV-GARCH, BEKK - Estimation by BFGS
Convergence in 300 Iterations. Final criterion was 0.0000088 <= 0.0000100
Daily(7) Data From 2013:07:18 To 2015:10:10
Usable Observations 815
Log Likelihood 3007.5462
Variable Coeff Std Error T-Stat Signif
************************************************************************************
Mean Model(LOGRBTC)
1. LOGRBTC{1} 0.003961 0.048540 0.08161 0.93495538
2. LOGRLTC{1} -0.060888 0.025538 -2.38416 0.01711817
3. Constant 0.065270 0.005284 12.35184 0.00000000
4. LWIKIBTC 0.001221 0.001821 0.67076 0.50237027
5. LWIKILTC -0.010644 0.003716 -2.86416 0.00418120
6. TRANBTC 0.000001 0.000000 1.40512 0.15998514
7. TRANLTC -0.000000 0.000000 -1.10392 0.26962783
8. LHASHBTC 0.001190 0.001675 0.71080 0.47720843
9. LHASHLTC -0.007418 0.004072 -1.82176 0.06849068
10. HHS(1,1) 3.601336 2.069988 1.73979 0.08189659
11. HHS(2,1) -0.341379 0.586829 -0.58174 0.56074500
12. HHS(2,1) -0.299380 0.586828 -0.51017 0.60993493
13. HHS(2,2) 0.189314 0.155689 1.21598 0.22399277
Mean Model(LOGRLTC)
14. LOGRBTC{1} 0.234504 0.057586 4.07223 0.00004656
15. LOGRLTC{1} -0.221549 0.048116 -4.60452 0.00000413
16. Constant 0.015848 0.020786 0.76242 0.44580866
17. LWIKIBTC -0.000866 0.002529 -0.34260 0.73190054
18. LWIKILTC -0.005836 0.004538 -1.28598 0.19845073
19. TRANBTC 0.000001 0.000001 2.02225 0.04315099
20. TRANLTC -0.000000 0.000000 -2.84610 0.00442590
21. LHASHBTC 0.003720 0.001375 2.70541 0.00682204
22. LHASHLTC -0.010459 0.003768 -2.77538 0.00551364
23. HHS(1,1) 9.827492 3.070184 3.20095 0.00136978
24. HHS(2,1) -1.975179 1.167724 -1.69148 0.09074576
25. HHS(2,1) -2.030299 1.167699 -1.73872 0.08208455
26. HHS(2,2) 1.039820 0.413709 2.51341 0.01195709
27. C(1,1) 0.008452 0.000981 8.61617 0.00000000
28. C(2,1) 0.005727 0.001599 3.58134 0.00034184
29. C(2,2) 0.008412 0.001259 6.68213 0.00000000
30. A(1,1) 0.390640 0.045007 8.67949 0.00000000
31. A(1,2) -0.240327 0.084271 -2.85185 0.00434656
32. A(2,1) -0.022217 0.027378 -0.81149 0.41708505
33. A(2,2) 0.615771 0.073408 8.38830 0.00000000
34. B(1,1) 0.898410 0.020091 44.71687 0.00000000
35. B(1,2) 0.081461 0.042323 1.92473 0.05426300
36. B(2,1) 0.020049 0.010875 1.84359 0.06524316
37. B(2,2) 0.853611 0.031737 26.89648 0.00000000
compute lags=4
compute nstep=16
compute ndraws=10000
equation(empty) rateeq lwikibtc
compute nshocks=1
compute nvar =%nvar
compute fxx =%decomp(%xx)
compute fwish =%decomp(inv(%nobs*%sigma))
compute wishdof=%nobs-%nreg
compute betaols=%modelgetcoeffs(varxmodel)
*
declare vect[rect] %%responses(ndraws)
*
infobox(action=define,progress,lower=1,upper=ndraws) "Monte Carlo Integration"
do draw=1,ndraws
if %clock(draw,2)==1 {
compute sigmad =%ranwisharti(fwish,wishdof)
compute fsigma =%decomp(sigmad)
compute betau =%ranmvkron(fsigma,fxx)
compute betadraw=betaols+betau
}
else
compute betadraw=betaols-betau
compute %modelsetcoeffs(varxmodel,betadraw)
impulse(noprint,model=varxmodel+rateeq,shocks=%unitv(%nvar+1,%nvar+1),flatten=%%responses(draw),steps=nstep)
infobox(current=draw)
end do draw
infobox(action=remove)
The Error Occurred At Location 140, Line 6 of loop/block
@mcgraphirf(model=varxmodel,footer="Response to lwikibtc Shock",shocklabels=||"Rate Shock"||)
Could you tell me how to fix the problem in order to get the impulse response from exogenous variable shock?
Thanks