0% found this document useful (0 votes)
13 views5 pages

Time Series Forecasting Using Holt-Winters Exponential

The document discusses using Holt-Winters exponential smoothing models to forecast economic time series data with trends and seasonality. It applies additive and multiplicative Holt-Winters models to monthly e-commerce retail sales data from Portugal from 2000-2018 and compares their forecasting accuracy.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views5 pages

Time Series Forecasting Using Holt-Winters Exponential

The document discusses using Holt-Winters exponential smoothing models to forecast economic time series data with trends and seasonality. It applies additive and multiplicative Holt-Winters models to monthly e-commerce retail sales data from Portugal from 2000-2018 and compares their forecasting accuracy.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Time series forecasting using Holt-Winters

exponential smoothing: An application to


economic data
Cite as: AIP Conference Proceedings 2186, 090003 (2019); https://doi.org/10.1063/1.5137999
Published Online: 10 December 2019

Susana Lima, A. Manuela Gonçalves , and Marco Costa

AIP Conference Proceedings 2186, 090003 (2019); https://doi.org/10.1063/1.5137999 2186, 090003

© 2019 Author(s).
Time Series Forecasting using Holt-Winters Exponential
Smoothing: an Application to Economic Data
Susana Lima1,b) , A. Manuela Gonçalves2,a) and Marco Costa3,c)
1
Department of Mathematics, University of Minho, Portugal.
2
Department of Mathematics and Center of Mathematics, University of Minho, Portugal.
3
Águeda School of Technology and Management and Center for Research and Development in Mathematics and
Applications, University of Aveiro, Portugal.
a)
Corresponding author: [email protected]
b)
[email protected]
c)
[email protected]

Abstract. This study deals with forecasting economic time series that have strong trends and seasonal patterns. How to best
model and forecast these patterns has been a long-standing issue of time series analysis. In this work, we propose a Holt-Winters
Exponential Smoothing approach to time series forecasting in order to increase the chance of capturing different patterns in the data
and thus improve forecasting performance. Therefore, the main propose of this study is to compare the accuracy of Holt-Winters
models (additive and multiplicative) for forecasting and to bring new insights about the methods used via this approach. These
methods are chosen because of their ability to model trend and seasonal fluctuations present in economic data. The models are
fitted to time series of e-commerce retail sales in Portugal. Finally, a comparison is made and discussed.

INTRODUCTION

Time series forecasting is an important area of forecasting in which past observations of the same variable are collected
and analyzed to develop a model describing the underlying relationship. The model is then used to extrapolate the
time series into the future. Forecasting methods are a key tool in decision-making processes in many areas, such as
economics, management and finance, or environment. Much effort has been devoted over the past several decades to
the development and improvement of time series forecasting models. The main propose of this work is to compare the
accuracy of the additive and the multiplicative Holt-Winters Exponential Smoothing models for forecasting economic
time series; both models can increase the chance of capture different patterns in the data and improve forecasting
performance.
According to the GfK study ”European Retail 2016” that analyzes 33 countries in Europe, the retail segment
in private consumption, in Portugal, in the year 2015, accounted for 33.4%. The study of the economic variables
associated with this area is essential and quite useful both to characterize the recent past and to anticipate trends.
Obtaining empirical results from several real data sales forecasting is one of the most important issues behind all
strategic and planning decisions in any retail business. The objective of the turnover index is to show the development
of the market for goods and services. Turnover comprises the totals invoiced by the observation unit during the
reference period, and this corresponds to market sales of goods or services supplied to third parties. Turnover also
includes all other charges (transport, packaging, etc.) passed on to the customer, even if these charges are listed
separately in the invoice. Turnover excludes VAT and other similar deductible taxes directly linked to turnover, as
well as all duties and taxes on the goods or services invoiced by the unit. The data used in this study, available on the
Eurostat platform, corresponds to monthly indexes of turnover (total, TOVT) in the context of retail sales via internet
(e-commerce) observed between January 2000 and February 2018 (Fig. 1). Note that this index should be compared
with the base year, in this case 2015, which correspond to the index 100.

Proceedings of the International Conference of Computational Methods in Sciences and Engineering 2019 (ICCMSE-2019)
AIP Conf. Proc. 2186, 090003-1–090003-4; https://doi.org/10.1063/1.5137999
Published by AIP Publishing. 978-0-7354-1933-9/$30.00

090003-1
FIGURE 1. E-commerce retail sales time series of Portugal.

METHODS

