I am analyzing FTSE 100 series, from 2007-01-01 to 2010-12-31 (university exam homework). I have to use the data 'til 2010-11-30 as sample, and the remaining (23) observations as in-sample forecast (to check the predictive performances of my model). The model fitted is an ARMA(3,2) with GARCH(1,1) disturbances on the differenced sample (actually, the model is an ARIMA one):

model.spec.final = ugarchspec(variance.model=list(model="fGARCH", submodel="GARCH", garchOrder=c(2,1)), mean.model = list(armaOrder=c(3,2), include.mean=F,arfima = FALSE), distribution.model="std", fixed.pars=list(alpha1=0))

model.fit.final = ugarchfit(spec=model.spec.final, data=d_FTSE, out.sample=23, solver.control=list(trace=0))

The forecast problem:

model.forecast = ugarchforecast(model.fit.final, n.ahead=23, n.roll=23, out.sample = 23)

gives me this output:

> model.forecast

*       GARCH Model Forecast         *
Model: fGARCH

Horizon: 23
Roll Steps: 23
Out of Sample: 23

0-roll forecast [T0=2010-11-30]:
      Series Sigma
T+1  -8.4391 82.56
T+2   7.2799 79.80
T+3   2.7655    NA
T+4  -9.5286    NA
T+5   5.8482    NA
T+6   3.9431    NA
T+7  -9.1431    NA
T+8   4.3687    NA
T+9   4.8931    NA
T+10 -8.5682    NA
T+11  2.9420    NA
T+12  5.6136    NA
T+13 -7.8394    NA
T+14  1.5987    NA
T+15  6.1117    NA
T+16 -6.9922    NA
T+17  0.3636    NA
T+18  6.3994    NA
T+19 -6.0613    NA
T+20 -0.7440    NA
T+21  6.4927    NA
T+22 -5.0795    NA
T+23 -1.7100    NA

the result is the same if I remove the specification on the out of sample obs (since it is specified also in the model fitting) and if I modify the n.roll parameter. why all those NA? how can i solve the problem?

trying with this code:

setfixed(spec) <- as.list(coef(model.fit.final))
model.forecast.2= ugarchforecast(spec, n.ahead=1, n.roll=23, data=d_FTSE[1:length(d_FTSE), ,drop=F],out.sample=23)

that comes from the answer to another question (Forecasting using rugarch package) it seems to work, but when I plot the results:

> plot(model.forecast.2,which="all")
Error in rect(fdates[i - 1], Zdn[i - 1], fdates[i], Zup[i], col = colors()[142],  : 
  cannot mix zero-length and non-zero-length coordinates

It is very frustrating.

basic stats:

> stat.desc(d_FTSE)
nbr.val       1044.0000000
nbr.null        33.0000000
nbr.na           0.0000000
min           -391.0996100
max            431.2998050
range          822.3994150
sum           -320.8999030
median           0.0000000
mean            -0.3073754
SE.mean          2.4136309
CI.mean.0.95     4.7361256
var           6081.9409506
std.dev         77.9867998
coef.var      -253.7184283

thank you in advance.

I've been able to succesfully use the function ugarchroll: does it a similar work as ugarchforecast? here is a part of the output:

> model.forecast3

*              GARCH Roll             *
No.Refits       : 2
Refit Horizon   : 22
No.Forecasts    : 23
GARCH Model     : fGARCH(2,1)

Distribution    : std 

Forecast Density:
                 Mu   Sigma Skew   Shape Shape(GIG) Realized
2010-12-01  -8.4391 82.5557    0 10.8735          0 114.2002
2010-12-02   4.3050 79.8021    0 10.8735          0 125.1001
2010-12-03   0.6100 68.5355    0 10.8735          0 -22.3003
2010-12-06 -12.0731 59.4221    0 10.8735          0  25.0000


  • $\begingroup$ can you provide a summary of your returns (mean , std..) $\endgroup$
    – Malick
    Commented Dec 17, 2015 at 17:20
  • $\begingroup$ Malick, i'm just working on the differenced series, actually. however I edited with some basic stats of that series $\endgroup$
    – simmy
    Commented Dec 17, 2015 at 17:32
  • $\begingroup$ you have some problems in your returns : cf min = -391 . compute log returns and apply your model on it. $\endgroup$
    – Malick
    Commented Dec 17, 2015 at 19:21
  • 2
    $\begingroup$ You can not use GARCH model if your data is not stationary. This is primary condition for applying any GARCH family model. Taking absolute difference of prices does not make series stationary. The reason is simple : the changes in the stock price depend the existing price level. The higher the prices the higher the deviation. So, it is better to take log difference. $\endgroup$
    – Neeraj
    Commented Dec 18, 2015 at 7:11
  • $\begingroup$ Just plot your graph of series difference. You would see larger spike in the data when Index value is high and lower spike when index value is low. $\endgroup$
    – Neeraj
    Commented Dec 18, 2015 at 7:12

1 Answer 1


Your summarize statistics are really strange ( median = 0.0000 , max 431 ...).

Compute the returns as follow : $log(p_{t+1}/p_{t}) *100 $ and run the Arma-Garch on it.

Edit :

As explanation : you need to use a stationnary time serie : see @Neeraj comment

  • $\begingroup$ It is because I'm working on the differenced raw data: d_FTSE_sample = diff(FTSE_sample), without computing the (log) return. Is really this the problem?? $\endgroup$
    – simmy
    Commented Dec 17, 2015 at 20:05
  • 1
    $\begingroup$ yes it is a problem because by applying diff() you are not computing returns. Alternatively you can use $ (Y_{t+1}-Y_{t} )/Y_{t}$ . $\endgroup$
    – Malick
    Commented Dec 17, 2015 at 20:16
  • 1
    $\begingroup$ Well, my goal was not computing returns, but just analyzing the time series: I didn't think that, to this purpose, it was "compulsory" to have a returns series, since my professor didn't compute the returns in any case. If you are telling me that it is necessary in order to have a better analysis (and to let the R functions work properly), I'll do it! EDIT: I mean, I was taking into account that the series is not stationary, and I applied an ARIMA model to the data in order to fit the non-stationarity. Is really that necessary to have returns? Because, if so, I've to do the whole work again. $\endgroup$
    – simmy
    Commented Dec 17, 2015 at 20:20
  • 4
    $\begingroup$ @Malick Garch models can be used on any series but they require data must be stationary. $\endgroup$
    – Neeraj
    Commented Dec 18, 2015 at 7:14
  • 2
    $\begingroup$ @Neeraj last comment: when you maximize your likelihood you may have numerical problems if your range is very small/large. Additionally The canonical constraints for the garch(1,1) is a special case, we don't always know the stationarity/positivity constraints, in such case we may use sufficient conditions based on limits for parameters. $\endgroup$
    – Malick
    Commented Dec 18, 2015 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.