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
Out-of-sample forecast of multivariate GARCH Models
Moderators: EViews Gareth, EViews Moderator
Re: Out-of-sample forecast of multivariate GARCH Models
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.
Re: Out-of-sample forecast of multivariate GARCH Models
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.
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 689 times
-
- model information.doc
- (24 KiB) Downloaded 682 times
Re: Out-of-sample forecast of multivariate GARCH Models
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 @allRe: Out-of-sample forecast of multivariate GARCH Models
Thank you so much Trubador. It really helps. :D
Re: Out-of-sample forecast of multivariate GARCH Models
neat idea!
However, if h>1, the code will not correct.
for example, let h=2, we should compute E_t(e_{t+1}^{2}) when producing conditional variance at t+2 conditional on time t.
However, if h>1, the code will not correct.
for example, let h=2, we should compute E_t(e_{t+1}^{2}) when producing conditional variance at t+2 conditional on time t.
Who is online
Users browsing this forum: No registered users and 2 guests
