Hi,
I created a system to estimate a diagonal VECH with
sys01.makegarch(mat,cor)
Is it possible to do a one step ahead dynamic forecast of the resulting garch matrix?
Regards,
Elias
GARCH correlation matrix forecast
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Re: GARCH correlation matrix forecast
This will give you the idea: http://forums.eviews.com/viewtopic.php?f=4&t=346#p9161
Re: GARCH correlation matrix forecast
Thanks for your hint trubator. However, this procedure is cumbersome and not practical when estimating larger matrices or/ and when using TARCH. Isn't there a more elegant way available?
Re: GARCH correlation matrix forecast
Does really no one knows any approach?
Re: GARCH correlation matrix forecast
I implemented the solution to the above problem for the diagonal VECH but encountered problems with GARCH negativity and computation time for large matrices. I found the BEKK approach more elegant in terms of parsimonious estimation and system stability. For everyone who is interested in making GARCH, more precisely TARCH, correlation matrix forecasts using a BEKK approach please see code below. After estimating the system and saving its parameter output one could continue with:
Here the control variable !n stands for the number of imported series and !coeff_counter ranges from the first relevant parameter to the last. As the standard coefficient vector only contains 750 elements one has to create another one with at least 4*(!n + 0.5*(!n^2 - !n) elements for this BEKK using TARCH model.
The code provides a one step ahead forecast conditional on today's information and therefore stands in contrast to the above suggested method under the link: viewtopic.php?f=4&t=346#p9161
Additionally, it can be used for large scale matrices where the number of series can vary.
Code: Select all
'retrieve parameter estimates
for !i=1 to !n
for !j=1+!i-1 to !n
M(!i,!j) = sys01.@coefs(!coeff_counter)
!coeff_counter=!coeff_counter+1
next
next
for !i=1 to !n
A1(!i,!i) = sys01.@coefs(!coeff_counter)
!coeff_counter=!coeff_counter+1
next
for !i=1 to !n
D1(!i,!i) = sys01.@coefs(!coeff_counter)
!coeff_counter=!coeff_counter+1
next
for !i=1 to !n
B1(!i,!i) = sys01.@coefs(!coeff_counter)
!coeff_counter=!coeff_counter+1
next
'forecast conditional variance
if !n > 9 then
for !i = 1 to 9
!longrun_cvar = M(!i,!i) / (1-A1(!i,!i)*A1(!i,!i) - 0.5*D1(!i,!i)*D1(!i,!i) - B1(!i,!i)*B1(!i,!i))
scalar garchf_{!i}=!longrun_cvar + (A1(!i,!i)*A1(!i,!i) + 0.5*D1(!i,!i)*D1(!i,!i) + B1(!i,!i)*B1(!i,!i))*(garch_0{!i}(!observations) - !longrun_cvar)
next
for !i = 10 to !n
!longrun_cvar = M(!i,!i) / (1-A1(!i,!i)*A1(!i,!i) - 0.5*D1(!i,!i)*D1(!i,!i) - B1(!i,!i)*B1(!i,!i))
scalar garchf_{!i}=!longrun_cvar +(A1(!i,!i)*A1(!i,!i) + 0.5*D1(!i,!i)*D1(!i,!i) + B1(!i,!i)*B1(!i,!i))*(garch_{!i}(!observations) - !longrun_cvar)
next
Else
for !i = 1 to !n
!longrun_cvar = M(!i,!i) / (1-A1(!i,!i)*A1(!i,!i) - 0.5*D1(!i,!i)*D1(!i,!i) - B1(!i,!i)*B1(!i,!i))
scalar garchf_{!i}=!longrun_cvar + (A1(!i,!i)*A1(!i,!i) + 0.5*D1(!i,!i)*D1(!i,!i) + B1(!i,!i)*B1(!i,!i))*(garch_0{!i}(!observations) - !longrun_cvar)
next
endif
'forecast conditional covariance
if !n > 9 then
for !i=1 to 9
for !j=1+!i to 9
!longrun_ccov = M(!i,!j) / (1-A1(!i,!i)*A1(!j,!j) - 0.5*D1(!i,!i)*D1(!j,!j) - B1(!i,!i)*B1(!j,!j))
scalar covf_{!i}_{!j} = !longrun_ccov + (A1(!i,!i)*A1(!j,!j) + 0.5*D1(!i,!i)*D1(!j,!j) + B1(!i,!i)*B1(!j,!j))*(garch_0{!i}_0{!j}(!observations) - !longrun_ccov)
scalar covf_{!j}_{!i} =covf_{!i}_{!j}
next
next
for !i = 1 to 9
for !j = 10 to !n
!longrun_ccov = M(!i,!j) / (1-A1(!i,!i)*A1(!j,!j) - 0.5*D1(!i,!i)*D1(!j,!j) - B1(!i,!i)*B1(!j,!j))
scalar covf_{!i}_{!j} = !longrun_ccov + (A1(!i,!i)*A1(!j,!j) + 0.5*D1(!i,!i)*D1(!j,!j) + B1(!i,!i)*B1(!j,!j))*(garch_0{!i}_{!j}(!observations) - !longrun_ccov)
scalar covf_{!j}_{!i} =covf_{!i}_{!j}
next
next
for !i = 10 to !n-1
for !j = !i + 1 to !n
!longrun_ccov = M(!i,!j) / (1-A1(!i,!i)*A1(!j,!j) - 0.5*D1(!i,!i)*D1(!j,!j) - B1(!i,!i)*B1(!j,!j))
scalar covf_{!i}_{!j} = !longrun_ccov + (A1(!i,!i)*A1(!j,!j) + 0.5*D1(!i,!i)*D1(!j,!j) + B1(!i,!i)*B1(!j,!j))*(garch_{!i}_{!j}(!observations) - !longrun_ccov)
scalar covf_{!j}_{!i} =covf_{!i}_{!j}
next
next
Else
for !i = 1 to !n-1
for !j = 1+!i to !n
!longrun_ccov = M(!i,!j) / (1-A1(!i,!i)*A1(!j,!j) - 0.5*D1(!i,!i)*D1(!j,!j) - B1(!i,!i)*B1(!j,!j))
scalar covf_{!i}_{!j} = !longrun_ccov + (A1(!i,!i)*A1(!j,!j) + 0.5*D1(!i,!i)*D1(!j,!j) + B1(!i,!i)*B1(!j,!j))*(garch_0{!i}_0{!j}(!observations) - !longrun_ccov)
scalar covf_{!j}_{!i} =covf_{!i}_{!j}
next
next
endif
'calculate correlation matrix entries
matrix(!n,!n) correl
!correl_counter = 0
for !i = 1 to !n - !correl_counter
for !j = 1 to !n
if !i = !j then
correl(!i,!j) = 1
Else
correl(!i,!j) = covf_{!i}_{!j} / ( @sqrt(garchf_{!i})*@sqrt(garchf_{!j}))
correl(!j,!i) = correl(!i,!j)
endif
next
!correl_counter = !correl_counter + 1
nextThe code provides a one step ahead forecast conditional on today's information and therefore stands in contrast to the above suggested method under the link: viewtopic.php?f=4&t=346#p9161
Additionally, it can be used for large scale matrices where the number of series can vary.
Who is online
Users browsing this forum: No registered users and 1 guest
