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.
msrahman
Posts: 53
Joined: Wed Oct 31, 2012 2:32 pm

Bootstrapping a GARCH in mean model

Unread post by msrahman »

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

Re: Bootstrapping a GARCH in mean model

Unread post by TomDoan »

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.p ... 605&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.
msrahman
Posts: 53
Joined: Wed Oct 31, 2012 2:32 pm

Re: Bootstrapping a GARCH in mean model

Unread post by msrahman »

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

Re: Bootstrapping a GARCH in mean model

Unread post by TomDoan »

Is there a reason you're not using the GARCH instruction for this?
msrahman
Posts: 53
Joined: Wed Oct 31, 2012 2:32 pm

Re: Bootstrapping a GARCH in mean model

Unread post by msrahman »

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

Re: Bootstrapping a GARCH in mean model

Unread post by TomDoan »

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.

Note: a newer version of this has been posted at http://www.estima.com/forum/viewtopic.php?f=8&t=2130
ghos.rpf
Program file
(2.43 KiB) Downloaded 1550 times
ghos.prn
Data file
(19.81 KiB) Downloaded 1548 times
msrahman
Posts: 53
Joined: Wed Oct 31, 2012 2:32 pm

Re: Bootstrapping a GARCH in mean model

Unread post by msrahman »

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)
xiaoxi
Posts: 2
Joined: Sun Jun 15, 2014 6:06 am

Re: Bootstrapping a GARCH in mean model

Unread post by xiaoxi »

Hallo Tom,

I just ran the replication file GHOS.RPF. Nevertheless the result shows that there is no convergence. Then I tired different values of piters but still the model did not seem to be converged. Since I want to use this literature as the benchmark of my master thesis, I want to figure out why this model does not show convergence any more.

Thanks a lot in advance. :D

Xiaoxi
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Bootstrapping a GARCH in mean model

Unread post by TomDoan »

xiaoxi wrote:Hallo Tom,

I just ran the replication file GHOS.RPF. Nevertheless the result shows that there is no convergence. Then I tired different values of piters but still the model did not seem to be converged. Since I want to use this literature as the benchmark of my master thesis, I want to figure out why this model does not show convergence any more.

Thanks a lot in advance. :D

Xiaoxi
It looks like it actually has converged, but with a very poorly estimated BFGS covariance matrix hence the nasty diagnostics. If you switch over to BHHH (after it has stopped the BFGS iterations) you can get a more reasonable set of standard errors.

Note: a newer version of this has been posted at http://www.estima.com/forum/viewtopic.php?f=8&t=2130 which does shift to BHHH and shows convergence.


With macro data such as this, there can be convergence issues because they have non-trivial mean models so there are many more directions of correlation among the parameters. And in particular, this has correlation between the lagged epsilon's and the M terms (perhaps the largest outliers tend to be one sign).

Note, BTW, that a different set of data might require a different mean model than a VARMA(2,1). For instance, a simpler VAR(2) might be adequate with other data and would likely to easier to get to converge.
Post Reply