ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.1 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://otexts.com/fpp3/ses.html |
| Last Crawled | 2026-04-14 19:27:00 (3 days ago) |
| First Indexed | 2019-06-20 15:57:00 (6 years ago) |
| HTTP Status Code | 200 |
| Meta Title | 8.1 Simple exponential smoothing | Forecasting: Principles and Practice (3rd ed) |
| Meta Description | 3rd edition |
| Meta Canonical | null |
| Boilerpipe Text | The simplest of the exponentially smoothing methods is naturally called
simple exponential smoothing
(SES)
16
. This method is suitable for forecasting data with no clear trend or seasonal pattern. For example, the data in Figure
8.1
do not display any clear trending behaviour or any seasonality. (There is a decline in the last few years, which might suggest a trend. We will consider whether a trended method would be better for this series later in this chapter.) We have already considered the naĂŻve and the average as possible methods for forecasting such data (Section
5.2
).
algeria_economy
<-
global_economy
|>
filter
(Country
==
"Algeria"
)
algeria_economy
|>
autoplot
(Exports)
+
labs
(
y =
"% of GDP"
,
title =
"Exports: Algeria"
)
Figure 8.1: Exports of goods and services from Algeria from 1960 to 2017.
Using the naĂŻve method, all forecasts for the future are equal to the last observed value of the series,
\[
\hat{y}_{T+h|T} = y_{T},
\]
for
\(h=1,2,\dots\)
. Hence, the naĂŻve method assumes that the most recent observation is the only important one, and all previous observations provide no information for the future. This can be thought of as a weighted average where all of the weight is given to the last observation.
Using the average method, all future forecasts are equal to a simple average of the observed data,
\[
\hat{y}_{T+h|T} = \frac1T \sum_{t=1}^T y_t,
\]
for
\(h=1,2,\dots\)
. Hence, the average method assumes that all observations are of equal importance, and gives them equal weights when generating forecasts.
We often want something between these two extremes. For example, it may be sensible to attach larger weights to more recent observations than to observations from the distant past. This is exactly the concept behind simple exponential smoothing. Forecasts are calculated using weighted averages, where the weights decrease exponentially as observations come from further in the past — the smallest weights are associated with the oldest observations:
\[\begin{equation}
\hat{y}_{T+1|T} = \alpha y_T + \alpha(1-\alpha) y_{T-1} + \alpha(1-\alpha)^2 y_{T-2}+ \cdots, \tag{8.1}
\end{equation}\]
where
\(0 \le \alpha \le 1\)
is the smoothing parameter. The one-step-ahead forecast for time
\(T+1\)
is a weighted average of all of the observations in the series
\(y_1,\dots,y_T\)
. The rate at which the weights decrease is controlled by the parameter
\(\alpha\)
.
The table below shows the weights attached to observations for four different values of
\(\alpha\)
when forecasting using simple exponential smoothing. Note that the sum of the weights even for a small value of
\(\alpha\)
will be approximately one for any reasonable sample size.
\(\alpha=0.2\)
\(\alpha=0.4\)
\(\alpha=0.6\)
\(\alpha=0.8\)
\(y_{T}\)
0.2000
0.4000
0.6000
0.8000
\(y_{T-1}\)
0.1600
0.2400
0.2400
0.1600
\(y_{T-2}\)
0.1280
0.1440
0.0960
0.0320
\(y_{T-3}\)
0.1024
0.0864
0.0384
0.0064
\(y_{T-4}\)
0.0819
0.0518
0.0154
0.0013
\(y_{T-5}\)
0.0655
0.0311
0.0061
0.0003
For any
\(\alpha\)
between 0 and 1, the weights attached to the observations decrease exponentially as we go back in time, hence the name “exponential smoothing”. If
\(\alpha\)
is small (i.e., close to 0), more weight is given to observations from the more distant past. If
\(\alpha\)
is large (i.e., close to 1), more weight is given to the more recent observations. For the extreme case where
\(\alpha=1\)
,
\(\hat{y}_{T+1|T}=y_T\)
, so the forecasts are equal to the naĂŻve forecasts.
We present two equivalent forms of simple exponential smoothing, each of which leads to the forecast Equation
(8.1)
.
Weighted average form
The forecast at time
\(T+1\)
is equal to a weighted average between the most recent observation
\(y_T\)
and the previous forecast
\(\hat{y}_{T|T-1}\)
:
\[
\hat{y}_{T+1|T} = \alpha y_T + (1-\alpha) \hat{y}_{T|T-1},
\]
where
\(0 \le \alpha \le 1\)
is the smoothing parameter.
Similarly, we can write the fitted values as
\[
\hat{y}_{t+1|t} = \alpha y_t + (1-\alpha) \hat{y}_{t|t-1},
\]
for
\(t=1,\dots,T\)
. (Recall that fitted values are simply one-step forecasts of the training data.)
The process has to start somewhere, so we let the first fitted value at time 1 be denoted by
\(\ell_0\)
(which we will have to estimate). Then
\[\begin{align*}
\hat{y}_{2|1} &= \alpha y_1 + (1-\alpha) \ell_0\\
\hat{y}_{3|2} &= \alpha y_2 + (1-\alpha) \hat{y}_{2|1}\\
\hat{y}_{4|3} &= \alpha y_3 + (1-\alpha) \hat{y}_{3|2}\\
\vdots\\
\hat{y}_{T|T-1} &= \alpha y_{T-1} + (1-\alpha) \hat{y}_{T-1|T-2}\\
\hat{y}_{T+1|T} &= \alpha y_T + (1-\alpha) \hat{y}_{T|T-1}.
\end{align*}\]
Substituting each equation into the following equation, we obtain
\[\begin{align*}
\hat{y}_{3|2} & = \alpha y_2 + (1-\alpha) \left[\alpha y_1 + (1-\alpha) \ell_0\right] \\
& = \alpha y_2 + \alpha(1-\alpha) y_1 + (1-\alpha)^2 \ell_0 \\
\hat{y}_{4|3} & = \alpha y_3 + (1-\alpha) [\alpha y_2 + \alpha(1-\alpha) y_1 + (1-\alpha)^2 \ell_0]\\
& = \alpha y_3 + \alpha(1-\alpha) y_2 + \alpha(1-\alpha)^2 y_1 + (1-\alpha)^3 \ell_0 \\
& ~~\vdots \\
\hat{y}_{T+1|T} & = \sum_{j=0}^{T-1} \alpha(1-\alpha)^j y_{T-j} + (1-\alpha)^T \ell_{0}.
\end{align*}\]
The last term becomes tiny for large
\(T\)
. So, the weighted average form leads to the same forecast Equation
(8.1)
.
Component form
An alternative representation is the component form. For simple exponential smoothing, the only component included is the level,
\(\ell_t\)
. (Other methods which are considered later in this chapter may also include a trend
\(b_t\)
and a seasonal component
\(s_t\)
.) Component form representations of exponential smoothing methods comprise a forecast equation and a smoothing equation for each of the components included in the method. The component form of simple exponential smoothing is given by:
\[\begin{align*}
\text{Forecast equation} && \hat{y}_{t+h|t} & = \ell_{t}\\
\text{Smoothing equation} && \ell_{t} & = \alpha y_{t} + (1 - \alpha)\ell_{t-1},
\end{align*}\]
where
\(\ell_{t}\)
is the level (or the smoothed value) of the series at time
\(t\)
. Setting
\(h=1\)
gives the fitted values, while setting
\(t=T\)
gives the true forecasts beyond the training data.
The forecast equation shows that the forecast value at time
\(t+1\)
is the estimated level at time
\(t\)
. The smoothing equation for the level (usually referred to as the level equation) gives the estimated level of the series at each period
\(t\)
.
If we replace
\(\ell_t\)
with
\(\hat{y}_{t+1|t}\)
and
\(\ell_{t-1}\)
with
\(\hat{y}_{t|t-1}\)
in the smoothing equation, we will recover the weighted average form of simple exponential smoothing.
The component form of simple exponential smoothing is not particularly useful on its own, but it will be the easiest form to use when we start adding other components.
Flat forecasts
Simple exponential smoothing has a “flat” forecast function:
\[
\hat{y}_{T+h|T} = \hat{y}_{T+1|T}=\ell_T, \qquad h=2,3,\dots.
\]
That is, all forecasts take the same value, equal to the last level component. Remember that these forecasts will only be suitable if the time series has no trend or seasonal component.
Optimisation
The application of every exponential smoothing method requires the smoothing parameters and the initial values to be chosen. In particular, for simple exponential smoothing, we need to select the values of
\(\alpha\)
and
\(\ell_0\)
. All forecasts can be computed from the data once we know those values. For the methods that follow there is usually more than one smoothing parameter and more than one initial component to be chosen.
In some cases, the smoothing parameters may be chosen in a subjective manner — the forecaster specifies the value of the smoothing parameters based on previous experience. However, a more reliable and objective way to obtain values for the unknown parameters is to estimate them from the observed data.
In Section
7.2
, we estimated the coefficients of a regression model by minimising the sum of the squared residuals (usually known as SSE or “sum of squared errors”). Similarly, the unknown parameters and the initial values for any exponential smoothing method can be estimated by minimising the SSE. The residuals are specified as
\(e_t=y_t - \hat{y}_{t|t-1}\)
for
\(t=1,\dots,T\)
. Hence, we find the values of the unknown parameters and the initial values that minimise
\[\begin{equation}
\text{SSE}=\sum_{t=1}^T(y_t - \hat{y}_{t|t-1})^2=\sum_{t=1}^Te_t^2. \tag{8.2}
\end{equation}\]
Unlike the regression case (where we have formulas which return the values of the regression coefficients that minimise the SSE), this involves a non-linear minimisation problem, and we need to use an optimisation tool to solve it.
Example: Algerian exports
In this example, simple exponential smoothing is applied to forecast exports of goods and services from Algeria.
# Estimate parameters
fit
<-
algeria_economy
|>
model
(
ETS
(Exports
~
error
(
"A"
)
+
trend
(
"N"
)
+
season
(
"N"
)))
fc
<-
fit
|>
forecast
(
h =
5
)
This gives parameter estimates
\(\hat\alpha=0.84\)
and
\(\hat\ell_0=39.5\)
, obtained by minimising SSE over periods
\(t=1,2,\dots,58\)
, subject to the restriction that
\(0\le\alpha\le1\)
.
In Table
8.1
we demonstrate the calculation using these parameters. The second last column shows the estimated level for times
\(t=0\)
to
\(t=58\)
; the last few rows of the last column show the forecasts for
\(h=1\)
to
\(5\)
-steps ahead.
Table 8.1:
Forecasting goods and services exports from Algeria using simple exponential smoothing.
Year
Time
Observation
Level
Forecast
\(t\)
\(y_t\)
\(\ell_t\)
\(\hat{y}_{t\vert t-1}\)
1959
0
39.54
1960
1
39.04
39.12
39.54
1961
2
46.24
45.10
39.12
1962
3
19.79
23.84
45.10
1963
4
24.68
24.55
23.84
1964
5
25.08
25.00
24.55
1965
6
22.60
22.99
25.00
1966
7
25.99
25.51
22.99
1967
8
23.43
23.77
25.51
â‹®
â‹®
â‹®
â‹®
2014
55
30.22
30.80
33.85
2015
56
23.17
24.39
30.80
2016
57
20.86
21.43
24.39
2017
58
22.64
22.44
21.43
\(h\)
\(\hat{y}_{T+h\vert T}\)
2018
1
22.44
2019
2
22.44
2020
3
22.44
2021
4
22.44
2022
5
22.44
The black line in Figure
8.2
shows the data, which has a changing level over time.
fc
|>
autoplot
(algeria_economy)
+
geom_line
(
aes
(
y =
.fitted),
col=
"#D55E00"
,
data =
augment
(fit))
+
labs
(
y=
"% of GDP"
,
title=
"Exports: Algeria"
)
+
guides
(
colour =
"none"
)
Figure 8.2: Simple exponential smoothing applied to exports from Algeria (1960–2017). The orange curve shows the one-step-ahead fitted values.
The forecasts for the period 2018–2022 are plotted in Figure
8.2
. Also plotted are one-step-ahead fitted values alongside the data over the period 1960–2017. The large value of
\(\alpha\)
in this example is reflected in the large adjustment that takes place in the estimated level
\(\ell_t\)
at each time. A smaller value of
\(\alpha\)
would lead to smaller changes over time, and so the series of fitted values would be smoother.
The prediction intervals shown here are calculated using the methods described in Section
8.7
. The prediction intervals show that there is considerable uncertainty in the future exports over the five-year forecast period. So interpreting the point forecasts without accounting for the large uncertainty can be very misleading.
In some books it is called “single exponential smoothing”.
↩︎ |
| Markdown | - [Forecasting: Principles and Practice](https://otexts.com/fpp3/)
- [Preface](https://otexts.com/fpp3/index.html)
- [**1** Getting started](https://otexts.com/fpp3/intro.html)
- [**1\.1** What can be forecast?](https://otexts.com/fpp3/what-can-be-forecast.html)
- [**1\.2** Forecasting, goals and planning](https://otexts.com/fpp3/planning.html)
- [**1\.3** Determining what to forecast](https://otexts.com/fpp3/determining-what-to-forecast.html)
- [**1\.4** Forecasting data and methods](https://otexts.com/fpp3/data-methods.html)
- [**1\.5** Some case studies](https://otexts.com/fpp3/case-studies.html)
- [**1\.6** The basic steps in a forecasting task](https://otexts.com/fpp3/basic-steps.html)
- [**1\.7** The statistical forecasting perspective](https://otexts.com/fpp3/perspective.html)
- [**1\.8** Exercises](https://otexts.com/fpp3/intro-exercises.html)
- [**1\.9** Further reading](https://otexts.com/fpp3/intro-reading.html)
- [**2** Time series graphics](https://otexts.com/fpp3/graphics.html)
- [**2\.1** `tsibble` objects](https://otexts.com/fpp3/tsibbles.html)
- [**2\.2** Time plots](https://otexts.com/fpp3/time-plots.html)
- [**2\.3** Time series patterns](https://otexts.com/fpp3/tspatterns.html)
- [**2\.4** Seasonal plots](https://otexts.com/fpp3/seasonal-plots.html)
- [**2\.5** Seasonal subseries plots](https://otexts.com/fpp3/subseries.html)
- [**2\.6** Scatterplots](https://otexts.com/fpp3/scatterplots.html)
- [**2\.7** Lag plots](https://otexts.com/fpp3/lag-plots.html)
- [**2\.8** Autocorrelation](https://otexts.com/fpp3/acf.html)
- [**2\.9** White noise](https://otexts.com/fpp3/wn.html)
- [**2\.10** Exercises](https://otexts.com/fpp3/graphics-exercises.html)
- [**2\.11** Further reading](https://otexts.com/fpp3/graphics-reading.html)
- [**3** Time series decomposition](https://otexts.com/fpp3/decomposition.html)
- [**3\.1** Transformations and adjustments](https://otexts.com/fpp3/transformations.html)
- [**3\.2** Time series components](https://otexts.com/fpp3/components.html)
- [**3\.3** Moving averages](https://otexts.com/fpp3/moving-averages.html)
- [**3\.4** Classical decomposition](https://otexts.com/fpp3/classical-decomposition.html)
- [**3\.5** Methods used by official statistics agencies](https://otexts.com/fpp3/methods-used-by-official-statistics-agencies.html)
- [**3\.6** STL decomposition](https://otexts.com/fpp3/stl.html)
- [**3\.7** Exercises](https://otexts.com/fpp3/decomposition-exercises.html)
- [**3\.8** Further reading](https://otexts.com/fpp3/decomposition-reading.html)
- [**4** Time series features](https://otexts.com/fpp3/features.html)
- [**4\.1** Some simple statistics](https://otexts.com/fpp3/some-simple-statistics.html)
- [**4\.2** ACF features](https://otexts.com/fpp3/acf-features.html)
- [**4\.3** STL Features](https://otexts.com/fpp3/stlfeatures.html)
- [**4\.4** Other features](https://otexts.com/fpp3/other-features.html)
- [**4\.5** Exploring Australian tourism data](https://otexts.com/fpp3/exploring-australian-tourism-data.html)
- [**4\.6** Exercises](https://otexts.com/fpp3/feast-exercises.html)
- [**4\.7** Further reading](https://otexts.com/fpp3/further-reading.html)
- [**5** The forecaster’s toolbox](https://otexts.com/fpp3/toolbox.html)
- [**5\.1** A tidy forecasting workflow](https://otexts.com/fpp3/a-tidy-forecasting-workflow.html)
- [**5\.2** Some simple forecasting methods](https://otexts.com/fpp3/simple-methods.html)
- [**5\.3** Fitted values and residuals](https://otexts.com/fpp3/residuals.html)
- [**5\.4** Residual diagnostics](https://otexts.com/fpp3/diagnostics.html)
- [**5\.5** Distributional forecasts and prediction intervals](https://otexts.com/fpp3/prediction-intervals.html)
- [**5\.6** Forecasting using transformations](https://otexts.com/fpp3/ftransformations.html)
- [**5\.7** Forecasting with decomposition](https://otexts.com/fpp3/forecasting-decomposition.html)
- [**5\.8** Evaluating point forecast accuracy](https://otexts.com/fpp3/accuracy.html)
- [**5\.9** Evaluating distributional forecast accuracy](https://otexts.com/fpp3/distaccuracy.html)
- [**5\.10** Time series cross-validation](https://otexts.com/fpp3/tscv.html)
- [**5\.11** Exercises](https://otexts.com/fpp3/toolbox-exercises.html)
- [**5\.12** Further reading](https://otexts.com/fpp3/basics-reading.html)
- [**6** Judgmental forecasts](https://otexts.com/fpp3/judgmental.html)
- [**6\.1** Beware of limitations](https://otexts.com/fpp3/judgmental-limitations.html)
- [**6\.2** Key principles](https://otexts.com/fpp3/judgmental-principles.html)
- [**6\.3** The Delphi method](https://otexts.com/fpp3/delphimethod.html)
- [**6\.4** Forecasting by analogy](https://otexts.com/fpp3/analogies.html)
- [**6\.5** Scenario forecasting](https://otexts.com/fpp3/scenarios.html)
- [**6\.6** New product forecasting](https://otexts.com/fpp3/new-products.html)
- [**6\.7** Judgmental adjustments](https://otexts.com/fpp3/judgmental-adjustments.html)
- [**6\.8** Further reading](https://otexts.com/fpp3/judgmental-reading.html)
- [**7** Time series regression models](https://otexts.com/fpp3/regression.html)
- [**7\.1** The linear model](https://otexts.com/fpp3/regression-intro.html)
- [**7\.2** Least squares estimation](https://otexts.com/fpp3/least-squares.html)
- [**7\.3** Evaluating the regression model](https://otexts.com/fpp3/regression-evaluation.html)
- [**7\.4** Some useful predictors](https://otexts.com/fpp3/useful-predictors.html)
- [**7\.5** Selecting predictors](https://otexts.com/fpp3/selecting-predictors.html)
- [**7\.6** Forecasting with regression](https://otexts.com/fpp3/forecasting-regression.html)
- [**7\.7** Nonlinear regression](https://otexts.com/fpp3/nonlinear-regression.html)
- [**7\.8** Correlation, causation and forecasting](https://otexts.com/fpp3/causality.html)
- [**7\.9** Matrix formulation](https://otexts.com/fpp3/regression-matrices.html)
- [**7\.10** Exercises](https://otexts.com/fpp3/regression-exercises.html)
- [**7\.11** Further reading](https://otexts.com/fpp3/regression-reading.html)
- [**8** Exponential smoothing](https://otexts.com/fpp3/expsmooth.html)
- [**8\.1** Simple exponential smoothing](https://otexts.com/fpp3/ses.html)
- [**8\.2** Methods with trend](https://otexts.com/fpp3/holt.html)
- [**8\.3** Methods with seasonality](https://otexts.com/fpp3/holt-winters.html)
- [**8\.4** A taxonomy of exponential smoothing methods](https://otexts.com/fpp3/taxonomy.html)
- [**8\.5** Innovations state space models for exponential smoothing](https://otexts.com/fpp3/ets.html)
- [**8\.6** Estimation and model selection](https://otexts.com/fpp3/ets-estimation.html)
- [**8\.7** Forecasting with ETS models](https://otexts.com/fpp3/ets-forecasting.html)
- [**8\.8** Exercises](https://otexts.com/fpp3/expsmooth-exercises.html)
- [**8\.9** Further reading](https://otexts.com/fpp3/expsmooth-reading.html)
- [**9** ARIMA models](https://otexts.com/fpp3/arima.html)
- [**9\.1** Stationarity and differencing](https://otexts.com/fpp3/stationarity.html)
- [**9\.2** Backshift notation](https://otexts.com/fpp3/backshift.html)
- [**9\.3** Autoregressive models](https://otexts.com/fpp3/AR.html)
- [**9\.4** Moving average models](https://otexts.com/fpp3/MA.html)
- [**9\.5** Non-seasonal ARIMA models](https://otexts.com/fpp3/non-seasonal-arima.html)
- [**9\.6** Estimation and order selection](https://otexts.com/fpp3/arima-estimation.html)
- [**9\.7** ARIMA modelling in `fable`](https://otexts.com/fpp3/arima-r.html)
- [**9\.8** Forecasting](https://otexts.com/fpp3/arima-forecasting.html)
- [**9\.9** Seasonal ARIMA models](https://otexts.com/fpp3/seasonal-arima.html)
- [**9\.10** ARIMA vs ETS](https://otexts.com/fpp3/arima-ets.html)
- [**9\.11** Exercises](https://otexts.com/fpp3/arima-exercises.html)
- [**9\.12** Further reading](https://otexts.com/fpp3/arima-reading.html)
- [**10** Dynamic regression models](https://otexts.com/fpp3/dynamic.html)
- [**10\.1** Estimation](https://otexts.com/fpp3/estimation.html)
- [**10\.2** Regression with ARIMA errors using `fable`](https://otexts.com/fpp3/regarima.html)
- [**10\.3** Forecasting](https://otexts.com/fpp3/forecasting.html)
- [**10\.4** Stochastic and deterministic trends](https://otexts.com/fpp3/stochastic-and-deterministic-trends.html)
- [**10\.5** Dynamic harmonic regression](https://otexts.com/fpp3/dhr.html)
- [**10\.6** Lagged predictors](https://otexts.com/fpp3/lagged-predictors.html)
- [**10\.7** Exercises](https://otexts.com/fpp3/dynamic-exercises.html)
- [**10\.8** Further reading](https://otexts.com/fpp3/dynamic-reading.html)
- [**11** Forecasting hierarchical and grouped time series](https://otexts.com/fpp3/hierarchical.html)
- [**11\.1** Hierarchical and grouped time series](https://otexts.com/fpp3/hts.html)
- [**11\.2** Single level approaches](https://otexts.com/fpp3/single-level.html)
- [**11\.3** Forecast reconciliation](https://otexts.com/fpp3/reconciliation.html)
- [**11\.4** Forecasting Australian domestic tourism](https://otexts.com/fpp3/tourism.html)
- [**11\.5** Reconciled distributional forecasts](https://otexts.com/fpp3/rec-prob.html)
- [**11\.6** Forecasting Australian prison population](https://otexts.com/fpp3/prison.html)
- [**11\.7** Exercises](https://otexts.com/fpp3/hierarchical-exercises.html)
- [**11\.8** Further reading](https://otexts.com/fpp3/hierarchical-reading.html)
- [**12** Advanced forecasting methods](https://otexts.com/fpp3/advanced.html)
- [**12\.1** Complex seasonality](https://otexts.com/fpp3/complexseasonality.html)
- [**12\.2** Prophet model](https://otexts.com/fpp3/prophet.html)
- [**12\.3** Vector autoregressions](https://otexts.com/fpp3/VAR.html)
- [**12\.4** Neural network models](https://otexts.com/fpp3/nnetar.html)
- [**12\.5** Bootstrapping and bagging](https://otexts.com/fpp3/bootstrap.html)
- [**12\.6** Exercises](https://otexts.com/fpp3/advanced-exercises.html)
- [**12\.7** Further reading](https://otexts.com/fpp3/advanced-reading.html)
- [**13** Some practical forecasting issues](https://otexts.com/fpp3/practical.html)
- [**13\.1** Weekly, daily and sub-daily data](https://otexts.com/fpp3/weekly.html)
- [**13\.2** Time series of counts](https://otexts.com/fpp3/counts.html)
- [**13\.3** Ensuring forecasts stay within limits](https://otexts.com/fpp3/limits.html)
- [**13\.4** Forecast combinations](https://otexts.com/fpp3/combinations.html)
- [**13\.5** Prediction intervals for aggregates](https://otexts.com/fpp3/aggregates.html)
- [**13\.6** Backcasting](https://otexts.com/fpp3/backcasting.html)
- [**13\.7** Very long and very short time series](https://otexts.com/fpp3/long-short-ts.html)
- [**13\.8** Forecasting on training and test sets](https://otexts.com/fpp3/training-test.html)
- [**13\.9** Dealing with outliers and missing values](https://otexts.com/fpp3/missing-outliers.html)
- [**13\.10** Further reading](https://otexts.com/fpp3/further-reading-1.html)
- [Appendix: Using R](https://otexts.com/fpp3/appendix-using-r.html)
- [Appendix: For instructors](https://otexts.com/fpp3/appendix-for-instructors.html)
- [Appendix: Reviews](https://otexts.com/fpp3/appendix-reviews.html)
- [Translations](https://otexts.com/fpp3/translations.html)
- [About the authors](https://otexts.com/fpp3/about-the-authors.html)
- [Buy a print version](https://otexts.com/fpp3/buy-a-print-version.html)
- [Help and feedback](https://otexts.com/fpp3/help-and-feedback.html)
- [Changelog](https://otexts.com/fpp3/changelog.html)
- [Bibliography](https://otexts.com/fpp3/bibliography-1.html)
- [Published by OTexts™ with bookdown](https://otexts.com/)
# [Forecasting: Principles and Practice (3rd ed)](https://otexts.com/fpp3/)
## 8\.1 Simple exponential smoothing
The simplest of the exponentially smoothing methods is naturally called **simple exponential smoothing** (SES)[16](https://otexts.com/fpp3/ses.html#fn16). This method is suitable for forecasting data with no clear trend or seasonal pattern. For example, the data in Figure [8\.1](https://otexts.com/fpp3/ses.html#fig:7-oil) do not display any clear trending behaviour or any seasonality. (There is a decline in the last few years, which might suggest a trend. We will consider whether a trended method would be better for this series later in this chapter.) We have already considered the naĂŻve and the average as possible methods for forecasting such data (Section [5\.2](https://otexts.com/fpp3/simple-methods.html#simple-methods)).
```
algeria_economy <- global_economy |>
filter(Country == "Algeria")
algeria_economy |>
autoplot(Exports) +
labs(y = "% of GDP", title = "Exports: Algeria")
```

Figure 8.1: Exports of goods and services from Algeria from 1960 to 2017.
Using the naĂŻve method, all forecasts for the future are equal to the last observed value of the series, \\\[ \\hat{y}\_{T+h\|T} = y\_{T}, \\\] for \\(h=1,2,\\dots\\). Hence, the naĂŻve method assumes that the most recent observation is the only important one, and all previous observations provide no information for the future. This can be thought of as a weighted average where all of the weight is given to the last observation.
Using the average method, all future forecasts are equal to a simple average of the observed data, \\\[ \\hat{y}\_{T+h\|T} = \\frac1T \\sum\_{t=1}^T y\_t, \\\] for \\(h=1,2,\\dots\\). Hence, the average method assumes that all observations are of equal importance, and gives them equal weights when generating forecasts.
We often want something between these two extremes. For example, it may be sensible to attach larger weights to more recent observations than to observations from the distant past. This is exactly the concept behind simple exponential smoothing. Forecasts are calculated using weighted averages, where the weights decrease exponentially as observations come from further in the past — the smallest weights are associated with the oldest observations: \\\[\\begin{equation} \\hat{y}\_{T+1\|T} = \\alpha y\_T + \\alpha(1-\\alpha) y\_{T-1} + \\alpha(1-\\alpha)^2 y\_{T-2}+ \\cdots, \\tag{8.1} \\end{equation}\\\] where \\(0 \\le \\alpha \\le 1\\) is the smoothing parameter. The one-step-ahead forecast for time \\(T+1\\) is a weighted average of all of the observations in the series \\(y\_1,\\dots,y\_T\\). The rate at which the weights decrease is controlled by the parameter \\(\\alpha\\).
The table below shows the weights attached to observations for four different values of \\(\\alpha\\) when forecasting using simple exponential smoothing. Note that the sum of the weights even for a small value of \\(\\alpha\\) will be approximately one for any reasonable sample size.
| | \\(\\alpha=0.2\\) | \\(\\alpha=0.4\\) | \\(\\alpha=0.6\\) | \\(\\alpha=0.8\\) |
|---|---|---|---|---|
| \\(y\_{T}\\) | 0\.2000 | 0\.4000 | 0\.6000 | 0\.8000 |
| \\(y\_{T-1}\\) | 0\.1600 | 0\.2400 | 0\.2400 | 0\.1600 |
| \\(y\_{T-2}\\) | 0\.1280 | 0\.1440 | 0\.0960 | 0\.0320 |
| \\(y\_{T-3}\\) | 0\.1024 | 0\.0864 | 0\.0384 | 0\.0064 |
| \\(y\_{T-4}\\) | 0\.0819 | 0\.0518 | 0\.0154 | 0\.0013 |
| \\(y\_{T-5}\\) | 0\.0655 | 0\.0311 | 0\.0061 | 0\.0003 |
For any \\(\\alpha\\) between 0 and 1, the weights attached to the observations decrease exponentially as we go back in time, hence the name “exponential smoothing”. If \\(\\alpha\\) is small (i.e., close to 0), more weight is given to observations from the more distant past. If \\(\\alpha\\) is large (i.e., close to 1), more weight is given to the more recent observations. For the extreme case where \\(\\alpha=1\\), \\(\\hat{y}\_{T+1\|T}=y\_T\\), so the forecasts are equal to the naïve forecasts.
We present two equivalent forms of simple exponential smoothing, each of which leads to the forecast Equation [(8.1)](https://otexts.com/fpp3/ses.html#eq:7-ses).
### Weighted average form
The forecast at time \\(T+1\\) is equal to a weighted average between the most recent observation \\(y\_T\\) and the previous forecast \\(\\hat{y}\_{T\|T-1}\\): \\\[ \\hat{y}\_{T+1\|T} = \\alpha y\_T + (1-\\alpha) \\hat{y}\_{T\|T-1}, \\\] where \\(0 \\le \\alpha \\le 1\\) is the smoothing parameter. Similarly, we can write the fitted values as \\\[ \\hat{y}\_{t+1\|t} = \\alpha y\_t + (1-\\alpha) \\hat{y}\_{t\|t-1}, \\\] for \\(t=1,\\dots,T\\). (Recall that fitted values are simply one-step forecasts of the training data.)
The process has to start somewhere, so we let the first fitted value at time 1 be denoted by \\(\\ell\_0\\) (which we will have to estimate). Then \\\[\\begin{align\*} \\hat{y}\_{2\|1} &= \\alpha y\_1 + (1-\\alpha) \\ell\_0\\\\ \\hat{y}\_{3\|2} &= \\alpha y\_2 + (1-\\alpha) \\hat{y}\_{2\|1}\\\\ \\hat{y}\_{4\|3} &= \\alpha y\_3 + (1-\\alpha) \\hat{y}\_{3\|2}\\\\ \\vdots\\\\ \\hat{y}\_{T\|T-1} &= \\alpha y\_{T-1} + (1-\\alpha) \\hat{y}\_{T-1\|T-2}\\\\ \\hat{y}\_{T+1\|T} &= \\alpha y\_T + (1-\\alpha) \\hat{y}\_{T\|T-1}. \\end{align\*}\\\] Substituting each equation into the following equation, we obtain \\\[\\begin{align\*} \\hat{y}\_{3\|2} & = \\alpha y\_2 + (1-\\alpha) \\left\[\\alpha y\_1 + (1-\\alpha) \\ell\_0\\right\] \\\\ & = \\alpha y\_2 + \\alpha(1-\\alpha) y\_1 + (1-\\alpha)^2 \\ell\_0 \\\\ \\hat{y}\_{4\|3} & = \\alpha y\_3 + (1-\\alpha) \[\\alpha y\_2 + \\alpha(1-\\alpha) y\_1 + (1-\\alpha)^2 \\ell\_0\]\\\\ & = \\alpha y\_3 + \\alpha(1-\\alpha) y\_2 + \\alpha(1-\\alpha)^2 y\_1 + (1-\\alpha)^3 \\ell\_0 \\\\ & \~~\\vdots \\\\ \\hat{y}\_{T+1\|T} & = \\sum\_{j=0}^{T-1} \\alpha(1-\\alpha)^j y\_{T-j} + (1-\\alpha)^T \\ell\_{0}. \\end{align\*}\\\] The last term becomes tiny for large \\(T\\). So, the weighted average form leads to the same forecast Equation [(8.1)](https://otexts.com/fpp3/ses.html#eq:7-ses).
### Component form
An alternative representation is the component form. For simple exponential smoothing, the only component included is the level, \\(\\ell\_t\\). (Other methods which are considered later in this chapter may also include a trend \\(b\_t\\) and a seasonal component \\(s\_t\\).) Component form representations of exponential smoothing methods comprise a forecast equation and a smoothing equation for each of the components included in the method. The component form of simple exponential smoothing is given by: \\\[\\begin{align\*} \\text{Forecast equation} && \\hat{y}\_{t+h\|t} & = \\ell\_{t}\\\\ \\text{Smoothing equation} && \\ell\_{t} & = \\alpha y\_{t} + (1 - \\alpha)\\ell\_{t-1}, \\end{align\*}\\\] where \\(\\ell\_{t}\\) is the level (or the smoothed value) of the series at time \\(t\\). Setting \\(h=1\\) gives the fitted values, while setting \\(t=T\\) gives the true forecasts beyond the training data.
The forecast equation shows that the forecast value at time \\(t+1\\) is the estimated level at time \\(t\\). The smoothing equation for the level (usually referred to as the level equation) gives the estimated level of the series at each period \\(t\\).
If we replace \\(\\ell\_t\\) with \\(\\hat{y}\_{t+1\|t}\\) and \\(\\ell\_{t-1}\\) with \\(\\hat{y}\_{t\|t-1}\\) in the smoothing equation, we will recover the weighted average form of simple exponential smoothing.
The component form of simple exponential smoothing is not particularly useful on its own, but it will be the easiest form to use when we start adding other components.
### Flat forecasts
Simple exponential smoothing has a “flat” forecast function: \\\[ \\hat{y}\_{T+h\|T} = \\hat{y}\_{T+1\|T}=\\ell\_T, \\qquad h=2,3,\\dots. \\\] That is, all forecasts take the same value, equal to the last level component. Remember that these forecasts will only be suitable if the time series has no trend or seasonal component.
### Optimisation
The application of every exponential smoothing method requires the smoothing parameters and the initial values to be chosen. In particular, for simple exponential smoothing, we need to select the values of \\(\\alpha\\) and \\(\\ell\_0\\). All forecasts can be computed from the data once we know those values. For the methods that follow there is usually more than one smoothing parameter and more than one initial component to be chosen.
In some cases, the smoothing parameters may be chosen in a subjective manner — the forecaster specifies the value of the smoothing parameters based on previous experience. However, a more reliable and objective way to obtain values for the unknown parameters is to estimate them from the observed data.
In Section [7\.2](https://otexts.com/fpp3/least-squares.html#least-squares), we estimated the coefficients of a regression model by minimising the sum of the squared residuals (usually known as SSE or “sum of squared errors”). Similarly, the unknown parameters and the initial values for any exponential smoothing method can be estimated by minimising the SSE. The residuals are specified as \\(e\_t=y\_t - \\hat{y}\_{t\|t-1}\\) for \\(t=1,\\dots,T\\). Hence, we find the values of the unknown parameters and the initial values that minimise \\\[\\begin{equation} \\text{SSE}=\\sum\_{t=1}^T(y\_t - \\hat{y}\_{t\|t-1})^2=\\sum\_{t=1}^Te\_t^2. \\tag{8.2} \\end{equation}\\\]
Unlike the regression case (where we have formulas which return the values of the regression coefficients that minimise the SSE), this involves a non-linear minimisation problem, and we need to use an optimisation tool to solve it.
### Example: Algerian exports
In this example, simple exponential smoothing is applied to forecast exports of goods and services from Algeria.
```
# Estimate parameters
fit <- algeria_economy |>
model(ETS(Exports ~ error("A") + trend("N") + season("N")))
fc <- fit |>
forecast(h = 5)
```
This gives parameter estimates \\(\\hat\\alpha=0.84\\) and \\(\\hat\\ell\_0=39.5\\), obtained by minimising SSE over periods \\(t=1,2,\\dots,58\\), subject to the restriction that \\(0\\le\\alpha\\le1\\).
In Table [8\.1](https://otexts.com/fpp3/ses.html#tab:export-ses) we demonstrate the calculation using these parameters. The second last column shows the estimated level for times \\(t=0\\) to \\(t=58\\); the last few rows of the last column show the forecasts for \\(h=1\\) to \\(5\\)\-steps ahead.
| Year | Time | Observation | Level | Forecast |
|---|---|---|---|---|
| | \\(t\\) | \\(y\_t\\) | \\(\\ell\_t\\) | \\(\\hat{y}\_{t\\vert t-1}\\) |
| 1959 | 0 | | 39\.54 | |
| 1960 | 1 | 39\.04 | 39\.12 | 39\.54 |
| 1961 | 2 | 46\.24 | 45\.10 | 39\.12 |
| 1962 | 3 | 19\.79 | 23\.84 | 45\.10 |
| 1963 | 4 | 24\.68 | 24\.55 | 23\.84 |
| 1964 | 5 | 25\.08 | 25\.00 | 24\.55 |
| 1965 | 6 | 22\.60 | 22\.99 | 25\.00 |
| 1966 | 7 | 25\.99 | 25\.51 | 22\.99 |
| 1967 | 8 | 23\.43 | 23\.77 | 25\.51 |
| | â‹® | â‹® | â‹® | â‹® |
| 2014 | 55 | 30\.22 | 30\.80 | 33\.85 |
| 2015 | 56 | 23\.17 | 24\.39 | 30\.80 |
| 2016 | 57 | 20\.86 | 21\.43 | 24\.39 |
| 2017 | 58 | 22\.64 | 22\.44 | 21\.43 |
| | \\(h\\) | | | \\(\\hat{y}\_{T+h\\vert T}\\) |
| 2018 | 1 | | | 22\.44 |
| 2019 | 2 | | | 22\.44 |
| 2020 | 3 | | | 22\.44 |
| 2021 | 4 | | | 22\.44 |
| 2022 | 5 | | | 22\.44 |
The black line in Figure [8\.2](https://otexts.com/fpp3/ses.html#fig:ses) shows the data, which has a changing level over time.
```
fc |>
autoplot(algeria_economy) +
geom_line(aes(y = .fitted), col="#D55E00",
data = augment(fit)) +
labs(y="% of GDP", title="Exports: Algeria") +
guides(colour = "none")
```

Figure 8.2: Simple exponential smoothing applied to exports from Algeria (1960–2017). The orange curve shows the one-step-ahead fitted values.
The forecasts for the period 2018–2022 are plotted in Figure [8\.2](https://otexts.com/fpp3/ses.html#fig:ses). Also plotted are one-step-ahead fitted values alongside the data over the period 1960–2017. The large value of \\(\\alpha\\) in this example is reflected in the large adjustment that takes place in the estimated level \\(\\ell\_t\\) at each time. A smaller value of \\(\\alpha\\) would lead to smaller changes over time, and so the series of fitted values would be smoother.
The prediction intervals shown here are calculated using the methods described in Section [8\.7](https://otexts.com/fpp3/ets-forecasting.html#ets-forecasting). The prediction intervals show that there is considerable uncertainty in the future exports over the five-year forecast period. So interpreting the point forecasts without accounting for the large uncertainty can be very misleading.
***
1. In some books it is called “single exponential smoothing”.[↩︎](https://otexts.com/fpp3/ses.html#fnref16) |
| Readable Markdown | The simplest of the exponentially smoothing methods is naturally called **simple exponential smoothing** (SES)[16](https://otexts.com/fpp3/ses.html#fn16). This method is suitable for forecasting data with no clear trend or seasonal pattern. For example, the data in Figure [8\.1](https://otexts.com/fpp3/ses.html#fig:7-oil) do not display any clear trending behaviour or any seasonality. (There is a decline in the last few years, which might suggest a trend. We will consider whether a trended method would be better for this series later in this chapter.) We have already considered the naĂŻve and the average as possible methods for forecasting such data (Section [5\.2](https://otexts.com/fpp3/simple-methods.html#simple-methods)).
```
algeria_economy <- global_economy |>
filter(Country == "Algeria")
algeria_economy |>
autoplot(Exports) +
labs(y = "% of GDP", title = "Exports: Algeria")
```

Figure 8.1: Exports of goods and services from Algeria from 1960 to 2017.
Using the naĂŻve method, all forecasts for the future are equal to the last observed value of the series, \\\[ \\hat{y}\_{T+h\|T} = y\_{T}, \\\] for \\(h=1,2,\\dots\\). Hence, the naĂŻve method assumes that the most recent observation is the only important one, and all previous observations provide no information for the future. This can be thought of as a weighted average where all of the weight is given to the last observation.
Using the average method, all future forecasts are equal to a simple average of the observed data, \\\[ \\hat{y}\_{T+h\|T} = \\frac1T \\sum\_{t=1}^T y\_t, \\\] for \\(h=1,2,\\dots\\). Hence, the average method assumes that all observations are of equal importance, and gives them equal weights when generating forecasts.
We often want something between these two extremes. For example, it may be sensible to attach larger weights to more recent observations than to observations from the distant past. This is exactly the concept behind simple exponential smoothing. Forecasts are calculated using weighted averages, where the weights decrease exponentially as observations come from further in the past — the smallest weights are associated with the oldest observations: \\\[\\begin{equation} \\hat{y}\_{T+1\|T} = \\alpha y\_T + \\alpha(1-\\alpha) y\_{T-1} + \\alpha(1-\\alpha)^2 y\_{T-2}+ \\cdots, \\tag{8.1} \\end{equation}\\\] where \\(0 \\le \\alpha \\le 1\\) is the smoothing parameter. The one-step-ahead forecast for time \\(T+1\\) is a weighted average of all of the observations in the series \\(y\_1,\\dots,y\_T\\). The rate at which the weights decrease is controlled by the parameter \\(\\alpha\\).
The table below shows the weights attached to observations for four different values of \\(\\alpha\\) when forecasting using simple exponential smoothing. Note that the sum of the weights even for a small value of \\(\\alpha\\) will be approximately one for any reasonable sample size.
| | \\(\\alpha=0.2\\) | \\(\\alpha=0.4\\) | \\(\\alpha=0.6\\) | \\(\\alpha=0.8\\) |
|---|---|---|---|---|
| \\(y\_{T}\\) | 0\.2000 | 0\.4000 | 0\.6000 | 0\.8000 |
| \\(y\_{T-1}\\) | 0\.1600 | 0\.2400 | 0\.2400 | 0\.1600 |
| \\(y\_{T-2}\\) | 0\.1280 | 0\.1440 | 0\.0960 | 0\.0320 |
| \\(y\_{T-3}\\) | 0\.1024 | 0\.0864 | 0\.0384 | 0\.0064 |
| \\(y\_{T-4}\\) | 0\.0819 | 0\.0518 | 0\.0154 | 0\.0013 |
| \\(y\_{T-5}\\) | 0\.0655 | 0\.0311 | 0\.0061 | 0\.0003 |
For any \\(\\alpha\\) between 0 and 1, the weights attached to the observations decrease exponentially as we go back in time, hence the name “exponential smoothing”. If \\(\\alpha\\) is small (i.e., close to 0), more weight is given to observations from the more distant past. If \\(\\alpha\\) is large (i.e., close to 1), more weight is given to the more recent observations. For the extreme case where \\(\\alpha=1\\), \\(\\hat{y}\_{T+1\|T}=y\_T\\), so the forecasts are equal to the naïve forecasts.
We present two equivalent forms of simple exponential smoothing, each of which leads to the forecast Equation [(8.1)](https://otexts.com/fpp3/ses.html#eq:7-ses).
### Weighted average form
The forecast at time \\(T+1\\) is equal to a weighted average between the most recent observation \\(y\_T\\) and the previous forecast \\(\\hat{y}\_{T\|T-1}\\): \\\[ \\hat{y}\_{T+1\|T} = \\alpha y\_T + (1-\\alpha) \\hat{y}\_{T\|T-1}, \\\] where \\(0 \\le \\alpha \\le 1\\) is the smoothing parameter. Similarly, we can write the fitted values as \\\[ \\hat{y}\_{t+1\|t} = \\alpha y\_t + (1-\\alpha) \\hat{y}\_{t\|t-1}, \\\] for \\(t=1,\\dots,T\\). (Recall that fitted values are simply one-step forecasts of the training data.)
The process has to start somewhere, so we let the first fitted value at time 1 be denoted by \\(\\ell\_0\\) (which we will have to estimate). Then \\\[\\begin{align\*} \\hat{y}\_{2\|1} &= \\alpha y\_1 + (1-\\alpha) \\ell\_0\\\\ \\hat{y}\_{3\|2} &= \\alpha y\_2 + (1-\\alpha) \\hat{y}\_{2\|1}\\\\ \\hat{y}\_{4\|3} &= \\alpha y\_3 + (1-\\alpha) \\hat{y}\_{3\|2}\\\\ \\vdots\\\\ \\hat{y}\_{T\|T-1} &= \\alpha y\_{T-1} + (1-\\alpha) \\hat{y}\_{T-1\|T-2}\\\\ \\hat{y}\_{T+1\|T} &= \\alpha y\_T + (1-\\alpha) \\hat{y}\_{T\|T-1}. \\end{align\*}\\\] Substituting each equation into the following equation, we obtain \\\[\\begin{align\*} \\hat{y}\_{3\|2} & = \\alpha y\_2 + (1-\\alpha) \\left\[\\alpha y\_1 + (1-\\alpha) \\ell\_0\\right\] \\\\ & = \\alpha y\_2 + \\alpha(1-\\alpha) y\_1 + (1-\\alpha)^2 \\ell\_0 \\\\ \\hat{y}\_{4\|3} & = \\alpha y\_3 + (1-\\alpha) \[\\alpha y\_2 + \\alpha(1-\\alpha) y\_1 + (1-\\alpha)^2 \\ell\_0\]\\\\ & = \\alpha y\_3 + \\alpha(1-\\alpha) y\_2 + \\alpha(1-\\alpha)^2 y\_1 + (1-\\alpha)^3 \\ell\_0 \\\\ & \~~\\vdots \\\\ \\hat{y}\_{T+1\|T} & = \\sum\_{j=0}^{T-1} \\alpha(1-\\alpha)^j y\_{T-j} + (1-\\alpha)^T \\ell\_{0}. \\end{align\*}\\\] The last term becomes tiny for large \\(T\\). So, the weighted average form leads to the same forecast Equation [(8.1)](https://otexts.com/fpp3/ses.html#eq:7-ses).
### Component form
An alternative representation is the component form. For simple exponential smoothing, the only component included is the level, \\(\\ell\_t\\). (Other methods which are considered later in this chapter may also include a trend \\(b\_t\\) and a seasonal component \\(s\_t\\).) Component form representations of exponential smoothing methods comprise a forecast equation and a smoothing equation for each of the components included in the method. The component form of simple exponential smoothing is given by: \\\[\\begin{align\*} \\text{Forecast equation} && \\hat{y}\_{t+h\|t} & = \\ell\_{t}\\\\ \\text{Smoothing equation} && \\ell\_{t} & = \\alpha y\_{t} + (1 - \\alpha)\\ell\_{t-1}, \\end{align\*}\\\] where \\(\\ell\_{t}\\) is the level (or the smoothed value) of the series at time \\(t\\). Setting \\(h=1\\) gives the fitted values, while setting \\(t=T\\) gives the true forecasts beyond the training data.
The forecast equation shows that the forecast value at time \\(t+1\\) is the estimated level at time \\(t\\). The smoothing equation for the level (usually referred to as the level equation) gives the estimated level of the series at each period \\(t\\).
If we replace \\(\\ell\_t\\) with \\(\\hat{y}\_{t+1\|t}\\) and \\(\\ell\_{t-1}\\) with \\(\\hat{y}\_{t\|t-1}\\) in the smoothing equation, we will recover the weighted average form of simple exponential smoothing.
The component form of simple exponential smoothing is not particularly useful on its own, but it will be the easiest form to use when we start adding other components.
### Flat forecasts
Simple exponential smoothing has a “flat” forecast function: \\\[ \\hat{y}\_{T+h\|T} = \\hat{y}\_{T+1\|T}=\\ell\_T, \\qquad h=2,3,\\dots. \\\] That is, all forecasts take the same value, equal to the last level component. Remember that these forecasts will only be suitable if the time series has no trend or seasonal component.
### Optimisation
The application of every exponential smoothing method requires the smoothing parameters and the initial values to be chosen. In particular, for simple exponential smoothing, we need to select the values of \\(\\alpha\\) and \\(\\ell\_0\\). All forecasts can be computed from the data once we know those values. For the methods that follow there is usually more than one smoothing parameter and more than one initial component to be chosen.
In some cases, the smoothing parameters may be chosen in a subjective manner — the forecaster specifies the value of the smoothing parameters based on previous experience. However, a more reliable and objective way to obtain values for the unknown parameters is to estimate them from the observed data.
In Section [7\.2](https://otexts.com/fpp3/least-squares.html#least-squares), we estimated the coefficients of a regression model by minimising the sum of the squared residuals (usually known as SSE or “sum of squared errors”). Similarly, the unknown parameters and the initial values for any exponential smoothing method can be estimated by minimising the SSE. The residuals are specified as \\(e\_t=y\_t - \\hat{y}\_{t\|t-1}\\) for \\(t=1,\\dots,T\\). Hence, we find the values of the unknown parameters and the initial values that minimise \\\[\\begin{equation} \\text{SSE}=\\sum\_{t=1}^T(y\_t - \\hat{y}\_{t\|t-1})^2=\\sum\_{t=1}^Te\_t^2. \\tag{8.2} \\end{equation}\\\]
Unlike the regression case (where we have formulas which return the values of the regression coefficients that minimise the SSE), this involves a non-linear minimisation problem, and we need to use an optimisation tool to solve it.
### Example: Algerian exports
In this example, simple exponential smoothing is applied to forecast exports of goods and services from Algeria.
```
# Estimate parameters
fit <- algeria_economy |>
model(ETS(Exports ~ error("A") + trend("N") + season("N")))
fc <- fit |>
forecast(h = 5)
```
This gives parameter estimates \\(\\hat\\alpha=0.84\\) and \\(\\hat\\ell\_0=39.5\\), obtained by minimising SSE over periods \\(t=1,2,\\dots,58\\), subject to the restriction that \\(0\\le\\alpha\\le1\\).
In Table [8\.1](https://otexts.com/fpp3/ses.html#tab:export-ses) we demonstrate the calculation using these parameters. The second last column shows the estimated level for times \\(t=0\\) to \\(t=58\\); the last few rows of the last column show the forecasts for \\(h=1\\) to \\(5\\)\-steps ahead.
| Year | Time | Observation | Level | Forecast |
|---|---|---|---|---|
| | \\(t\\) | \\(y\_t\\) | \\(\\ell\_t\\) | \\(\\hat{y}\_{t\\vert t-1}\\) |
| 1959 | 0 | | 39\.54 | |
| 1960 | 1 | 39\.04 | 39\.12 | 39\.54 |
| 1961 | 2 | 46\.24 | 45\.10 | 39\.12 |
| 1962 | 3 | 19\.79 | 23\.84 | 45\.10 |
| 1963 | 4 | 24\.68 | 24\.55 | 23\.84 |
| 1964 | 5 | 25\.08 | 25\.00 | 24\.55 |
| 1965 | 6 | 22\.60 | 22\.99 | 25\.00 |
| 1966 | 7 | 25\.99 | 25\.51 | 22\.99 |
| 1967 | 8 | 23\.43 | 23\.77 | 25\.51 |
| | â‹® | â‹® | â‹® | â‹® |
| 2014 | 55 | 30\.22 | 30\.80 | 33\.85 |
| 2015 | 56 | 23\.17 | 24\.39 | 30\.80 |
| 2016 | 57 | 20\.86 | 21\.43 | 24\.39 |
| 2017 | 58 | 22\.64 | 22\.44 | 21\.43 |
| | \\(h\\) | | | \\(\\hat{y}\_{T+h\\vert T}\\) |
| 2018 | 1 | | | 22\.44 |
| 2019 | 2 | | | 22\.44 |
| 2020 | 3 | | | 22\.44 |
| 2021 | 4 | | | 22\.44 |
| 2022 | 5 | | | 22\.44 |
The black line in Figure [8\.2](https://otexts.com/fpp3/ses.html#fig:ses) shows the data, which has a changing level over time.
```
fc |>
autoplot(algeria_economy) +
geom_line(aes(y = .fitted), col="#D55E00",
data = augment(fit)) +
labs(y="% of GDP", title="Exports: Algeria") +
guides(colour = "none")
```

Figure 8.2: Simple exponential smoothing applied to exports from Algeria (1960–2017). The orange curve shows the one-step-ahead fitted values.
The forecasts for the period 2018–2022 are plotted in Figure [8\.2](https://otexts.com/fpp3/ses.html#fig:ses). Also plotted are one-step-ahead fitted values alongside the data over the period 1960–2017. The large value of \\(\\alpha\\) in this example is reflected in the large adjustment that takes place in the estimated level \\(\\ell\_t\\) at each time. A smaller value of \\(\\alpha\\) would lead to smaller changes over time, and so the series of fitted values would be smoother.
The prediction intervals shown here are calculated using the methods described in Section [8\.7](https://otexts.com/fpp3/ets-forecasting.html#ets-forecasting). The prediction intervals show that there is considerable uncertainty in the future exports over the five-year forecast period. So interpreting the point forecasts without accounting for the large uncertainty can be very misleading.
***
1. In some books it is called “single exponential smoothing”.[↩︎](https://otexts.com/fpp3/ses.html#fnref16) |
| Shard | 36 (laksa) |
| Root Hash | 13347583336389170836 |
| Unparsed URL | com,otexts!/fpp3/ses.html s443 |