Page 1 of 2
Hafner Herwartz 2006
Posted: Tue May 15, 2012 10:35 am
by TomDoan
hafner_herwartz_jimf2006.zip is a replication file for the analysis in Hafner and Herwartz(2006), "Volatility impulse responses for multivariate GARCH models: An exchange rate illustration",
Journal of International Money and Finance, vol 25, no 5, 719-740. The data set is a reproduction, so the results are similar but don't quite match.
The same relatively simple VIRF calculation can be applied to MV-GARCH models estimated with STANDARD (or DVECH) which is the default for GARCH, BEKK, DBEKK, TBEKK, VECH or DIAGONAL (anything that admits a "VECH" representation). It does
not work for other types of MV-GARCH models, or models with asymmetry.
The data set has irregular daily date (holidays omitted). The garchmodels_v10.rpf in the zip uses the newer handling of this using the JULIAN option on CALENDAR (added with version 10), and is quite a bit simpler as a result.
Detailed description
Re: Hafner Herwartz 2006
Posted: Sun Aug 26, 2012 8:39 am
by Bella
Dear Tom,
Hello
I would like to know whether the generalized Impulse Response and volatility Impulse Response in enclosed paper can be obtained using the method you have posted?
Taking the VARMA-GARCH-in-M-Asymmetric BEKK as a example, how can i make changes for the related code you have posted to estimate generalized Impulse Response and volatility Impulse Response in a VARMA-GARCH-in-M-Asymmetric BEKK model.
Thank you for your instructions.
Regards.
Bella.
Re: Hafner Herwartz 2006
Posted: Mon Aug 27, 2012 8:11 am
by TomDoan
Re: Hafner Herwartz 2006
Posted: Thu Aug 30, 2012 7:34 am
by Bella
Thanks Tom. Here i have another question that is how i define the shock in the " compute hvec=%%vech_a*shock" in the part of "Use the VECH representation to compute the VIRF to the original shock" if I'd like to make volatility impulse responses of oil price and GDP in a bivariate varma-garch-m-asymmetric Bekk mode.
It is like that in the following in the Replication file for Hafner and Herwartz(2006)
sstats(max) / %if(date==920916,t,0)>>xblackwed %if(date==930802,t,0)>>xecpolicy
compute blackwed=fix(xblackwed),ecpolicy=fix(xecpolicy)
compute eps0=rv(blackwed)
compute sigma0=hh(blackwed)
compute shock=1.e+4*%vec(%outerxx(eps0)-sigma0)
but how i define eps0=rv(),sigma0=hh(), shock=1.e+4*%vec(%outerxx(eps0)-sigma0)? to make a simple volatility impulse responses.
Re: Hafner Herwartz 2006
Posted: Fri Jul 05, 2013 3:34 pm
by lumengobobo46
Hi Tom
Any advice on how to obtain the confidence (95% for example) band for this VIF?
Re: Hafner Herwartz 2006
Posted: Fri Jul 05, 2013 3:58 pm
by TomDoan
lumengobobo46 wrote:Hi Tom
Any advice on how to obtain the confidence (95% for example) band for this VIF?
Random walk Metropolis-Hastings on the GARCH model would probably be the best bet.
Re: Hafner Herwartz 2006
Posted: Tue Feb 20, 2018 2:45 pm
by jack
Dear Tom,
Can I use the simple VIRF for tracing the effects of shocks on volatility equation (not mean equation) in a VAR-DCC or VAR-BEKk model?
The reference article is here:
http://boj.org.jm/uploads/pdf/papers_pa ... system.pdf
Re: Hafner Herwartz 2006
Posted: Tue Feb 20, 2018 4:20 pm
by TomDoan
I have no idea what he's doing---there's no reference to Hafner and Herwartz, no technical description and no mention of the initial conditions (and who cares if it's a VAR---the mean model has no effect on the VIRF's).
At any rate, follow HH which does a BEKK model. There is no such thing as a simple VIRF for a DCC model.
Re: Hafner Herwartz 2006
Posted: Wed Feb 21, 2018 10:23 am
by jack
Thanks for your reply.
Hafner and Herwartz have defined impulse-response for specific dates (Black Wednesday, Plaza and Louvre accord, ...). Can I use their procedure for general impulse-response like that of a VAR model?
Re: Hafner Herwartz 2006
Posted: Wed Feb 21, 2018 12:07 pm
by TomDoan
HH do a Volatility Impulse Reponse Function. That's a completely different thing than the IRF in a VAR. In standard IRF calculations, the mean of a residual is zero, so anything non-zero is a "shock". In a VIRF for a GARCH model, the residuals have an covariance matrix which is non-zero---not only non-zero, but time-varying. If the variance of component 1 is 4.0, then a residual of 1.0 is not a "shock", but exactly the opposite---it's of a size smaller than expected. That's why HH look at historical episodes---it gives you the baseline covariance matrix and an observable shock that exceeds that. Because (unlike standard IRF's) the VIRF's aren't linear in the shock size, there's no real point to any sort of standardized calculation.
Re: Hafner Herwartz 2006
Posted: Thu Nov 08, 2018 9:11 am
by Jules89
Dear Tom,
regarding confidence bands for VIRFs, does the 2nd edition of the GARCH course contain a method to derive them?
I saw that there is a chapter on simulating VIRFs. Could this be used?
Best
Jules
Re: Hafner Herwartz 2006
Posted: Thu Nov 08, 2018 10:35 am
by TomDoan
Jules89 wrote:Dear Tom,
regarding confidence bands for VIRFs, does the 2nd edition of the GARCH course contain a method to derive them?
I saw that there is a chapter on simulating VIRFs. Could this be used?
Best
Jules
No. The simulation method is for estimating VIRF's when the model doesn't allow for a closed-form calculation. That requires simulation (a rather considerable amount of it) just to get the point estimates. To get error bands on the VIRF's would require simulating over the parameters of the GARCH model itself. If you have enough data that the asymptotics are fairly good, you can probably do that with importance sampling or independence M-H over the entire model. Both the simulations to do VIRF and the types of simulations over the parameters are covered in separate sections---they just have to be combined into one analysis.
Re: Hafner Herwartz 2006
Posted: Wed Nov 28, 2018 3:28 am
by Jules89
Dear Tom,
regarding your suggestion above. I had a quick look at the table of contents of the volatility E-course. Does it provide an example of an MCMC estimator for GARCH-BEKK models? I couldn't find that.
If it doesn't, is there some RATS code available?
Best
Jules
Re: Hafner Herwartz 2006
Posted: Wed Nov 28, 2018 1:42 pm
by TomDoan
Not for a BEKK. There's an example which does a DCC GARCH model, and there is also a detailed description of the SVAR-GARCH-M model of Elder and Serletis. A BEKK shouldn't be all that difficult, at least if you have enough data that the asymptotics are pretty good.
Re: Hafner Herwartz 2006
Posted: Wed Dec 19, 2018 9:43 am
by Jules89
Dear Tom,
I have two questions regarding MCMC estimation of the BEKK model:
1)
I went through the MCMC code for the DCC-GARCH. Wouldn't it be possible to estimate a BEKK model with the similar procedure? I start with the ML estimates, then I generate candidate draws with the t-distribution and evaluate it using:
Code: Select all
compute btest=blast+%ranmvt(fxx,nuxx)
garch(p=1,q=1,mv=bekk,initial=btest,method=eval,$
rvectors=rv,hmatrices=htest) / xjpn xfra xsui
compute logptest=%logl
The rest should be the same.
2)
Above would be Random Walk MH, why do you think that independence MH is better suited?
Best
Jules