Page 1 of 2

error in GARCH estimation

Posted: Sun Dec 07, 2014 2:58 pm
by kenshiro
Hello all,

I was trying to estimate an simple GARCH(1,1)-in-mean model: y=b1*h+b2*x2+b3*x3+b4*x4+b5*x5+const.+u, where h is the conditional variance of u, x2-x5 are exogenous variables.

Here is my code:

Code: Select all

smpl 1987m02 1999m11 equation eqn1 eqn1.arch(1,1,archm=var) y x2 x3 x4 x5 c
I checked the data, and I am sure that all variables are good between 1987m02 and 1999m11. i.e., there is no missing data between 1987m2 and 1999m11. However, EViews reports an error: Objective function evaluates to NA for one or more observations in "DO_ eqn1.arch(1,1,archm=var) y x2 x3 x4 x5 c"

I tried to adjust the start and end date, and the error exists until I set "smpl 1992m01 1999m01". I tries a couple of other series for GARCH estimation, this problem exists for most of them, so I have to adjust the start and end date every time. The weirdest thing is, I don't see any consistent pattern how I should adjust the start and end date.

So I have two questions:
(1) Given there is no missing data between 1987m02 and 1999m11, why should I adjust the start and end date?
(2) How should I adjust the start and end date? I don't see any consistent pattern. I don't wanna try-and-error every time to figure out the start and end dates that will work.

Thank you very much.

Best,
Ken.

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 3:01 pm
by kenshiro
BTW, I am using EViews 8

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 3:57 pm
by startz
You might want to post your workfile.

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 4:30 pm
by kenshiro
Hello startz,

Please see attached my workfile, and this is my original program code, which estimates GARCH(1,1) for each country. Thank you very much.

Code: Select all

table(16,16) tabarchex3m tabarchex3m(1,1) = "coefficient" tabarchex3m(1,2) = "BE" tabarchex3m(1,3) = "FR" tabarchex3m(1,4) = "GY" tabarchex3m(1,5) = "IR" tabarchex3m(1,6) = "IT" tabarchex3m(1,7) = "NE" tabarchex3m(1,8) = "SP" tabarchex3m(1,9) = "EU" tabarchex3m(1,10) = "DE" tabarchex3m(1,11) = "NO" tabarchex3m(1,12) = "SN" tabarchex3m(1,13) = "SW" tabarchex3m(1,14) = "UK" tabarchex3m(1,15) = "JP" tabarchex3m(1,16) = "CA" tabarchex3m(2,1) = "c(1)" tabarchex3m(3,1) = "p-value" tabarchex3m(4,1) = "c(2)" tabarchex3m(5,1) = "p-value" tabarchex3m(6,1) = "c(3)" tabarchex3m(7,1) = "p-value" tabarchex3m(8,1) = "c(4)" tabarchex3m(9,1) = "p-value" tabarchex3m(10,1) = "c(5)" tabarchex3m(11,1) = "p-value" tabarchex3m(12,1) = "constant" tabarchex3m(13,1) = "p-value" tabarchex3m(14,1) = "Obs." tabarchex3m(15,1) = "adj.R Sq." tabarchex3m(16,1) = "DW" !i=1 for %0 BE FR GY IRP IT NE SP EU DE NO SN SW UK JP CA if %0="BE" or %0="FR" or %0="IRP" or %0="IT" or %0="NE" or %0="SP" then smpl 1987m02 1999m11 endif if %0="GY" then smpl 1991m02 1999m11 endif if %0="EU" then smpl 1998m4 2009m10 endif if %0="DE" then smpl 1997m1 2009m10 endif if %0="NO" or %0="JP" then smpl 1986m8 2009m10 endif if %0="SN" then smpl 1990m1 2009m10 endif if %0="SW" or %0="CA" then smpl 1995m1 2009m10 endif if %0="UK" then smpl 1988m2 2009m10 endif ' GARCH(1,1) estimation eqn{!i}.arch(1,1,archm=var) rp3m{%0} pi{%0}cv hpip{%0}cv piuscv hpipuscv c ' save the output tabarchex3m(2,!i+1)=@str(eqn{!i}.@coefs(1),"c.6") tabarchex3m(3,!i+1)=@str(eqn{!i}.@pval(1),"c.6") tabarchex3m(4,!i+1)=@str(eqn{!i}.@coefs(2),"c.6") tabarchex3m(5,!i+1)=@str(eqn{!i}.@pval(2),"c.6") tabarchex3m(6,!i+1)=@str(eqn{!i}.@coefs(3),"c.6") tabarchex3m(7,!i+1)=@str(eqn{!i}.@pval(3),"c.6") tabarchex3m(8,!i+1)=@str(eqn{!i}.@coefs(4),"c.6") tabarchex3m(9,!i+1)=@str(eqn{!i}.@pval(4),"c.6") tabarchex3m(10,!i+1)=@str(eqn{!i}.@coefs(5),"c.6") tabarchex3m(11,!i+1)=@str(eqn{!i}.@pval(5),"c.6") tabarchex3m(12,!i+1)=@str(eqn{!i}.@coefs(6),"c.6") tabarchex3m(13,!i+1)=@str(eqn{!i}.@pval(6),"c.6") tabarchex3m(14,!i+1)=@str(eqn{!i}.@regobs,"i") tabarchex3m(15,!i+1)=@str(eqn{!i}.@rbar2,"c.6") tabarchex3m(16,!i+1)=@str(eqn{!i}.@dw,"c.6") !i=!i+1 next

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 4:37 pm
by startz
I get a perfect multicollinearity error. is one of your RHS variables a measure of ARCH variance?

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 5:29 pm
by kenshiro
Hi startz,

