Exponential Smoothing Discussion

Author

Teddy Kelly

Explaining the ETS Parameters

The smoothing parameters in an ETS model control how much the estimates of each of the state components react to new observations. The values of the parameters are essentially “weights” that are placed on the most recent observation, and these weights decay exponentially as the observations become more distant. The values of the smoothing parameters are typically bounded between 0 and 1, with values near 1 indicating that much more weight will be placed on the more recent observations when producing forecasts compared to distant observations. ETS models generate forecasts for new observations by decomposing the time series into three possible state equations: the level, the trend, and the seasonality, each with their own smoothing parameters.

  • level

    • \(0\leq\alpha\leq1\) is the smoothing parameter for the level component and controls how much the level updates with each new observation. Values close to 1 allow for the level of forecasts to react quickly to each new observation.
  • trend

    • \(0\leq\beta\leq1\) is the smoothing parameter for the trend component and controls the rate at which the slope changes with each new observation. Values closer to 1 mean allow the slope to change rapidly with each new observation when generating forecasts.

    • \(0.80\leq\phi\leq0.98\) is the damping parameter that can be specified to ensure that forecasts for trended time series level off at some constant. It’s usually bounded between 0.80 and 0.98 where lower values of \(\phi\) dampen the trend more quickly.

  • season

    • \(0\leq\gamma\leq1\) is the smoothing parameter for the season component and controls how quickly the forecasts produced by an ETS model can adjust to changes in seasonal patterns.

Picking 2 Time Series

The two time series that I have chosen are the Consumer Price Index for All Urban Consumers: All Items in U.S. City Average (CPIAUCSL) and the US Unemployment Rate (UNRATE) monthly time series from Fred.

They each have significantly different patterns and trends over time so, I think it will be interesting to compare ETS models that the fpp3 package specifies for each time series.

I have loaded the two Fred monthly time series below:

rm(list = ls())
library(fpp3)
library(fredr)
library(kableExtra)
library(patchwork)

# Loading in my Fred API key
fredr_set_key(Sys.getenv('fred_api_key'))

# Loading in CPI time series and converting it into a tsibble
cpi <- fredr(series_id = "CPIAUCSL",
             observation_start = as.Date("2000-01-01"),
             observation_end = as.Date("2025-09-01")) |>
  mutate(month = yearmonth(date)) |>
  select(month, value) |>
  as_tsibble(index = month)

# Loading the unemployment rate time series and converting it to a tsibble
unrate <- fredr(series_id = "UNRATE",
             observation_start = as.Date("2000-01-01"),
             observation_end = as.Date("2025-09-01")) |>
  mutate(month = yearmonth(date)) |>
  select(month, value) |>
  as_tsibble(index = month)

I have generated the initial plots using the code below and have first displayed the US CPI time series.

# cpi graph
cpi_graph <- cpi |>
  autoplot(value) +
  labs(title = 'Monthly US CPI for All Urban Consumers',
       subtitle = 'Jan 2000 - Sep 2025',
       y = 'Time (Months)',
       x = 'CPI')

unrate_graph <- unrate |>
  autoplot(value) +
  labs(title = 'Monthly US Unemployment Rate',
       subtitle = 'Jan 2000 - Sep 2025',
       y = 'Time (Months)',
       x = 'Unemployment Rate')

cpi_graph

CPI Expected Parameter Values

  • Level (\(\ell_t\))

    • It appears that the level of the CPI at any observation depends very much on the level of the CPI from the previous observation. For example, if you select any observation, the level of the CPI at that observation is very similar to the CPI levels at very recent observations compared to more distant observations. Therefore, I would expect the ETS model to specify a smoothing parameter \(\alpha\) for the level near 1 for producing forecasts.
  • Trend (\(b_t\))

    • There is a clear upward trend in the CPI time series, suggesting that an ideal ETS model for this time series would specify a trend component. It appears that if you look at any observation, the slope at the observation seems to depend on the slope at more recent observations, suggesting that the smoothing parameter for the trend, \(\beta\), will be very close to 1.

    • Since there is typically steady inflation in the US, I would expect the CPI to gradually keep increasing, however the rate at which CPI increases will likely level off. In fact, towards the end of the series, it appears that the growth in the CPI is beginning to slow slightly. Therefore, I would expect there to be a damping parameter in the ETS model, however I think the value will be closer to 1, reflecting that the trend will persist longer over time.

  • Season (\(s_t\))

    • There does not appear to be much seasonality in the CPI time series which would suggest that an ETS model used to generate forecasts on this time series would not specify a seasonal component. Hence, the smoothing parameter for seasonality, \(\gamma\), will likely be set to zero.
    • Also, since there is not seasonality, then the error should be additive since the variation in the data is remaining relatively constant over time
    • Therefore, if I had to choose an appropriate ETS model to produce forecasts for this CPI time series, I would specify an ETS(A,Ad,N) which is known as an additive damped trend method.
