Volatility IRF

Discussions of ARCH, GARCH, and related models
fadimohamed
Posts: 17
Joined: Mon May 23, 2011 11:13 am

Volatility IRF

Unread post by fadimohamed »

Dear Tomm,
I have a question with regard to setting the initial values for the variances, taking into account that i am using an asymmetric BEKK representation GARCH(1,1), should i use the long-run unconditional variance equation? Is there a way to consider the asymmetry effects in it?
Many Thanks
Fadi
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Volatility IRF

Unread post by TomDoan »

With asymmetry, there is no closed-form stationary solution for the variance for any non-trivial multivariate GARCH model because the expected value of the asymmetric term is a non-linear function of the covariance matrix. The following solves the system of non-linear equations by converting into VECH form and using a Gauss-Seidel algorithm (which just replaces the estimate with the RHS calculation looking for a stationary point). Note that it's possible that this won't converge if there is no stationary solution among positive definite matrices.

@MVGARCHtoVECH can be used for converting to the VECH representation.

This requires at least RATS 7.3 because it uses the %BICDF function.

Code: Select all

open data m-pfemrk6508.txt
calendar(m) 1965:1
data(format=prn,org=columns) 1965:01 2008:12 date pfe mrk
*
garch(p=1,q=1,mv=bekk,asymmetric,piters=10,pmeth=simplex,iters=200) / pfe mrk
*
@MVGARCHtoVECH(MV=BEK,asymm)
compute ncomp=%symmpos(%nvar,%nvar)
dec vect hvech(ncomp)
dec symm h0(%nvar,%nvar) hasymmsq(%nvar,%nvar)
ewise h0(i,j)=%if(i==j,%%vech_c(%symmpos(i,j)),0.0)
do iters=1,100
   compute rmatrix=%cvtocorr(h0)
   ewise hasymmsq(i,j)=rho=rmatrix(i,j),%if(i==j,.5*h0(i,i),$
     h0(i,j)*%bicdf(0.0,0.0,rho)+sqrt(1-rho^2)/(2*%pi)*sqrt(h0(i,i)*h0(j,j)))
   compute hvech=%vec(h0)
   compute hvech=%%vech_c+%%vech_a*hvech+%%vech_b*hvech+%%vech_d*%vec(hasymmsq)
   compute h0=%vectosymm(hvech,%nvar)
   disp hvech
end do iters
m-pfemrk6508.txt
Data file
(14.21 KiB) Downloaded 1067 times
Baroni77
Posts: 8
Joined: Wed Aug 07, 2013 6:50 am

Re: Volatility IRF

Unread post by Baroni77 »

Hi Tom,

very useful code but could you please confirm that the following line is correct?

compute hvech=%%vech_c+%%vech_a*hvech+%%vech_b*hvech+%%vech_d*%vec(hasymmsq)

I cannot understand why %%vech_a and %%vech_b both multiply hvech. Shouldn't %%vech_a multiply the squared error vector u?

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

Re: Volatility IRF

Unread post by TomDoan »

Baroni77 wrote:Hi Tom,

very useful code but could you please confirm that the following line is correct?

compute hvech=%%vech_c+%%vech_a*hvech+%%vech_b*hvech+%%vech_d*%vec(hasymmsq)

I cannot understand why %%vech_a and %%vech_b both multiply hvech. Shouldn't %%vech_a multiply the squared error vector u?

Thanks.
This isn't the calculation of the VIRF. This is just calculating the stationary solution of the covariance matrix of the (asymmetric) GARCH process. If you're interested in doing VIRF's with an asymmetric model, I would suggest using simulations and taking the average rather than trying to do it "algebraically".
Post Reply