Thanks for the reply. Yes, the RHS variables: pi{%0}cv, hpip{%0}cv, piuscv, hpipuscv are all conditional variance of other series, but they have nothing to do with the dependent variable rp3m{%0}.

I am fully aware there might be multicollinearity problems, as hpip{%0}cv & hpipuscv, pi{%0}cv & piuscv are highly correlated. But in that case, EViews should report an error "near singular matrix", rather than "Objective function evaluates to NA for one or more observations". I am okay with the error "near singular matrix", but I am really confused about the error "Objective function evaluates to NA for one or more observations".

For example, if you run the GARCH regression for country BE, it reports "Objective function evaluates to NA for one or more observations", I was wondering where does that error come from?

Thanks again for your kind help!

Best,
Ken

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 5:35 pm
by startz
I do not get that error message. You may want to update your copy of EViews to see if it makes any difference.

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 6:01 pm
by kenshiro
Thanks a lot startz. I had a problem updating my EViews, I need to contact the customer service. This might take some time.

So you are saying you only get the error "near singular matrix", not the error "Objective function evaluates to NA for one or more observations"? just wanna make sure. Thanks.

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 6:06 pm
by startz
That's what I'm saying. What's more, it went away when I got rid of the ARCH-M term.

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 6:13 pm
by kenshiro
Thanks startz. If I take away ARCH-M term, the error goes away here as well.

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 6:51 pm
by startz
Hmmm, are you sure that none of the RHS variables is the variance of the LHS?

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 7:19 pm
by kenshiro
Yes, I am pretty sure. The LHS is the risk premia, and RHS variables are conditional variance series of inflation and output for country %0 and U.S.

I guess the multicolinary problem possibly results from the fact that
(1) hpip{%0}cv and hpipuscv are correlated.
(2) pi{%0}cv and piuscv are correlated.

It would be reasonable that macro aggregates from different countries have co-movements

Re: error in GARCH estimation

Posted: Sun Dec 07, 2014 7:26 pm
by kenshiro
or it would be that the conditional variance of risk premia is highly correlated with the conditional variance of inflation or output. But I cannot test it right now.... I am stuck with this error "Objective function evaluates to NA".....

Re: error in GARCH estimation

Posted: Tue Dec 09, 2014 10:25 am
by kenshiro
Hi Startz,

I successfully updated my EViews, and the weird error "Objective function evaluates to NA" is gone. Now I don't get any error messages, but the p-values (as well as adj.R Sq. and DW statistics) from the regressions are NA. Is that the "multicollinearity error" you get? Thanks.

Best,
Ken

Re: error in GARCH estimation

Posted: Tue Dec 09, 2014 10:28 am
by startz
Yes, that is probably the multicollinearity error. You might try retrieiving the estimated conditional variances and comparing them to the RHS variables to look for clues.