ESSOUSSI Sara
ESSOUSSI Sara

Reputation: 21

SARIMA with daily data - determine saisonal period

i have 30 years for daily temperature data and i have a problem with determinate the saisonal period , i cant do it with lag = 365 day python is implemented

so can i use 90 day ( 1 season) . I don't know does it make sense or not

enter image description here

Upvotes: 2

Views: 2024

Answers (1)

Arne Decker
Arne Decker

Reputation: 923

A seasonality of 365 does not really make sense for three reasons:

  1. Such a long seasonality often leads to long runtimes or as in your case the process breaks.
  2. When you use exactly 365 days you are ignoring leap years, so you model distorts over longer periods (30 years for examples results a distortion of 7 days already)
  3. The most important reason is the correlation itself. A seasonality of 365 would mean that the weather today is somehow correlated to the weather last year, which is not really the case. Of course, both days will be somewhat close to another due to meteorological seasons, but I would not rely on this correlation. Imagine last year was relatively cold and this year is relatively warm. Do you use the last days immediately before today or would you base your forecast on some day a year ago? That is not very reliable.

Your forecast has to be based on the last immediate lags before the actual day – not the days of last year. However, to improve your model you have to factor in the meteorological seasons (spring, summer, fall, winter). There are multiple ways to do so. One for example would be to use SARIMAX and pass the model an exogenous feature, e.g. the monthly average temperature or a moving average over the last years. That way you can teach the model that days in summer are generally hotter than in winter, and for the precise prediction you use the days immediately before. See here for the documentation of statsmodels SARIMAX:

https://www.statsmodels.org/dev/generated/statsmodels.tsa.statespace.sarimax.SARIMAX.html

There are plenty of examples on how to create these models with exogenous variables on the web.

Upvotes: 1

Related Questions