Out-of-sample forecast of multivariate GARCH Models

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 Moderator, EViews Gareth

Out-of-sample forecast of multivariate GARCH Models

Postby F_B on Wed Jan 14, 2009 2:35 am

Hi,
I'm writing a thesis about the Performence of Minimum Variance Hedge Ratios wich are determined by multivariate GARCH models. Therefore I would like to do conduct a 1-day/1-week ahead out-of-sample forecast of the conditional variance/covariance produces by the GARCH Model. I manage to generate the conditional variances of multivariate GARCH Models, e.g. the Constant conditional correlation model for a With-in-sample comperison through the standard "make covariance" function. I tried to create a model object from the estimated CCC Model in order to perform a out-of-sample forecast, but the model object as far es I know does not allow to extract the conditional covariances/variances into a seperate series (what I need to determine the hedge ratios). Does anyone know how to manage this task or has someone programmed a solution for my out of sample problem? I'm realy thankfull for answers as I'm have a timeproblem to finalise the thesis without a solution to this!
Thanks a lot in advance!!

Flo
F_B
 
Posts: 1
Joined: Wed Jan 14, 2009 2:13 am

Re: Out-of-sample forecast of multivariate GARCH Models

Postby trubador on Wed Jan 14, 2009 2:09 pm

I think it will be a better approach to produce a custom-made solution to your need, since you have a time constraint. I suggest you to share your workfile and provide more information on your model (e.g. variables, definitions, etc.), if it is OK for you. Right now I am very busy, but I will try to build a code for you as soon as I am available. Hence, I need to know your deadline on this issue. In the meantime, other members of the forum or moderators may also help you.
trubador
EViews Expert
 
Posts: 369
Joined: Thu Nov 20, 2008 12:04 pm

Re: Out-of-sample forecast of multivariate GARCH Models

Postby NTH_Le on Mon Jul 26, 2010 7:41 am

Hi there,

I face the same problem as F_B. Here is my workfile and the information about the model I want to build. Could you give some help?

Many thanks.
Attachments
data.wf1
(42.26 KiB) Downloaded 29 times
model information.doc
(24 KiB) Downloaded 31 times
NTH_Le
 
Posts: 5
Joined: Sun Jul 25, 2010 12:50 pm

Re: Out-of-sample forecast of multivariate GARCH Models

Postby trubador on Tue Jul 27, 2010 6:32 am

The following inefficient yet effective piece of code should be doing what you want:

Code: Select all
'First order model (BEKK-GARCH(1,1)) is assumed.
sym(2) M
vector(2) A1
vector(2) B1

'Create a system
%sys = "sysbekk"
system {%sys}
{%sys}.append duks = c(1)
{%sys}.append dukf = c(2)

'Estimate the system as diagonal BEKK
smpl @first @first+368
{%sys}.arch @diagbekk c arch(1) garch(1)

'Save the conditional series
{%sys}.makegarch

'Compute the in-sample hedge ratio
series hr = garch_02/garch_01_02
delete garch*

'Rolling forecasts
for !i=1 to 154

   smpl @first @first+368+!i-1

   {%sys}.arch @diagbekk c arch(1) garch(1)
   {%sys}.makegarch
   {%sys}.makeresids

   'Generate new series for forecasted variables
   for %y GARCH_01 GARCH_02 GARCH_01_02 RESID01 RESID02
     series {%y}f= {%y}
   next

   'Organize the estimated coefficients into matrix form.
   '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)={%sys}.@coefs(3)
   M(1,2)={%sys}.@coefs(4)
   M(2,2)={%sys}.@coefs(5)
   A1(1)={%sys}.@coefs(6)
   A1(2)={%sys}.@coefs(7)
   B1(1)={%sys}.@coefs(8)
   B1(2)={%sys}.@coefs(9)

   'Number of observations used in the estimation
   !n={%sys}.@regobs

   'Define out of sample forecast horizon
   !h = 1

   'Perform dynamic forecasts via adjusting the sample (do not forget the missing value due to lag structure)
   for !j=1 to !h
      smpl @first+!n+!j @first+!n+!j+1
      GARCH_01f = M(1,1) + A1(1)^2*RESID01f(-1)^2 + B1(1)^2*GARCH_01f(-1)
      GARCH_02f = M(2,2) + A1(2)^2*RESID02f(-1)^2 + B1(2)^2*GARCH_02f(-1)
      GARCH_01_02f= M(1,2) + A1(1)*A1(2)*RESID01f(-1)*RESID02f(-1) + B1(1)*B1(2)*GARCH_01_02f(-1)
      RESID01f = 0
      RESID02f = 0
   next

  'Out-sample hedge ratios
  series hrf = garch_02f/garch_01_02f

  'Combine in-sample and out-sample hedge ratios into one series
  hr = hrf
  delete garch* resid0*

next
smpl @all
trubador
EViews Expert
 
Posts: 369
Joined: Thu Nov 20, 2008 12:04 pm

Re: Out-of-sample forecast of multivariate GARCH Models

Postby NTH_Le on Tue Jul 27, 2010 2:21 pm

Thank you so much Trubador. It really helps. :D
NTH_Le
 
Posts: 5
Joined: Sun Jul 25, 2010 12:50 pm


Return to Estimation

Who is online

Users browsing this forum: No registered users and 1 guest