Page 1 of 1

Adding a Mean Model of my choice in the GARCH process

Posted: Thu Feb 13, 2014 12:34 pm
by arezitis
Greetings everyone,

I would like to ask you suggestions regarding the estimation of the Mean Model of a GARCH process.

I have estimated an Asymmetric Markov Switching Vector Error Correction model in an effort to investigate the price mechanism of fresh tomato. And, now, I would like to use this model as a Mean Model for the estimation of a GARCH process.

I have used the example 5.3 from the GARCH workbook (BEKK), where, I substituted the code that estimates the Mean Model with the equations that I have already estimated with AMSVEC. The code produces results, but I think that the garch command does not use the equations that I provide.

Thus, I would like to ask for your suggestions on how to add the Mean Model of my choice (AMSVEC) to the GARCH code of example 5.3.

Thank you for your time. Any suggestions would be appreciated.

Re: Adding a Mean Model of my choice in the GARCH process

Posted: Thu Feb 13, 2014 4:41 pm
by TomDoan
That would be very complicated. The GARCH model relies upon a recursion in the residuals, but the MS model doesn't give you a residual, but two latent models with only some probability that each is correct. Also, you estimated the MS model under an assumption of homoscedasticity either within each regime or perhaps a single variance across both time and regime, and it's not clear what happens if the process was actually GARCH.

GARCH mean

Posted: Mon Sep 29, 2014 12:35 am
by albeta456
Tom,

Can you post the codes for univariate GARCH-mean using "maximize"?
I know that I can use
garch(p=1,q=1,reg,hseries=h) / r
# constant r{1} %garchv{1}

But I need the detailed codes with logl that I can modify.

I tried the following, but it doesn't work:

nonlin(parmset=meanparms) c0 c1 theta
compute c0=.01, c1=0, theta=0
frml uf = r-c0-c1*r{1}-theta*h

nonlin(parmset=garchparms) a0 a1 b1
linreg r
# constant r{1}

set u = %resids
set uu = %seesq
set h = %seesq

compute a1=.1,b1=.85,a0=%seesq*(1-a1-b1)
frml hf = a0 + a1*uu{1} + b1*h{1}
frml logl = u=uf,uu=u^2,h=hf,%logdensity(h,u)

maximize(parmset=meanparms+garchparms) logl 2 gend


Thanks.

Albet

Re: Adding a Mean Model of my choice in the GARCH process

Posted: Mon Sep 29, 2014 10:51 am
by TomDoan
You have to compute H first in

frml logl = u=uf,uu=u^2,h=hf,%logdensity(h,u)

that is

frml logl = h=hf,u=uf,uu=u^2,%logdensity(h,u)

Re: Adding a Mean Model of my choice in the GARCH process

Posted: Tue Sep 30, 2014 8:18 pm
by albeta456
Thanks, Tom.

How can I save the h series in a file?

Re: Adding a Mean Model of my choice in the GARCH process

Posted: Tue Sep 30, 2014 9:14 pm
by TomDoan
H is just a SERIES, so you can use COPY.