Holt-Winters Method
The Holt-Winters Method of Winters (1960) adds a seasonal pattern of m periods to the level and trend of Holt (1957): the season is additive, a fixed amount above or below the trend at each position in the season.
The formula for the Holt-Winters Method updates the level ell_t as a weighted average of the newest value of the series \(y_{t}\) without its seasonal part s and the previous level moved on by the previous trend b, with alpha between 0 and 1:
\[\ell_{t} = \alpha \cdot (y_{t} - s_{t-m}) + (1 - \alpha) \cdot (\ell_{t-1} + b_{t-1})\]The trend \(b_{t}\) is a weighted average of the latest change in the level and the previous trend, with beta between 0 and 1:
\[b_{t} = \beta \cdot (\ell_{t} - \ell_{t-1}) + (1 - \beta) \cdot b_{t-1}\]The seasonal part \(s_{t}\) is a weighted average of the newest deviation from the level and trend and the seasonal part one season of m periods earlier, with gamma between 0 and 1:
\[s_{t} = \gamma \cdot (y_{t} - \ell_{t-1} - b_{t-1}) + (1 - \gamma) \cdot s_{t-m}\]The forecast h periods ahead, up to one season, extends the level along the trend and adds the seasonal part of that position in the season:
\[\hat{y}_{t+h} = \ell_{t} + h \cdot b_{t} + s_{t+h-m}\]It suits a series with a stable seasonal pattern, such as monthly sales or energy demand; the prices of liquid assets have little season. A season that grows with the level of the series fits better on its logarithm.
Forecast every asset with exponential smoothing or the Theta method: a weighted average of its past values, with weights that fall off exponentially, extended with a trend and a season, and the prediction interval around it.
Exponential smoothing forecasts a series with a weighted average of its past values whose weights fall off exponentially with their age, so the latest values count most and old ones fade without ever being cut off. It was developed in the 1950s for inventory and sales forecasting, where it needed little computation and adapted to changes in the level of demand. The methods differ in the parts they track: a level, a trend, a trend that fades and a seasonal pattern. Each is fitted here as a state space model with additive errors (Hyndman, Koehler, Ord and Snyder, 2008) by maximum likelihood, which gives the smoothing parameters and a prediction interval around the forecast that widens with the horizon. Exponential smoothing and the Theta Method serve as baselines that a more elaborate model has to beat. For the price of a liquid asset, which is close to a random walk, the forecasts say little beyond the last price: the prediction interval is the more informative part.
Also known as: Holt-Winters additive method, triple exponential smoothing, seasonal exponential smoothing, ETS(A,A,A).
In the Finance Toolkit this is get_exponential_smoothing_forecast with method="holt_winters", the same function as Exponential Smoothing Forecast.
Example · AAPL, MSFT · 2021 to 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_exponential_smoothing_forecast:
from financetoolkit import Toolkit
toolkit = Toolkit(
["AAPL", "MSFT"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.econometrics.get_exponential_smoothing_forecast(method="holt_winters")["AAPL"]
| Parameter | Type | Description | Example |
|---|---|---|---|
method | str | The method. Options are: “simple” (Simple Exponential Smoothing, a level), “holt” (Holt Linear Trend Method, a level and a trend), “damped” (Damped Trend Method, a trend that fades), “holt_winters” (Holt-Winters Method, a level, a trend and an additive season), “theta” (Theta Method, smoothing with drift). Defaults to “simple”. | "simple" |
period | str | The data frequency (daily, weekly, monthly, quarterly, or yearly). Defaults to “daily”. | "weekly" |
column | str | The historical data column to forecast. Defaults to “Adj Close”. | "Return" |
forecast_steps | int | The number of periods ahead to forecast. Defaults to 5. | 10 |
seasonal_periods | int | None | The periods in a season of the Holt-Winters and Theta methods. Defaults to None, which takes a year of observations from the spacing of the dates (252 trading days, 52 weeks, 12 months, 4 quarters). | None, which takes a year of observations from the spacing of the dates (252 trading days, 52 weeks, 12 months, 4 quarters) |
confidence | float | The confidence of the prediction interval. Defaults to 0.95. | 0.95 |
include_benchmark | bool | Whether to include “Benchmark” among the assets. Defaults to False. | True |
rounding | int | None | The number of decimals to round the results to. Defaults to None. | 2 |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
Which returns:
| Step | Forecast | Lower Bound | Upper Bound |
|---|---|---|---|
| 1 | 271.836 | 265.833 | 277.839 |
| 2 | 269.902 | 261.412 | 278.392 |
| 3 | 268.886 | 258.487 | 279.284 |
| 4 | 268.199 | 256.192 | 280.207 |
| 5 | 265.682 | 252.256 | 279.107 |
5 rows
Using Your Own Data
get_exponential_smoothing_forecast runs on any data, not only prices: ratios, economic indicators, yield curves or your own dataset. Pass a DataFrame, a Series or a dictionary of them to Econometrics as data, with the dates in the rows or the columns, and set changes to how its changes are calculated: "percentage", "log", "difference" for rates and ratios, or None when the data are changes already. For example, for the monthly unemployment rates of the United States and Germany:
from financetoolkit import Economics, Econometrics
economics = Economics(start_date="2000-01-01")
unemployment = economics.get_unemployment_rate(
countries=["United States", "Germany"], period="monthly"
)
econometrics = Econometrics(data=unemployment, changes="difference")
econometrics.get_exponential_smoothing_forecast()
References
- Paper Holt, C.C. (1957). “Forecasting Seasonals and Trends by Exponentially Weighted Moving Averages.” ONR Memorandum 52, Carnegie Institute of Technology. Reprinted in the International Journal of Forecasting, 20(1), 5-10 (2004).
- Paper Winters, P.R. (1960). “Forecasting Sales by Exponentially Weighted Moving Averages.” Management Science, 6(3), 324-342.
- Paper Hyndman, R.J., Koehler, A.B., Ord, J.K. and Snyder, R.D. (2008). “Forecasting with Exponential Smoothing: The State Space Approach.” Springer.
- Library Shares similar logic as statsmodels’ ETSModel (Simple Exponential Smoothing, Holt Linear Trend Method, Damped Trend Method, Holt-Winters Method)