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!

## multivariate GARCH forecast code! help!!!

**Moderators:** EViews Gareth, EViews Moderator

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

'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).

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

### Re: multivariate GARCH forecast code! help!!!

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

Thx quite a lot!

Thx quite a lot!

### 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.

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

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

### 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.

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.

### Who is online

Users browsing this forum: No registered users and 12 guests