The Holt-Winters (HW) method is an extension of the Holt method, and is applied whenever the data behaviour
is trendy and is seasonal [2]. Relatively to the seasonal type, it can be additive or multiplicative, depending on the
oscillatory movement along the time period. In both versions, forecasts will depend on the following three components
of a seasonal time series: its level, its trend and its seasonal coefficient. In addition, both are implemented in the
HoltWinters() function of the forecast package in R [3]. The additive version ought to be considered whenever the
seasonal pattern of a series has a constant amplitude over time. In the additive case, the series can be written by
Yt = T t + S t + t , where T t represents the trend (the sum of the level and slope of the series at time t), S t is the seasonal
component, and t are error terms with mean zero and constant variance. In the multiplicative case, the series can be
represented by Yt = T t × S t + t . The recursive equations of the multiplicative and additive HW methods, for level,
trend, seasonal factors and forecast, with h+s = [(h − 1) mod s] + 1, are presented in Table 1, where Yt is the observed
data at time t, s is the length of seasonality (number of months in a season), h is the number of forecast ahead, and
θ = (α, β, γ)T is the vector of smoothing parameters [4].

TABLE 1. Holt-Winters method recursive equations.


Additive HW method Multiplicative HW method
Level: lt = α(Yt − st−s ) + (1 − α)(lt−1 + bt−1 ), 0 ≤ α ≤ 1 Level: lt = α sYt−st + (1 − α)(lt−1 + bt−1 ), 0 ≤ α ≤ 1
Trend: bt = β(lt − lt−1 ) + (1 − β)bt−1 , 0 ≤ β ≤ 1 Trend: bt = β(lt − lt−1 ) + (1 − β)bt−1 , 0 ≤ β ≤ 1
Seasonal: st = γ(Yt − lt ) + (1 − γ)st−s , 0 ≤ γ ≤ 1 Seasonal: st = γ Yltt + (1 − γ)st−s , 0 ≤ γ ≤ 1
Forecast: Ŷt+h = lt + hbt + st−s+h+s , h = 1, 2, . . . Forecast: Ŷt+h = (lt + hbt )st−s+h+s , h = 1, 2, . . .

To initialize these methods, the R environment uses the decompose function to perform a decomposition of the
series in its components – trend and seasonality– through a moving average process, and thus determine the initial
values for l s , b s and si , i = 1, . . . , s (lˆs e b̂ s are determined by means of the trend of a simple linear regression by using
the initial observations).
Computing prediction intervals is an important part of the forecasting process, intended to indicate the likely
uncertainty in point forecasts. The forecast intervals are usually based on the Mean Square Error (MSE) that denotes
the variance of the h-step-ahead forecast errors. Empirical forecast intervals (if a normality assumption is verified) at
h-step-ahead and the time series presents a seasonal component with period s are given by the following expression
   
Ŷt+h − z1−α/2 MSE(h) , Ŷt+h + z1−α/2 MSE(h) , (1)

n
where z is the appropriate quantile for the standard Normal distribution, and MSE(h) = n−h−s+1
1
t=h+s (Yt − Ŷt|t−h )
2

denotes the variance of the h-step-ahead errors. In order to compare the predictive accuracy of both methods, we
considered five forecasting performance criteria: Mean Square Error (MSE), Root Mean Square Error (RMSE), Mean
Absolute Percentage Error (MAPE), Mean Absolute Scaled Error (MASE), and Theil’s U-statistics.

090003-2
RESULTS AND DISCUSSION
The methods considered in this study are applied to two sets: training data (in-sample data) and testing data (out-
of-sample data) in order to testify the accuracy of the proposed forecasting models. The selected training data from
January 2000 to December 2016 (first 204 months) was used in order to fit the models to the data, and the test period
from January 20017 to February 2018 (last 14 months) was used to forecast. The smoothing constants estimates and
the values used for the initialization of both multiplicative and additive methods can be found in Table 2 and Table 3,
respectively.
TABLE 2. Initialization of level, trend, seasonal and exponential smoothing parameters of the multi-
plicative HW model for the e-commerce retail sales time series of Portugal.
Multiplicative model MSE= 420.3237
α̂ = 0.1823 β̂ = 0.0589 γ̂ = 0.6781 lˆ1 = 203.2920 b̂1 = 2.2286
ŝ1 = 1.1915 ŝ2 = 1.0632 ŝ3 = 0.9320 ŝ4 = 1.0118 ŝ5 = 1.1139
ŝ6 = 0.9367 ŝ7 = 0.8972 ŝ8 = 0.7744 ŝ9 = 0.8494 ŝ10 = 1.0460
ŝ11 = 1.1568 ŝ12 = 1.0271