unrate_graph

Unemployment Rate Expected Parameter Values

  • Level (\(\ell_t\))

    • The level of the unemployment rate at any particular point in time appears to depend on the level of the unemployment rate from recent observations even though there is no clear trend over time. For example, if the unemployment rate is high this month, then it will likely still be high for the next month. The one exception was the massive spike in the unemployment rate at the beginning of Covid.

    • This suggests that for forecasting future unemployment rate levels, we would expect that the ETS model would place much more weight on the level from recent observations. Hence the level smoothing parameter, \(\alpha\) should be near 1.

  • Trend (\(b_t\))

    • There is no clear upward or downward trend in the unemployment rate over time, suggesting that an ETS model will likely not specify a trend component when generating forecasts. So the trend smoothing parameter, \(\beta\) will likely be zero.
    • There appear to be some irregular cycles in the unemployment rate, and each of them have different heights which suggest that the variance is perhaps changing over time. This would then mean that the error may be multiplicative.
  • Season (\(s_t\))

    • There is maybe some seasonality in the unemployment rate over time, and traditionally, there is usually an increase in the unemployment in the US during the holiday season in the winter months when less work occurs.

    • However, there is not much seasonality present, so I would expect the ETS model to specify a seasonal smoothing parameter, \(\gamma\), with a value likely less than 0.50.

    • It’s unclear whether the variance in the seasonal component is constant over time since there is not much seasonality, so the ETS specification could result in either multiplicative or additive seasonality.

    • Therefore, I would expect that the computer specifies either an ETS(M,N,M) or an ETS(M,N,A) model.

With our initial analysis of the time series completed, it’s time to compare our hypotheses of the state components smoothing parameters to what the fpp3 package specifies.

Finding the Best ETS model for the Time Series

Below, I have fitted ETS models on the training data for both the CPI and Unemployment Rate time series by letting the fpp3 package specify the error, trend, and seasonal components, along with the smoothing parameters and the initial states. R will automatically compare the AIC, AICc, and BIC values of each possible ETS model and select the one that has the lowest value. It will then assign values to the smoothing parameters that minimize the sum of squared residuals in the training set. Let’s first look at the best ETS model specification for the CPI time series.

# Splitting data into train and test sets

# CPI
train_cpi <- cpi |> filter_index(~'2020 Jul')
test_cpi <- cpi |> filter_index('2020 Aug'~.)
# UNRATE
train_unrate <- unrate |> filter_index(~'2020 Jul')
test_unrate <- unrate |> filter_index('2020 Aug'~.)

# Fitting the automated ETS models on the training sets
cpi_fit <- train_cpi |>
  model(ETS(value))

unrate_fit <- train_unrate |>
  model(ETS(value))

report(cpi_fit)
Series: value 
Model: ETS(A,Ad,N) 
  Smoothing parameters:
    alpha = 0.9999 
    beta  = 0.7808223 
    phi   = 0.8001151 

  Initial states:
     l[0]     b[0]
 169.7154 0.280843

  sigma^2:  0.3914

     AIC     AICc      BIC 
1136.082 1136.432 1157.138 

Best ETS Model for CPI Time Series

According to the model report seen above, the best ETS model specification, as chosen by the software, is an ETS(A, Ad, N) specification, confirming what I predicted from initially observing the CPI time series earlier. Below, I have given a breakdown of the model parameters:

  • Level

    • \(\alpha=0.99\)
      • As I suggested earlier, the level smoothing parameter is almost exactly equal to 1, meaning that the level of the CPI time series is adjusting very quickly to recent changes in the level which we can see in the original plot of the time series.
    • \(l[0]=169.71\)
      • This is the initial level that the ETS model specifies for the first observation in the time series. Since ETS models generate one-step-ahead forecasts given the existing level of the current observation, there is no previous level for the model to use when forecasting the initial level of the time series, so the model must approximate this value.

      • \(l[0]=169.71\) is very close to the actual initial value of 169.3 in the time series.

  • Trend

    • \(\beta=0.781\)

      • The best ETS model for the CPI time series does specify a trend parameter, and the value of \(\beta=0.781\) is relatively high which confirms what we observed above when analyzing the time series plot. The trend in the CPI at any point closely mirrors the trend at recent observations, and the model accounts for this by placing much more weight on the trend of recent observations when forecasting the trend for the one-step-ahead forecasts.
    • \(\phi=0.80\)

      • This is the lowest value the damping parameter could possibly take, suggesting that the upward trend in the CPI will slow relatively quickly and converge on some constant.
  • Season

    • \(\gamma=0\)
    • The selected ETS model did not specify a seasonal component which was expected, and so the value of the seasonal smoothing parameter is technically zero.
