multivariate GARCH forecast code! help!!!

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

kanyingli
Posts: 3
Joined: Wed May 20, 2009 2:54 pm

multivariate GARCH forecast code! help!!!

Does sb have code for multivariate GARCH forecast?

y1and y2 are two series, I used bi variate garch BEKK in modeling their conditional variance and conditional covariance. And then how can I generate the last conditional covariance matrix, the residuals, save the coefficient matrix, and then calculate the next day's conditional forecast?

Hope sb is willing to help me, this is a crucial part for my thesis....

thx a lot!

Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: multivariate GARCH forecast code! help!!!

You can access all these values via clicking on "Proc" (next to the "View") in the System window. In order to generate the last conditional covariance matrix, for instance, go to "Proc/Make Conditional Covariance", select "Covariance" as "Generate" and "Matrix" as "Format". Specify the name of the matrix and select "Date" as "Period", which corresponds to the last observation in your case. Forecasting, on the other hand, is a bit tricky. The following simple code may give you an idea on how to perform the forecasting. However, it is not written as a general procedure, so you should make necessary modifications (and corrections) to suit your own need:

Code: Select all

'It is assumed that you have already saved conditional variances, conditional covariance and residuals
'and named them respectively as GARCH01, GARCH02, GARCH01_02, RESID01 and RESID02.

'Generate new series for forecasted variables
for %y GARCH01 GARCH02 GARCH01_02 RESID01 RESID02
series {%y}f= {%y}
next

'Organize the estimated coefficients into matrix form.
'First order model (BEKK-GARCH(1,1)) is assumed.
sym(2) M
vector(2) A1
vector(2) B1

%eq = "syseq"

'Constant is assumed to be the only exogenous variable in each mean equation.
'Therefore coefficients of variance specification should start at c(3).
M(1,1)={%eq}.@coefs(3)
M(1,2)={%eq}.@coefs(4)
M(2,2)={%eq}.@coefs(5)
A1(1)={%eq}.@coefs(6)
A1(2)={%eq}.@coefs(7)
B1(1)={%eq}.@coefs(8)
B1(2)={%eq}.@coefs(9)

'Number of observations used in the estimation
!n=syseq.@regobs

'Define out of sample forecast horizon
!h = 20

'Perform dynamic forecasts via adjusting the sample
for !j=1 to !h
smpl @first+!n+!j-1 @first+!n+!j
GARCH01f = M(1,1) + A1(1)^2*RESID01f(-1)^2 + B1(1)^2*GARCH01f(-1)
GARCH02f = M(2,2) + A1(2)^2*RESID02f(-1)^2 + B1(2)^2*GARCH02f(-1)
GARCH01_02f= M(1,2) + A1(1)*A1(2)*RESID01f(-1)*RESID02f(-1) + B1(1)*B1(2)*GARCH01_02f(-1)
RESID01f = 0
RESID02f = 0
next

smpl @all

kanyingli
Posts: 3
Joined: Wed May 20, 2009 2:54 pm

Re: multivariate GARCH forecast code! help!!!

It is amazing, I really get a lot help in this forums!

Thx quite a lot!

salkhan
Posts: 1
Joined: Mon Apr 12, 2010 7:48 am

Re: multivariate GARCH ! help!!!

Well i have a question.

What makes the steps for calculation of multivariate GARCH BEKK parametrization.

What i understood is that first we have to estimate an AR(1) equation.
Second we have to use the residual terms as inputs to the multivariate garch model.

-we need to standardized the errors and,
-or do we need to directly use the series without estimating the AR(1) type equation.

NTH_Le
Posts: 5
Joined: Sun Jul 25, 2010 12:50 pm

Re: multivariate GARCH forecast code! help!!!

Can anybody help me to roll/loop the above forecast please?

I am doing my dissertation on hedge ratios based on conditional variances but I'm a beginner of Eviews. I need to make one-step ahead forecast only but I have to repeat it many times.