Out-of-sample mean forecasts from VARMA-MGARCH-M

Discussions of ARCH, GARCH, and related models
hasanov
Posts: 46
Joined: Tue May 29, 2012 7:31 pm

Out-of-sample mean forecasts from VARMA-MGARCH-M

Unread post by hasanov »

Hi Tom,

I am trying to forecast the mean variables from VARMA-MGARCH-M model. Window I am using is the recursive window. I would like to store one-step ahead out-of-sample mean forecasts in “rv1” and “rv2” objects. Could you please guide me on this issue? The way I have done the code does not work.

Code: Select all


OPEN DATA "Data.txt"
CALENDAR(M) 1975:1
DATA(FORMAT=PRN,ORG=COLUMNS) 1975:01 2017:12 iip cpi
*
set riip = 1200.0*(log(iip)-log(iip{1}))
set rcpi = 1200.0*(log(cpi)-log(cpi{1}))
*
source mvgarchfore.src

dec series rv1
dec series rv2

clear rv1 rv2

dec vect[series] sqrth(2)
dec vect[series] eps(2)
dec symm[series] hhs(2,2)
clear(zeros) hhs
do regend = 2009:12, 2017:12, 1
*
equation iip_eq riip
# constant sqrth(1) sqrth(2) riip{1} rcpi{1} eps(1){1} eps(2){1}
equation cpi_eq rcpi
# constant sqrth(1) sqrth(2) riip{1} rcpi{1} eps(1){1} eps(2){1}
*
group varmah iip_eq cpi_eq
*
clear(zeros) sqrth eps
*
smpl 1975:01 regend riip
smpl 1975:01 regend rcpi
*
do iters=1,3
   estimate(model=varmah,resids=resids)
   set eps(1) %regstart() * = resids(1)
   set eps(2) %regstart() * = resids(2)
end do iters
*
compute cv0=%sigma
*
garch(model=varmah, mv=bekk, robust, distrib=norm, rvectors=rv, hmatrices=hh, mvhseries=hhs, pmethod=simplex, presample=cv0,$
    uadjust=%pt(eps,t,rv(t)),hadjust=%(sqrth(1)=sqrt(hhs(1,1)), sqrth(2)=sqrt(hhs(2,2)), piters=15,cvcrit=0.0001, iters=2000)) 1975:01 regend riip rcpi
@MVGarchFore(MV=BEKK, steps=1) hh rv
*
do i=1,1
compute rv1(regend+i) = rv(regend+i)(1)
compute rv2(regend+i) = rv(regend+i)(2)
end do i
*
display regend
*
end do regend
*
print / rv1 rv2

Attachments
Data.txt
Data file
(7.58 KiB) Downloaded 855 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Out-of-sample mean forecasts from VARMA-MGARCH-M

Unread post by TomDoan »

There's no closed form forecast for the out-of-sample forecast of that model. There is if the mean is linear in the variance, but not if it's linear in the square root. (The expected value of the square root of h is not the square root of the expected value of h).
hasanov
Posts: 46
Joined: Tue May 29, 2012 7:31 pm

Re: Out-of-sample mean forecasts from VARMA-MGARCH-M

Unread post by hasanov »

Thanks Tom for your clarification !

How to generate mean forecast if I remove in-mean (i.e., from VARMA-MGARCH model) ?

Could you correct the following code:

Code: Select all

*
source mvgarchfore.src
*
dec series rv1
dec series rv2
*
clear rv1 rv2
*
dec vect[series] eps(2)
dec symm[series] hhs(2,2)
clear(zeros) hhs
do regend = 2009:12, 2017:12, 1
*
equation eq1
# constant var1{1} var2{1} eps(1){1} eps(2){1}
equation eq2
# constant var1{1} var2{1} eps(1){1} eps(2){1}
*
group varmah eq1 eq2
*
clear(zeros) eps
*
smpl 1975:01 regend var1
smpl 1975:01 regend var2
*
do iters=1,3
   estimate(model=varmah,resids=resids)
   set eps(1) %regstart() * = resids(1)
   set eps(2) %regstart() * = resids(2)
end do iters
*
compute cv0=%sigma
*
garch(model=varmah, mv=bekk, robust, distrib=norm, rvectors=rv, hmatrices=hh, mvhseries=hhs, pmethod=simplex, presample=cv0,$
    uadjust=%pt(eps,t,rv(t)), piters=15,cvcrit=0.0001, iters=2000)) 1975:01 regend var1 var2
*
@MVGarchFore(MV=BEKK, steps=1) hh rv
*
do i=1,1
compute rv1(regend+i) = rv(regend+i)(1)
compute rv2(regend+i) = rv(regend+i)(2)
end do i
*
display regend
*
end do regend
*
print / rv1 rv2
Last edited by hasanov on Fri Nov 15, 2019 5:26 pm, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Out-of-sample mean forecasts from VARMA-MGARCH-M

Unread post by TomDoan »

What exactly is it that you're (in the end) trying to do? You've now changed your model twice to try to fit it into a simpler framework. Is there a reason that simulation methods won't do what you want?
Post Reply