Adding a Mean Model of my choice in the GARCH process

Discussions of ARCH, GARCH, and related models
arezitis
Posts: 12
Joined: Sat Jul 06, 2013 4:05 am

Adding a Mean Model of my choice in the GARCH process

Unread post 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.
Attachments
code.txt
the code that I use
(2.73 KiB) Downloaded 984 times
data.RAT
the data that I use
(18.25 KiB) Downloaded 989 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

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

Unread post 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.
albeta456
Posts: 5
Joined: Sun Sep 28, 2014 3:20 pm

GARCH mean

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

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

Unread post 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)
albeta456
Posts: 5
Joined: Sun Sep 28, 2014 3:20 pm

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

Unread post by albeta456 »

Thanks, Tom.

How can I save the h series in a file?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

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

Unread post by TomDoan »

H is just a SERIES, so you can use COPY.
Post Reply