Holt Linear Trend Method

The Holt Linear Trend Method of Holt (1957) adds a trend to the level, so that the forecast continues the recent direction of the series instead of staying flat.

The formula for the Holt Linear Trend Method updates the level ell_t of the series \(y_{t}\) as a weighted average of the newest value and the previous level moved on by the previous trend b, with alpha between 0 and 1:

\[\ell_{t} = \alpha \cdot y_{t} + (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 forecast h periods ahead extends the last level along the last trend:

\[\hat{y}_{t+h} = \ell_{t} + h \cdot b_{t}\]

The forecast is a straight line, which suits a series with a steady trend. Trends rarely last indefinitely, so at long horizons the forecast tends to overshoot.

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’s linear trend method, Holt’s method, double exponential smoothing, ETS(A,A,N).

In the Finance Toolkit this is get_exponential_smoothing_forecast with method="holt", 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")["AAPL"]

Which returns:

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 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)
Share