12.4 Dealing with daylight saving and leap years

Another problem that arises in the case of data with high frequency is the change of local time due to daylight saving (DST). This happens in some countries two times a year: in Spring, the time is moved one hour forward (typically at 1 am to 2 am), while in the Autumn, it is moved back one hour. The implications of this are terrifying from a forecasting point of view because one day of the year has 23 hours, while the other has 25 hours. This leads to modelling difficulties because all the business processes are typically aligned with the local time. This means that if the conventional seasonal ETS model with \(m=24\) fits the data, it will only work correctly in half of the year. It will adapt to the new patterns after some time, but this implies that the smoothing parameter \(\gamma\) will be higher than needed.

There are two solutions to this problem:

  1. Shift the periodicity for one day, when the time changes from 24 to either 23, or 25, depending on the time of year;
  2. Introduce categorical variables for factors, which will mark specific hours of the day;

The former is more challenging to formalise mathematically and implement in software. Still, the latter relies on the already discussed mechanism of ETSX{D} with categorical variables (Section 10.5) and should be more straightforward. Given the connection between seasonality in the conventional ETS model and the ETSX{D} with categorical variables for seasonality, both approaches should be equivalent in terms of parameters estimation and final forecasts.

Similarly, the problem with leap years can be solved either using the shift from \(m=365\) to \(m=366\) on 29th February in the spirit of option (1) or using the categorical variables approach (2). There is a difference, however: the latter assumes the separate estimation of the parameter (so it has one more parameter to estimate), while the former would be suitable for the data with only one leap year, where the estimation of the seasonal index for 29th February might be difficult. However, given the discussion in Section 12.3, maybe we should not bother with \(m=365\) in the first place and rethink the problem, if possible. Having 52 / 53 weeks in a year has similar difficulties but at least does not involve the estimation of so many initial seasonal states.