I use R to estimate a seasonal ARIMA(8,0,0)(5,0,1)[7] model for the seasonal differences of logs of daily electricity prices:

daily.fit <- arima(sd_l_daily_adj$Price,
                   seasonal=list(order=c(5,0,1), period=7),
                   xreg = sd_l_daily_adj$Holiday,

Problem is that from all the packages I've tried, only the R's base arima function allows for the seasonal specification. Packages with GARCH estimation functions such as fGarch and rugarch only allow for ordinary ARMA(p, q) specification for the mean equation.

Any suggestions for any kind of software are welcome,


  • $\begingroup$ I have the same problem as you. Up to my knowledge, there is no package allowing to combine seasonal ARIMA process with GARCH effects. $\endgroup$
    – Ludo
    Commented Dec 19, 2014 at 14:00

4 Answers 4


You can use Matlab too, that, in my humble opinion, is simpler than R from a syntax point of view.

The model you need for is run by the Matlab function arima that can be used with seasonality option to do what you have to do.

Here you can find an example and a brief explanation of the model.

Type ctrl + F and search for:

"Specify a seasonal ARIMA model"

You will find how to do that explained in the example.

If you want to combine ARIMA with GARCH you can also do that, as described in the MATLAB help.

  • $\begingroup$ Does MATLAB also support seasonal ARIMA models in combination with GARCH innovations? $\endgroup$
    – Bob Jansen
    Commented Dec 19, 2014 at 15:26
  • $\begingroup$ Yes. You cand that. Look at it.mathworks.com/help/econ/… too. $\endgroup$
    – Quantopik
    Commented Dec 19, 2014 at 15:39
  • $\begingroup$ Neat, I added this to the answer as it seems useful for the asker. $\endgroup$
    – Bob Jansen
    Commented Dec 19, 2014 at 18:01
  • $\begingroup$ Well done! Maybe the answer is more complete. $\endgroup$
    – Quantopik
    Commented Dec 19, 2014 at 18:23
  • $\begingroup$ I added an answer with the Matlab code solving the issue. $\endgroup$
    – stofer
    Commented Dec 20, 2014 at 17:16

The mean equation specification for ARIMAX(8,0,0)(5,0,1)[7] (as in the R code above):
$$ (1 - \phi_1L^1 - \ldots - \phi_8L^8)(1-\Phi_1L^7 - \Phi_2L^{14} - \ldots - \Phi_5L^{35})y_t = \beta x_t + (1 + \Theta_1L^7)\varepsilon_t $$ where $x_t$ is the holiday dummy variable.

Equivalent ARIMA fit in Matlab (+ GARCH and forecasting):

% specify seasonal ARIMA(8,0,0)(5,0,1)[7]-GARCH(1,1) model
Md2 = arima('Constant', 0, 'D', 0, 'ARLags', [1,2,3,4,5,6,8],'SARLags', [7,14,21,28,35], 'SMALags', 7, 'Variance', garch(1,1))

% estimate (use Holiday as exogenous variable)
[fitT_garch,~,LogLT_garch] = estimate(Md2, Price(44:end), 'X', Holiday, 'Y0', Price(1:43))

% forecast 30 periods ahead
V = forecast(fitT_garch, 30, 'Y0', Price, 'X0', Holiday, 'XF', zeros(30, 1))

Matlab will need the first 43 observations as a presample response data.


Use the R package fgarch. Hope this is helpful to you.

  • 1
    $\begingroup$ The OP stated explicitly that fGarch and rugarch only allow for ordinary ARMA(p, q) specification for the mean equation, while he/she needs SARIMA instead. $\endgroup$ Commented Apr 3, 2017 at 13:10
  • $\begingroup$ @RichardHardy sorry I must have missed that. Did we find out if there's a way to do it in R instead of matlab? $\endgroup$
    – Kian
    Commented Apr 3, 2017 at 13:40
  • $\begingroup$ Kian, unfortunately I do not know a way to do it in R. It might be impossible as of now. $\endgroup$ Commented Apr 3, 2017 at 13:45

You can try:

daily.fit=ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(35, 7), include.mean = T, arfima=F),

from rugarch package.

  • $\begingroup$ This is a neat trick, but SARIMA when expressed as ARIMA puts certain coefficient restrictions on the parameters which cannot be incorporated the way you suggest. Thus unfortunately your approach is misleading as it does not incorporate those restrictions. $\endgroup$ Commented Apr 3, 2017 at 13:12

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.