# Is there any way to easily estimate and forecast seasonal ARIMA-GARCH model in any software?

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, order=c(8,0,0), seasonal=list(order=c(5,0,1), period=7), xreg = sd_l_daily_adj$Holiday,
include.mean=FALSE)


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,

Thanks

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

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.

• Does MATLAB also support seasonal ARIMA models in combination with GARCH innovations? – Bob Jansen Dec 19 '14 at 15:26
• Yes. You cand that. Look at it.mathworks.com/help/econ/… too. – Quantopik Dec 19 '14 at 15:39
• Neat, I added this to the answer as it seems useful for the asker. – Bob Jansen Dec 19 '14 at 18:01
• Well done! Maybe the answer is more complete. – Quantopik Dec 19 '14 at 18:23
• I added an answer with the Matlab code solving the issue. – stofer Dec 20 '14 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))

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.

• 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. – Richard Hardy Apr 3 '17 at 13:10
• @RichardHardy sorry I must have missed that. Did we find out if there's a way to do it in R instead of matlab? – Kian Apr 3 '17 at 13:40
• Kian, unfortunately I do not know a way to do it in R. It might be impossible as of now. – Richard Hardy Apr 3 '17 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),
fixed.pars=list(ar9=0,ar10=0,...,ar13=0,ar15=0,...,ar20=0,ar22=0,...,ar27=0,ar29=0,...,ar34=0,ma1=0,...,ma6=0))


from rugarch package.

• 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. – Richard Hardy Apr 3 '17 at 13:12