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

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

multivariate GARCH forecast code! help!!!

Postby kanyingli » Thu May 21, 2009 1:35 pm

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!!!

Postby trubador » Fri May 22, 2009 1:34 am

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
  series {%y}f= {%y}

'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

'Name of your system equation
%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).

'Number of observations used in the estimation

'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

smpl @all

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

Re: multivariate GARCH forecast code! help!!!

Postby kanyingli » Fri May 22, 2009 8:36 am

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

Thx quite a lot! :D

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

Re: multivariate GARCH ! help!!!

Postby salkhan » Mon Apr 12, 2010 7:59 am

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.

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

Any comments please...

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

Re: multivariate GARCH forecast code! help!!!

Postby NTH_Le » Sun Jul 25, 2010 1:22 pm

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.

Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 5 guests