Page 5 of 6

Re: VAR-GARCH-M

Posted: Mon Jun 04, 2012 3:59 pm
by economics2012
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.

Re: VAR-GARCH-M

Posted: Thu Jun 07, 2012 11:09 pm
by economics2012
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

Re: VAR-GARCH-M

Posted: Fri Jun 08, 2012 9:48 am
by TomDoan
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.

Re: VAR-GARCH-M

Posted: Fri Jun 08, 2012 2:25 pm
by economics2012
Hi Tom,

I am running this code for the IRFs



And getting this error

Re: VAR-GARCH-M

Posted: Fri Jun 08, 2012 3:30 pm
by TomDoan
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.

Re: VAR-GARCH-M

Posted: Fri Jun 08, 2012 4:00 pm
by economics2012
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!

Re: VAR-GARCH-M

Posted: Fri Jun 08, 2012 9:05 pm
by moderator
There's nothing wrong with it. Your program had at the start of the instruction and at the end. Those will give syntax errors.

Re: VAR-GARCH-M

Posted: Mon Jun 11, 2012 4:05 pm
by economics2012
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.

Re: VAR-GARCH-M

Posted: Tue Jun 12, 2012 8:05 am
by moderator
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.

Re: VAR-GARCH-M

Posted: Fri Jun 22, 2012 12:08 am
by economics2012
Hi Tom,

I am running the IRFs for the GARCH(2,1) model with 7lags and I just want to make sure the line below is correct:

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

This is the code:


Thanks a lot

Re: VAR-GARCH-M

Posted: Fri Jun 22, 2012 7:24 am
by TomDoan
No. It's not allowing for the second lag on the H. The recursion changes to:

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

Re: VAR-GARCH-M

Posted: Tue Jun 26, 2012 8:17 am
by TomDoan
Take out the colored part of this.

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

Re: VAR-GARCH-M

Posted: Mon Apr 22, 2013 4:03 pm
by economics2012
Hi,

I am trying to check for the effect of uncertainty in oil price on stock returns for periods t and (t-1), and I need to get psi1 and psi2 of equation one in the attached below model.

Can you please help me adjust the model accordingly?



Your help is highly appreciated in this regard.

Re: VAR-GARCH-M

Posted: Mon Apr 22, 2013 4:41 pm
by TomDoan
Isn't the only change to add the lag of sqrthoil to the model?

Re: VAR-GARCH-M

Posted: Mon Apr 22, 2013 9:47 pm
by economics2012
Correct, but I am not sure how to add the lag of sqrthoil to the model.

Can you please help me?

Thanks a lot