0
$\begingroup$

I have daily data for 3 years and I want to use a SARIMA model. However, I'm a bit confused about what argument I should pass into the seasonal_order regarding the seasonal period.

I use python and the corresponding SARIMA model is statsmodels.tsa.statespace.sarimax.SARIMAX. I have the impression it should be 365, but I am no entirely sure, since I get a memory error.

$\endgroup$
0
$\begingroup$

The seasonal order that needs to be passed to a SARIMA model needs to be identified beforehand. To identify that, you need to identify a) Seasonality S; b) the seasonal differencing order D which typically is either 0 or 1; c) the seasonal autoregressive order P; and d) the seasonal moving average order Q. One way to obtain preliminary values for those, is to visually scan the autocorrelation function (ACF) together with the partial autocorrelation function (PACF) of your time series (if the time series is stationary) or ACF and PACF of your appropriately differenced time series, if your time series is non stationary.

a) To identify seasonality S, take a look at the ACF. If you notice a spike at multiples of a certain integer S, i.e. at lag S, 2*S, 3*S, etc. that is a tell-tale sign that the seasonality is S. E.g., if you have hourly data, S may be 24 (hours); if you have weekly data S may be 7 (days); if you have quarterly data S may be 4 (quarters); etc. When identifying S, it is easier to look at the ACF with a pre-conceived expectation of what the seasonality might be.

b) To identify D look at your ACF and observe if the spikes at seasonal lags (i.e. at lag S, 2*S, 3*S, etc.) tend to be persistent or whether they die out quickly after a few (typically one or two) lags. If they are persistent D is tentatively identified to be 1; otherwise (if they die out "quickly") 0.

c) To tentatively identify a value to be passed for P, put ACF and PACF next to each other and visually scan their behavior only at the seasonal lags. If PACF has $P^*$ spikes at seasonal lags after which it cuts off abruptly, while ACF shows a more or less gradually decaying pattern of spikes at seasonal lags, that is an indication that $P=P^*$

d) To tentatively identify a value for Q, again consider ACF and PACF and focus only at the seasonal lags. If ACF has $Q^*$ spikes at seasonal lags after which it cuts off abruptly, while PACF shows a more or less gradually decaying pattern of spikes at seasonal lags, that is an indication that $Q=Q^*$

To get a better grasp at this, read Bisgaard, S. R., & Kulahci, M. (2008). Quality quandaries: Forecasting with seasonal time series models. Quality Engineering, 20(2), 250-260.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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