VAR-GARCH-M

Discussions of ARCH, GARCH, and related models

Re: VAR-GARCH-M

Postby TomDoan » Mon Jun 04, 2012 7:58 am

The GSTART, which is what is used by the MAXIMIZE, needs to be at least 1973:3 to allow space for two lags. This is discussed on page 293 of the version 8 User's Guide.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: VAR-GARCH-M

Postby economics2012 » Mon Jun 04, 2012 2:30 pm

Hi Tom,

Running the code for daily data and accounting for the day of the week effect give me this result:

Code: Select all
MAXIMIZE - Estimation by BFGS
Convergence in    49 Iterations. Final criterion was  0.0000034 <=  0.0000100
Daily(5) Data From 1986:01:06 To 2009:12:31
Usable Observations                      6258
Skipped/Missing (from 6259)                 1
Function Value                    -22258.4669

   Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  B                             0.005857982  0.004410815      1.32810  0.18414668
2.  BVEC(1)(1)                   -0.017187612  0.014597341     -1.17745  0.23901671
3.  BVEC(1)(2)                    0.060123708  0.021574885      2.78675  0.00532403
4.  BVEC(1)(3)                    0.027542465  0.022599354      1.21873  0.22294747
5.  BVEC(1)(4)                    0.000000000  0.000000000      0.00000  0.00000000
6.  BVEC(2)(1)                    0.005762853  0.004441507      1.29750  0.19445938
7.  BVEC(2)(2)                    0.046190846  0.014068071      3.28338  0.00102570
8.  BVEC(2)(3)                    0.008901474  0.024577363      0.36218  0.71721617
9.  BVEC(2)(4)                    0.019904373  0.010230970      1.94550  0.05171458
10. GARCHP(1)(1)                  0.439479548  0.164816862      2.66647  0.00766520
11. GARCHP(1)(2)                 -0.075708348  0.223201709     -0.33919  0.73446471
12. GARCHP(1)(3)                  0.648279094  0.251471458      2.57794  0.00993904
13. GARCHP(1)(4)                 -0.441756737  0.235726974     -1.87402  0.06092786
14. GARCHP(1)(5)                 -0.005387029  0.168472383     -0.03198  0.97449140
15. GARCHP(1)(6)                  0.104161327  0.009531225     10.92843  0.00000000
16. GARCHP(1)(7)                  0.890580041  0.009501739     93.72811  0.00000000
17. GARCHP(2)(1)                  0.115927112  0.024203096      4.78976  0.00000167
18. GARCHP(2)(2)                 -0.030752563  0.032670752     -0.94129  0.34655766
19. GARCHP(2)(3)                  0.028886206  0.035109360      0.82275  0.41065049
20. GARCHP(2)(4)                 -0.011782383  0.034019800     -0.34634  0.72908798
21. GARCHP(2)(5)                  0.011430565  0.025440282      0.44931  0.65320828
22. GARCHP(2)(6)                  0.094695751  0.007201808     13.14889  0.00000000
23. GARCHP(2)(7)                  0.893204379  0.008040614    111.08659  0.00000000

SIC for VAR   49376.60170
SIC for GARCH-M   44700.50774


Does it mean that I have daily effect on Mondays and Wednesday?

Also,

If I want to check if I still have arch effect can I still run this code:

Code: Select all
dec vect[series] ustd(%nvar)
clear(zeros) ustd
dec series[vect] garchu
compute %%garchinit()
gset garchu gstart gend = bb*yvec(t)-%%garchmu(t)
do time=gstart,gend
   compute %pt(ustd,time,%solve(%decomp(hh(time)),garchu(time)))
end do time
@mvarchtest
# ustd


Many thanks
Last edited by economics2012 on Mon Jun 04, 2012 3:43 pm, edited 1 time in total.
economics2012
 
Posts: 62
Joined: Thu Jan 19, 2012 5:41 pm

Re: VAR-GARCH-M

Postby TomDoan » Mon Jun 04, 2012 3:09 pm

Does it mean that I have daily effect on Mondays and Wednesday?


Yes. That would be the interpretation.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: VAR-GARCH-M

Postby economics2012 » Mon Jun 04, 2012 3:59 pm

Ooops I am sorry.

So , If I understood you correctly, I need to set zero the daily variances that are negative (i.e. GARCHP(1)(2), GARCHP(1)(4), GARCHP(1)(5), GARCHP(2)(2), GARCHP(2)(4)) correct? And the ones with positive signs, if they are significant it means we have daily effect. Am i right?

This is the code ans the sries is attached.

Again, I truly appreciate all your help.
Last edited by economics2012 on Wed Jun 13, 2012 12:53 pm, edited 1 time in total.
economics2012
 