TABLE 3. Initialization of level, trend, seasonal and exponential smoothing parameters of the additive
HW model for the e-commerce retail sales time series of Portugal.
Additive model MSE = 452.3238
α̂ = 0.1765 β̂ = 0.0648 γ̂ = 0.6588 lˆ1 = 203.2920 b̂1 = 2.2286
ŝ1 = 42.2531 ŝ2 =13.6990 ŝ3 = −15.7135 ŝ4 = 2.2865 ŝ5 = 25.6698
ŝ6 = −14.9552 ŝ7 = −21.7302 ŝ8 = −47.7510 ŝ9 = −32.2427 ŝ10 = 9.2656
ŝ11 = 33.6698 ŝ12 = 5.5490

Table 4 shows the results of the accuracy measures calculated for training and testing periods for the two methods
applied to the time series under study. As can be seen in the Table 4, according to the five measures of evaluation
calculated, the multiplicative model is in fact the one with the best predictive (in the training period from January
2000 to December 2016) and forecast (in the testing period from January 2017 to February 2018) performances of
the e-commerce retail sales time series of Portugal. Usually when a series displays a seasonal pattern characterized
by an amplitude that varies with the series level, the multiplicative version is a better choice [4], as with the modeling
process of this study.
TABLE 4. Forecasting performance evaluation of HW models of e-commerce retail sales time series
of Portugal
Model MSE RMSE MAPE MASE U-Theil
Additive 452.3238 21.2679 9.1284 0.7888 0.6311 training period
Multiplicative 420.3237 20.5018 8.4697 0.7405 0.5866 training period
Additive 298.9753 17.2909 17.9859 1.1051 1.0825 testing period
Multiplicative 265.2426 16.2863 16.7628 1.0299 1.0215 testing period

The mean square errors calculated from the 14-step-ahead required for the construction of the forecast intervals
are summarized in Table 5. In Fig. 2 are represented the original values of the e-commerce time series, the estimates
in the modeling period (training period), the forecasts in the forecasting period (testing period) and the forecast in-
tervals for a confidence level of 95%, applying the additive and the multiplicative model. The models’ validation
was assessed by means of the residuals analysis. The independency assumption was assessed by estimating the au-
tocorrelation and the partial autocorrelation functions of residuals, by calculating the Durbin-Watson’ statistics, and
performing the Ljung-Box test and the assumption that the residuals are identically normally distributed were also
verified (performing the Kolmogorov-Smirnov test).
It should be noted that the order of magnitude of these errors is big. In fact, this results in prediction intervals
with large amplitudes, in terms of the coverage rate: the forecast intervals for the Holt-Winters model include the

090003-3
TABLE 5. Mean Square Error at h-step-ahead for the multiplicative HW model (the best performance) of e-
commerce retail sales time series of Portugal.
h 1 month 2 months 3 months 4 months 5 months 6 months 7 months
MSEh 420.3237 458.9360 470.3099 500.2939 515.3850 540.0650 616.2973
h 8 months 9 months 10 months 11 months 12 months 13 months 14 months
MSEh 681.5444 716.6324 749.2076 776.7510 819.6080 1111.9670 1141.6730

FIGURE 2. Additive HW (left) and multiplicative HW (right) estimates, forecasts, and forecast confidence intervals (95 %) for
e-commerce retail sales time series of Portugal.

14 observations of the test time series, hence the coverage rate of 100% (see Fig. 2). However, the normality of
prediction errors is, in this case, rejected at a significance level of 5%, for all steps h, with h = 1, 2, . . . , 14. Therefore,
it is concluded that the prediction intervals constructed according to the expression (1) are not the most suitable for
this type of data, i.e. the HW method is conservative in the construction of forecast intervals. In order to circumvent
this failure, as future work an alternative is to study resampling methods for the construction of forecast intervals (an
approach already considered in [1]).

ACKNOWLEDGMENTS
This research was partially financed by Portuguese funds by the Center for Research and Development in Mathematics
and Applications (CIDMA) and the Portuguese Foundation for Science and Technology (”Fundação para a Ciência
e a Tecnologia” - FCT), within project UID/MAT/04106/2019. This research was partially financed by Portuguese
funds through Portuguese Foundation for Science and Technology (”Fundação para a Ciência e a Tecnologia” - FCT),
within project UID/MAT/00013/2013.

REFERENCES
[1] M. Costa and A. M. Goncalves, “Forecasting time series combining holt-winters and bootstrap approaches,”
in Proceedings of the International Conference on Numerical Analysis and Applied Mathematics 2014
(ICNAAM-2014), AIP Conference Proceedings 1648 (T. E. Simos, G. Psihoyios and Ch. Tsitouras, Rhodes,
Greece, 2015), pp. 110004–1–110004–4.
[2] P. R. Winters, Management Science 6, 324–342 (1960).
[3] RCoreTeam, R: a language and environment for statistical computing, https://www.R-project.org/ (
2018).
[4] R. Hyndman and R. Snyder, Forecasting with Exponential Smoothing. The State Space Approach (Springer,
2008).

090003-4

You might also like