report(unrate_fit)
Series: value 
Model: ETS(A,N,N) 
  Smoothing parameters:
    alpha = 0.9890958 

  Initial states:
     l[0]
 4.002061

  sigma^2:  0.5024

     AIC     AICc      BIC 
1194.792 1194.890 1205.320 

Best ETS Model of Unemployment Rate Time Series

The best selected ETS model according to the report above is ETS(A,N,N) which is just a simple exponential smoothing method with an additive error. This differs from the specification that I predicted the software to select where I predicted that a seasonal component would be specified.

  • Level

    • \(\alpha=0.989\)
      • As expected, the level smoothing parameter is very close to 1, indicating that the value of the current level depends much more heavily on the level of more recent observations. We can confirm this by looking at the initial graph of the unemployment rate time series where we see that if the unemployment rate in a specific period is relatively low, then the unemployment rate in the next month will also be relatively low, with the exception of the 2008 recession and the pandemic in 2020.
    • \(l[0]=4.002\)
      • The ETS model sets the initial level to be estimated just above 4% which is basically identical to the actual unemployment rate of 4% for the first observation in the time series.
  • Trend

    • \(\beta=0\)
    • The ETS model does not specify a trend component which was expected since there is no clear upward or downward trend from the beginning of the series to the end. Hence, the trend smoothing parameter is technically zero.
  • Season

    • \(\gamma=0\)
    • The ETS model does not specify a seasonal component which I did not expect, since traditionally there is some seasonality in the unemployment rate.
    • Therefore, the seasonal smoothing parameter is zero.

Forecasting the selected ETS Models on the Testing Set

# Generating forecasts for CPi
cpi_fc <- cpi_fit |>
  forecast(h = nrow(test_cpi))

# Plotting forecasts for CPi
cpi_fc_plot <- cpi_fc |> autoplot(train_cpi) +
  autolayer(test_cpi, value) +
  labs(title = 'CPI Forecasts',
       subtitle = 'ETS(A,Ad,N) Model',
       x = 'Time (Months)',
       y = 'CPI') +
  theme(legend.position = 'bottom')

# Generating forecasts for Unemployment Rate
unrate_fc <- unrate_fit |>
  forecast(h = nrow(test_unrate))

# Plotting forecasts for Unemployment Rate
unrate_fc_plot <- unrate_fc |> autoplot(train_unrate) +
  autolayer(test_unrate, value) +
  labs(title = 'Unemployment Rate Forecasts',
       subtitle = 'ETS(A,N,N) Model',
       x = 'Time (Months)',
       y = 'Unemployment Rate') +
  theme(legend.position = 'bottom')

cpi_fc_plot | unrate_fc_plot

Above are the forecasts that were produced by each of the ETS model specifications. As we can see, the forecasts are not very good since the train and test split occurred right at the beginning of the pandemic.

  • The ETS model specified for the CPI time series did not account for the huge spike in the CPI as a result of the stimulus checks at the beginning of the pandemic.

  • For the unemployment rate time series, the last value of the unemployment rate in the training data is very high at about 10%, as a result of the pandemic. Since a simple exponential smoothing method was specified for this time series, the forecasts for future unobserved observations are essentially just naive forecasts, so the model assumes that all future unemployment rate values will be 10%.

Conclusion

  • ETS Models are used to evaluate the level, trend, and seasonal components that may underlie a time series and weight corresponding recent observations appropriately to generate forecasts for future values of the time series.

  • Specifically, ETS models estimate smoothing parameters values for the level, trend, and seasonal state equations, depending on how much an observation depends on more recent observations.

  • By plotting any time series on a graph, we can estimate what we think would be an appropriate ETS model specification by evaluating the time series level, trend, and seasonal components. As we learned from exploring the CPI and unemployment rate time series, our intuition from just looking at the plots of the time series usually gives us an educated idea how an ETS model should be specified and what the smoothing parameters should be. However, there are some instances, as we saw with the unemployment data, where the model the software selects is not always what we anticipated.

  • I have also performed the ETS(A,N,N) model specification in Excel on the Unemployment Rate data and I obtained the same level smoothing parameter of \(\alpha=0.9891\).