Reputation: 31
I am having difficulties understanding how n.roll in dccforecast really does. I will give the code and graphs produced. Please help me understand and fix the issue.
First, let me introduce my data. I have two time series: 4171 daily observations (16 years). I am interested in using the first 6 years data for estimation of coefficients of dcc and forecast the correlation for
i) the remaining 10 years (2609 daily observations)
[t=0]----estimation period (1562)-----[t=1562]---forecasting period (2609)---[t=4171]
ii) the following 5 years (1305 daily observations).
[t=0]----estimation period (1562)-----[t=1562]---forecasting period (1305)---[t=2864]
At each point of t in my forecasting period, I want to use all the data available to time t and get a forecast for t+1.
For a forecast at time t+1, use all the data from 0 to t
For a forecast at time t+2, use all the data from 0 to t+1
For a forecast at time t+3, use all the data from 0 to t+2
For a forecast at time t+4, use all the data from 0 to t+3
and so on.
Here is my code for case i:
xspec = ugarchspec(mean.model = list(armaOrder = c(1, 0)), variance.model = list(garchOrder = c(1,1), model = 'gjrGARCH'), distribution.model = 'norm')
uspec = multispec(replicate(2, xspec)) # 2 is the number of variables
dccspec = dccspec(uspec = uspec, dccOrder = c(1, 1), model='aDCC', distribution = 'mvnorm')
dcc.fit.focast = dccfit(dccspec, data = tst, out.sample = 2609, forecast.length = 2609, fit.control = list(eval.se=T))
dcc.focast=dccforecast(dcc.fit.focast, n.ahead = 1, n.roll = 0)
plot(dcc.focast, which = 3, series=c(1,2))
I am defining "n.roll = 0" because as it is explained in "rmgarch" manual (When n.roll = 0, all forecasts are based on an unconditional n-ahead forecast routine based on the approximation method described in ENGLE and SHEPPARD (2001) paper), I am interested in using the approximation method used in Engle and Sheppard (2001).
However, when I change the n.roll from 0 to 1305;
dcc.focast=dccforecast(dcc.fit.focast, n.ahead = 1, n.roll = 1305)
plot(dcc.focast, which = 3, series=c(1,2))
then I get the following graph:
And when I increase n.roll, the ending point of forecast also increases. "rmgarch" manual describes n.roll for unconditional mean. But somehow it has to do with the number of forecasts produced.
Can someone please explain this and give recommendations on how to get the forecasts I need please?
Thanks in advance,
Martin
Upvotes: 1
Views: 840