Page 1 of 1
Volatility IRF
Posted: Tue Apr 24, 2012 5:32 am
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
Re: Volatility IRF
Posted: Wed Apr 25, 2012 12:43 pm
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
Re: Volatility IRF
Posted: Fri Sep 19, 2014 11:23 am
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.
Re: Volatility IRF
Posted: Fri Sep 19, 2014 2:48 pm
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".