# Stability of Multiple Seasonal Holt-Winters Models Applied to Hourly Electricity Demand in Spain
## 3 Materials and Methods  
The time series used in this study is the hourly electricity demand in Spain, within the years from 2008 to 2017. It was provided by REE through its website www.ree.es. This time series shows clearly several seasonalities: the intraday which is repeated every 24 h, and the intra-weekly, which is repeated every 168 h. A third seasonality has also been included, which relates the data of the series with the seasonal periods of the year. Various strategies were proposed to deal with the 3 rd seasonality, since its length depends largely on the concept to be covered. [PERSON] uses the calendar year, so that the years comprise 52 weeks, although to adjust the process in leap years, it uses 53 weeks [10]. Most authors have chosen to use the solar year, which includes 365.25 days, and seasonally adjusted [42]. In our case, it was considered to be 365.25 days, or 8766 h.  
This series was used in former works [43; 44] and especially using the nHWT methods [13; 14; 16]. This experience showed the authors that many factors could have an impact on the model parameters, as well as its forecast accuracy, key point for the proper exploitation of the nHWT models. The influence of the initial values was analysed in [14]. However, there is still a lack of analysis regarding the meaning of the parameter space and their relation with forecasts. The method described in this paper analyses the smoothing parameters of the nHWT forecasting procedure when working with the hourly electricity demand in Spain. It performs an analysis of the parameter values, by checking their behaviour depending on the method chosen from Table 1. That implies to analyse the stability against some influential factors derived from our experience such as seasons, years, calendar, and inner variability. To match the previously mentioned issues, raw data must be used, avoiding any smoothing or modification of the series. Double seasonal nHWT used a dataset size of 8-10 weeks, it was chosen as this seems to be long enough for this purpose. Alternatively, an analysis of the dataset size is also performed. Triple seasonal nHWT used a dataset of three years. Randomness in the series selection must be assured. To observe the maximum possible variability, randomly selected data sets were used, but always complying with the following premises:  
* At least 3 sets of data for each season of the year. * At least there must be sets in different years, to check the repeatability of the process in similar situations in a matter of period of the year, including holidays nearby. * The data has not been filtered or the special days were altered. As a result, for the seasonal double analysis, 250 random samples of 10 weeks were extracted, of which, the first 8 weeks were used for adjustment, while the other two weeks were used for validation. Because the climatic effect present in the series must be assessed, the samples were selected so that they belong to different climatic periods and several years. Figure 1 shows the working scheme for this analysis. The parameters optimization was done using a minimization algorithm, Nelder-Mead's simplex [45], where the minimization function was the Root Mean of the Squared Error (RMSE), described in Equation (9). \[RMSE=\sqrt{\frac{1}{h}\sum_{t=1}^{h}(\widehat{X}_{t}-X_{t})^{2}} \tag{9}\]  
where \(h\) is the number of samples to be predicted. Once the model was fit and the parameters obtained, 24-hours ahead forecast during two weeks were performed, and compared against the real data. The forecast accuracy was measured by using the Mean Average Percentage Error (MAPE), described in Equation (10). \[MAPE(\%)=100\frac{1}{h}\sum_{t=1}^{h}\frac{\big{|}\widehat{X}_{t}-X_{t}\big{|} }{|X_{t}|} \tag{10}\]  
The use of RMSE for the model optimisation is preferred [46]. On the contrary, the most commonly used indicator to compare forecast accuracy is MAPE [47], in special when comparing demand forecasts.