Bootstrapping a GARCH in mean model

If you are seeking RATS code for implementing a particular technique or replicating results from a paper, post your request here. Be sure to include complete citations for any papers or books.

Bootstrapping a GARCH in mean model

Postby msrahman » Fri Nov 02, 2012 8:55 am

Hello,

I am using the following instruction to estimate a GARCH in mean model:

MAXIMIZE(METHOD=BFGS,Robust,RECURSIVE,ITERS=500,PARMSET=BASE+CONSTRAINT) LOGL GSTART GEND

Now I want to bootstrap the model 1000 times and get these bootstrpped statistic in print form.

Could anyone please guide me about how to do this?

Thanks in advance.

Sincerely,
S. Rahman
msrahman
 
Posts: 12
Joined: Wed Oct 31, 2012 2:32 pm

Re: Bootstrapping a GARCH in mean model

Postby TomDoan » Fri Nov 02, 2012 12:28 pm

The MAXIMIZE instruction isn't very helpful, since it shows nothing about how the GARCH model is set up. Have you looked at

http://www.estima.com/forum/viewtopic.php?f=8&t=1605&p=6036

which has an example of bootstrapping a multivariate GARCH? Given the re-sampled shocks, you would do a parametric rebuild of the data.

1000 bootstrap replications on that will take a very long time.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Bootstrapping a GARCH in mean model

Postby msrahman » Sun Nov 18, 2012 10:10 am

Hello, Thanks for your reply. Here is how I set up my GARCH model. Could you please make any comment on how to bootstrap the parameters, based on this GARCH set up?
*
DECLARE SYMMETRIC H
DECLARE VECTOR U
DECLARE FRML H11F H22F H12F LOGL
*
FRML H11F = (VC=||VC11,VC12|0.0,VC22||),$
(VA=||VA11,VA12|VA21,VA22||),$
(VB=||VB11,VB12|VB21,VB22||),$
(H=||H11{1}|H12{1},H22{1}||),$
(UB=||U1{1},U2{1}||*VB),$
(H=TR(VC)*VC+%MQFORM(H,VA)+TR(UB)*UB),$
H(1,1)
FRML H12F = H(1,2)
FRML H22F = H(2,2)

FRML LOGL = $
H11(T) = H11F(T), H22(T) = H22F(T), H12(T) = H12F(T),$
U1(T) = RESID1(T), U2(T) = RESID2(T), $
H = ||H11(T)| $
H12(T), H22(T)||, $
U = ||U1(T), U2(T)||,$
%LOGDENSITY(H,U)
MAXIMIZE(METHOD=BFGS, Robust, RECURSIVE,ITERS=500,PARMSET=BASE) LOGL GSTART GEND
msrahman
 
Posts: 12
Joined: Wed Oct 31, 2012 2:32 pm

Re: Bootstrapping a GARCH in mean model

Postby TomDoan » Mon Nov 19, 2012 4:55 am

Is there a reason you're not using the GARCH instruction for this?
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Bootstrapping a GARCH in mean model

Postby msrahman » Tue Nov 20, 2012 1:46 pm

Yes there is a reason for using Maximize. I am using a bivariate GARCH-in-mean model in money and output growth. The lagged residuals of money equation enters into the output equation as explanatory variables, in addition to the square root of money and output growth volatility. I tried to use GARCH instruction in this simple way :

dec symm[series] hhs(2,2)
clear(zeros) hhs
equation meq money
# constant money{1} trend
set u = %eqnsetresids(meq,R)
equation yeq output
# constant output{1} sqrt(hhs(1,1)) sqrt(hhs(2,2)) R{1} R{2} R{3}
group garchm meq yeq
garch(model=garchm,p=1,q=1,pmethod=simplex,piters=10,$
mvhseries=hhs,mv=bekk)

But it is not working. I need guidance on how to extract residuals from money equation and to include these into output equation. Also, simple volatility works, but the square root of volatility does not work.

Any help is appreciated.

Thanks.
S. Rahman
msrahman
 
Posts: 12
Joined: Wed Oct 31, 2012 2:32 pm

Re: Bootstrapping a GARCH in mean model

Postby TomDoan » Wed Nov 21, 2012 8:15 am

That won't work because both the R and the HH are being generated as part of the GARCH recursion. Instead, you need to use the HADJUST and UADJUST options to copy information into series as part of the calculation.

This is an example which is quite close to what you need - it has the vector MA and "M" terms as part of the mean. Once you have the estimation in terms of a GARCH instruction, it's much simpler to adapt existing programs for bootstrapping.

ghos.rpf
Program file
(2.43 KiB) Downloaded 34 times

ghos.prn
Data file
(19.81 KiB) Downloaded 34 times
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Bootstrapping a GARCH in mean model

Postby msrahman » Wed Nov 21, 2012 4:53 pm

Hello,

I rewrite the code following your instruction, but I am getting this error message. Could you please help me further?

## MAT1. Matrix %BETA Has Not Been Dimensioned


dec vect[series] sqrth(2)
dec vect[series] eps(2)

equation meq Y1
# constant Y1{1} trend
equation yeq Y2
# constant Y2{1} sqrth(1) sqrth(2) eps(1){1} eps(1){2} eps(1){3}
group garchm meq yeq

*
clear(zeros) sqrth eps
*
* Do three iterations on the VARMA part to get an initial value for the
* covariance matrix.
*
do iters=1,3
estimate(model=garchm,noprint,resids=resids)
set eps(1) %regstart() * = resids(1)
set eps(2) %regstart() * = resids(2)
end do iters
*
compute cv0=%sigma
*
garch(model=garchm,mv=bekk,presample=cv0,$
rvectors=rv,hmatrices=hh,$
uadjust=%pt(eps,t,rv(t)),hadjust=%pt(sqrth,t,%sqrt(%xdiag(hh(t)))),$
pmethod=simplex,piters=20,init=%beta)
msrahman
 
Posts: 12
Joined: Wed Oct 31, 2012 2:32 pm


Return to Looking for Code?

Who is online

Users browsing this forum: No registered users and 0 guests