Posts: 62
Joined: Thu Jan 19, 2012 5:41 pm

Re: VAR-GARCH-M

Postby economics2012 » Thu Jun 07, 2012 11:09 pm

Dear Tom,


I need to run the IRFs after estimating the GARCH model taking into account the day of the week effect.

How can I adjust this line in the code below?

compute hirf(i+1)=garchp(1)(3)*hirf(i)+garchp(1)(2)*%if(i==1,eps0(1)^2,hirf(i)

Many Thanks
Last edited by economics2012 on Wed Jun 13, 2012 12:54 pm, edited 1 time in total.
economics2012
 
Posts: 62
Joined: Thu Jan 19, 2012 5:41 pm

Re: VAR-GARCH-M

Postby TomDoan » Fri Jun 08, 2012 9:48 am

The deterministics don't affect the IRF's, so you just need to make sure you get the right slots for the two "GARCH" lag coefficients.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: VAR-GARCH-M

Postby economics2012 » Fri Jun 08, 2012 2:25 pm

Hi Tom,

I am running this code for the IRFs



And getting this error
Last edited by economics2012 on Sun Jun 10, 2012 12:00 am, edited 1 time in total.
economics2012
 
Posts: 62
Joined: Thu Jan 19, 2012 5:41 pm

Re: VAR-GARCH-M

Postby TomDoan » Fri Jun 08, 2012 3:30 pm

If you do Show Last Error on the Edit Menu, it will take you to the instruction which causes the problem, which is:

Code: Select all
[u]  compute hirf(i+1)=garchp(1)(7)*hirf(i)+garchp(1)(6)*%if(i==1,eps0(1)^2,hirf(i))[/u]


You have forum post underscore tags on the instruction.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: VAR-GARCH-M

Postby economics2012 » Fri Jun 08, 2012 4:00 pm

Thanks a lot Tom, but I don't see what is wrong with :

compute hirf(i+1)=garchp(1)(7)*hirf(i)+garchp(1)(6)*%if(i==1,eps0(1)^2,hirf(i))

garchp(1)(7) and garchp(1)(6) stand for the GARCH lags!
economics2012
 
Posts: 62
Joined: Thu Jan 19, 2012 5:41 pm

Re: VAR-GARCH-M

Postby moderator » Fri Jun 08, 2012 9:05 pm

There's nothing wrong with it. Your program had at the start of the instruction and at the end. Those will give syntax errors.
moderator
Site Admin
 
Posts: 306
Joined: Thu Oct 19, 2006 4:33 pm

Re: VAR-GARCH-M

Postby economics2012 » Sat Jun 09, 2012 11:46 pm

Thanks a lot Tom.
economics2012
 
Posts: 62
Joined: Thu Jan 19, 2012 5:41 pm

Re: VAR-GARCH-M

Postby economics2012 » Mon Jun 11, 2012 4:05 pm

Hi Tom,

Using quarterly or monthly data, we usually include a full year of lags given that the primary effect of oil prices occurs at one year (based on the arguments by Hamilton and Herrera (2004)). Now, for daily data, since I have a large sample size (over 6000), the AIC/BIC criterion will do for selecting the sufficient number of lags in the mean equation. Can you please help me testing it in RATS? I have read Chapter 4 of Leamer's Specification Searches (Wiley, 1978) but still not sure how related to this.


Many thanks.
economics2012
 
Posts: 62
Joined: Thu Jan 19, 2012 5:41 pm

Re: VAR-GARCH-M

Postby TomDoan » Mon Jun 11, 2012 6:37 pm

Just use @VARLagSelect (http://www.estima.com/forum/viewtopic.php?f=7&t=1261) on the basic VAR with the "M" variables.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: VAR-GARCH-M

Postby economics2012 » Mon Jun 11, 2012 11:35 pm

Do you mean I need to add @VARLagSelect to my original code as such:
Last edited by economics2012 on Wed Jun 13, 2012 12:54 pm, edited 1 time in total.
economics2012
 
Posts: 62
Joined: Thu Jan 19, 2012 5:41 pm

Re: VAR-GARCH-M

Postby moderator » Tue Jun 12, 2012 8:05 am

Just apply the standard @VARLagSelect to the model without any of the "M" terms. You're just trying to pick a defensible number of lags. If you tried to pick the number of lags based upon the full model, it would probably take a couple of days to estimate all the required models, and you would probably end up with the same answer.
moderator
Site Admin
 
Posts: 306
Joined: Thu Oct 19, 2006 4:33 pm

PreviousNext

Return to ARCH and GARCH Models

Who is online

Users browsing this forum: Google [Bot] and 0 guests