Out-of-sample mean forecasts from VARMA-MGARCH-M
Posted: Tue Dec 11, 2018 7:30 pm
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.
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