Holt-Winters Forecasting and Exponential Smoothing Simplified - Orange Matter (2024)

Holt-Winters forecasting is a way to model and predict the behavior of a sequence of values over time—a time series. Holt-Winters is one of the most popular forecasting techniques for time series. It’s decades old, but it’s still ubiquitous in many applications, including monitoring, where it’s used for purposes such as anomaly detection and capacity planning.

Unfortunately, Holt-Winters forecasting is confusing, so it’s often poorly understood. We want to fix that, so we wrote this post: a visual introduction to Holt-Winters.

What Is the Holt-Winters Method?

Holt-Winters is a model of time series behavior. Forecasting always requires a model, and Holt-Winters is a way to model three aspects of the time series: a typical value (average), a slope (trend) over time, and a cyclical repeating pattern (seasonality).

Time series anomaly detection is a complicated problem with plenty of practical methods. It’s easy to get lost in all of the topics it encompasses. Learning them is certainly an issue, but implementing them is often more complicated. A key element of anomaly detection is forecasting—taking what you know about a time series, either based on a model or its history, and making decisions about values that arrive later.

You know how to do this already. Imagine someone asked you to forecast the prices for a certain stock, or the local temperature over the next few days. You could draw out your prediction, and chances are it’s a pretty good one. Your brain works amazingly well for problems like this, and our challenge is to try to get computers to do the same.

If you take an introductory course on time series, you’ll learn how to forecast by fitting a model to some sample data, and then using the model to predict future values. In practice, especially when monitoring systems, this approach doesn’t work well, if at all! Real systems rarely fit mathematical models. There’s an alternative. You can do something a lot simpler with exponential smoothing.

Holt-Winters Triple Exponential Smoothing Formula Explained

The Holt-Winters method uses exponential smoothing to encode lots of values from the past and use them to predict “typical” values for the present and future. Exponential smoothing refers to the use of an exponentially weighted moving average (EWMA) to “smooth” a time series. If you have some time seriesxt, you can define a new time seriesstthat’s a smoothed version ofxt.

st=αxt+(1−α)st−1

In the late 1950s, Charles Holt recognized the issue with the simple EWMA model with time series with trend. He modified the simple exponential smoothing model to account for a linear trend. This is known as Holt’s exponential smoothing. This model is a little more complicated. It consists of two EWMAs: one for the smoothed values ofxt, and another for itsslope. The termslevelandtrendare also used.

st=αxt+(1−α)(st−1+bt−1)

bt=β(stst−1)+(1−β)bt−1

Notice how the smoothed values are much better at following the original time series with double exponential smoothing. This means you’ll get much better forecasts.

To forecast with this model, you have to make a slight adjustment. Because there’s another term for the slope, you’ll have to consider that in the forecast. Suppose you’re trying to forecast the value inmtime steps in the future. The formula for them-step-ahead forecast,Ft+m, is:

Ft+m=st+mbt

Notice how it’s essentially the formula for a line. What if your time series doesn’t have a linear trend, but rather some sort of seasonality? For this, you’ll need yet another EWMA.

Holt’s student, Peter Winters, extended his teacher’s model by introducing an additional term to factor in seasonality. Notice how there’s another variableL, which depends on the period of the seasonality and has to be known in advance.The three aspects of the time series behavior—value, trend, and seasonality—are expressed as three types of exponential smoothing, so Holt-Winters is called triple exponential smoothing. The model predicts a current or future value by computing the combined effects of these three influences. The model requires several parameters: one for each smoothing (ɑ, β, γ), the length of a season, and the number of periods in a season.

Holt-Winters Forecasting Example

The hardest parts of Holt-Winters forecasting are understanding how the model works and choosing good parameters. To tackle the first, we’ll walk through an example model by doing Holt-Winters “by hand.”

The usual way to explain Holt-Winters is by showing a bunch of complicated equations with Greek letters and subscripts. We’ll skip the math and show how it works, which is a lot simpler. We’re going to be working with this time series:

Here’s the R code I used to generate that.

The pattern is obvious: the plot repeats the values [0, 1, 0, 0, 0]. Can you tell me what the next five values are going to be? Of course you can, because I just told you! They are [0, 1, 0, 0, 0]. What would it look like if we made the valuesrelative to the averageof those five points? The average of (0+1+0+0+0)/5 is 0.2, which we’ll draw on the plot as a horizontal line:Holt-Winters has a trend component. If we set its parameter to zero, Holt-Winters ignores the trend (slope), so the model simplifies. Now, it’s just a bunch of values relative to the average. In our plot, the values relative to 0.2 are [-0.2, 0.8, -0.2, -0.2, -0.2]. If we did Holt-Winters without trend, that’s the type of model we’d build. Here’s what the Holt-Winters function in R gives, with some annotations in blue I added manually:Forecasting with trend is just an enhancement of this. Instead of using a fixed average as the foundation, you have to incorporate the slope of the line. Here’s a model with a trend:

What Is Seasonality in Forecasting?

Seasonality refers to a periodic pattern or a fixed length of time containing the full repetition. However, seasonality can be confusing. You might think your data repeats daily (there’s a peak at 2 p.m. every day), but if the weekend has different behavior (there’s no peak at 2 p.m. on Sunday) then your season is really a week, not a day. Within the season, there are periods, which is the granularity of prediction. If you want to model a value for every hour of every day within a week, your season is 168 hours long and your period is 1 hour.

You already know, by definition, the example series repeats itself every five points, i.e., the season is five periods. What if you didn’t know what the season is for a time series? How can you figure it out? What are the consequences of being wrong? The right seasonality is crucial to Holt-Winters forecasting. To illustrate this, let’s see what happens when you use a season of six periods, one greater than the actual season of five periods:

The forecast, which is the red line in the chart, becomes less accurate and turns into garbage. To get good results, you need to give the model good parameters. This is the second challenge with Holt-Winters forecasting.

Determining Optimal Parameters for Holt-Winters Formula Calculations

Picking the seasonality is a hard problem. General-purpose forecasting is hard because it has to be ready to use on any dataset, which might have any combination of values, trend, and seasonality. It might not even have some of those components. These are usually unknowns unless you’re manually inspecting the data and customizing the model for it.

At SolarWinds, we needed forecasting functionality that just works, without any assumptions or knowledge of the data’s characteristics. There are various approaches to this: machine learning, Fourier analysis, and so on. Our solution to this problem is to try lots of different combinations of things, using techniques likeNelder-Meadoptimizationto pick the winners. This takes advantage of computers being fast at simple things, so we formulate the problem simply: can I quantify how good a forecast is, and can I compare forecasts? Then we try different combinations of parameters and see what wins.

Let’s quantify how good a forecast is. The last forecast was bad, buthow bad?The usual way to quantify the accuracy of a forecast is to calculate the differences between the predicted values and the actual values. The blue arrows in the following chart represent how far off the prediction was from the actual value.

To quantify overall accuracy, you can combine these differences into a single value by taking the average or the sum of squared values. The result is a value that’s smaller if the forecast is better, and larger if the forecast is worse. This gives you a good way to compare forecast results.

Our forecasting code tries lots of combinations (lots!) with different parameters and picks the ones that generate the lowest combined error score. To illustrate this, here are a bunch of forecasts on the same time series, trying out different frequencies.

The one with the right seasonality (five periods per season) is easy to pick out visually because the differences between the data and the forecast are small. This is a visual example of what our forecasting does through optimization. It also optimizes other parameters, such as the trend.

Holt-Winters Forecasting Method for Database Anomaly Detection

Holt-Winters forecasting is surprisingly powerful despite its simplicity. It can handle lots of complicated seasonal patterns by simply finding the central value, then adding in the effects of slope and seasonality. The trick is giving it the right parameters. This is a hard problem, but we’ve found numerical optimization can pick good values quickly. This solution is simple to build and understand, which is valuable for our purposes.

If you’re interested in exploring further, here are some other resources:

SolarWinds Database Performance Monitor offers query anomaly detection based on advanced statistical algorithms like Holt-Winters forecasting designed to account for several types of seasonality to better avoid false positives. Start a 14-day free trial of DPM to see this feature in action.

Holt-Winters Forecasting and Exponential Smoothing Simplified - Orange Matter (2024)

FAQs

What is the difference between exponential smoothing and Holt-winters? ›

The Holt-Winters method uses exponential smoothing to encode lots of values from the past and use them to predict “typical” values for the present and future. Exponential smoothing refers to the use of an exponentially weighted moving average (EWMA) to “smooth” a time series.

What are the disadvantages of Holt-Winters exponential smoothing? ›

However, it does not consider the most recent inter-trend relations, which can be a disadvantage. The advantages of using Holt's method with different time horizons include accurate forecasting, while the disadvantages include increased complexity and potential for errors.

What does Holt-Winters exponential smoothing procedure allow for? ›

The Holt-Winters forecasting algorithm allows users to smooth a time series and use that data to forecast areas of interest. Exponential smoothing assigns exponentially decreasing weights and values against historical data to decrease the value of the weight for the older data.

What is exponential smoothing forecasting in simple words? ›

Exponential smoothing forecasting

Exponential smoothing is a method of forecasting that uses a weighted average of past observations to predict future values. The weights assigned to past observations are exponential, with more recent observations having a higher weight than older observations.

When to use Holt-Winters method? ›

The Holt-Winters method is used for time-series forecasting because it can capture trends and seasonality in the data, making it particularly useful for predicting future values of a time series that exhibit these patterns. The method is also relatively simple and can produce accurate forecasts.

What are the three types of exponential smoothing? ›

The technique applies exponential smoothing three times – level smoothing, trend smoothing, and seasonal smoothing.

What is the difference between Arima and Holt-winters? ›

The study found that both of the studied models (Holt-Winters and ARIMA) performed well in predicting rice price values. However, in the model comparison, although by very little difference, the Holt-Winters additive model was closer to the actual data.

What are the assumptions of Holt-winters forecasting? ›

Winter's method assumes that the time series has a level, trend and seasonal component. A forecast with Winter's exponential smoothing can be expressed as: The forecast equation is the extenuation of both the SES and HES methods, finally augmented with the inclusion of the Seasonal, S, component.

What are the four types of forecasting models? ›

Time Series Model: good for analyzing historical data to predict future trends. Econometric Model: uses economic indicators and relationships to forecast outcomes. Judgmental Forecasting Model: leverages human intuition and expertise. The Delphi Method: forms a consensus based on expert opinions.

When should you use exponential smoothing? ›

Exponential smoothing is one of the oldest and most studied time series forecasting methods. It is most effective when the values of the time series follow a gradual trend and display seasonal behavior in which the values follow a repeated cyclical pattern over a given number of time steps.

What are the benefits of exponential smoothing? ›

One of the main advantages of exponential smoothing is that it is simple and intuitive to understand and apply. You only need to specify one parameter, the smoothing factor, which controls how much weight you give to the past data.

When to use ARIMA vs exponential smoothing? ›

To put it simply: Use Exponential Smoothing if your data has a clear trend or seasonality and you prefer a simpler, more interpretable model. Opt for ARIMA if your data shows more complex patterns or you need a more flexible model, and you have enough data to support its complexity.

What is the difference between Holt Winter and Sarima? ›

This may be due to the characteristics of each model. In terms of models alone, the SARIMA model is more suitable for predicting data with stable changing trends than the Holt-Winters model, while the Holt-Winters model is more suitable for predicting data with single changing trends.

What is the difference between exponential smoothing and regression? ›

The linear regression, which fits a least squares line to the historical data (or transformed historical data), represents the long range, which is conditioned on the basic trend. Holt's linear exponential smoothing captures information about recent trend.

What is the difference between exponential smoothing and linear forecasting? ›

Exponential smoothing forecast - time series forecasting based on historical data with seasonal or other cycles. Linear forecast - predicting future values using linear regression.

Top Articles
5 Things FedEx Office Printing Doesn't Want You to Know
Live updates: Debby now a tropical storm after hitting Florida as a hurricane | CNN
Mybranch Becu
Edina Omni Portal
Lakers Game Summary
The 10 Best Restaurants In Freiburg Germany
Rek Funerals
Chris wragge hi-res stock photography and images - Alamy
Routing Number 041203824
Kostenlose Games: Die besten Free to play Spiele 2024 - Update mit einem legendären Shooter
World of White Sturgeon Caviar: Origins, Taste & Culinary Uses
fltimes.com | Finger Lakes Times
Aktuelle Fahrzeuge von Autohaus Schlögl GmbH & Co. KG in Traunreut
WWE-Heldin Nikki A.S.H. verzückt Fans und Kollegen
Guidewheel lands $9M Series A-1 for SaaS that boosts manufacturing and trims carbon emissions | TechCrunch
Vrachtwagens in Nederland kopen - gebruikt en nieuw - TrucksNL
Nhl Tankathon Mock Draft
Talkstreamlive
Dtm Urban Dictionary
55Th And Kedzie Elite Staffing
Studentvue Calexico
Schooology Fcps
Ordensfrau: Der Tod ist die Geburt in ein Leben bei Gott
Ipcam Telegram Group
Vlacs Maestro Login
How Much Is An Alignment At Costco
Cbs Trade Value Chart Week 10
Human Unitec International Inc (HMNU) Stock Price History Chart & Technical Analysis Graph - TipRanks.com
Green Bay Crime Reports Police Fire And Rescue
Vitals, jeden Tag besser | Vitals Nahrungsergänzungsmittel
Today's Final Jeopardy Clue
Why The Boogeyman Is Rated PG-13
Polk County Released Inmates
Retire Early Wsbtv.com Free Book
Banana Republic Rewards Login
Rage Of Harrogath Bugged
Überblick zum Barotrauma - Überblick zum Barotrauma - MSD Manual Profi-Ausgabe
D-Day: Learn about the D-Day Invasion
Legit Ticket Sites - Seatgeek vs Stubhub [Fees, Customer Service, Security]
Ferguson Showroom West Chester Pa
814-747-6702
Satucket Lectionary
Lorton Transfer Station
Workday Latech Edu
Advance Auto.parts Near Me
Secrets Exposed: How to Test for Mold Exposure in Your Blood!
10 Best Tips To Implement Successful App Store Optimization in 2024
Marine Forecast Sandy Hook To Manasquan Inlet
Service Changes and Self-Service Options
Lorcin 380 10 Round Clip
Leslie's Pool Supply Redding California
Noaa Duluth Mn
Latest Posts
Article information

Author: Nicola Considine CPA

Last Updated:

Views: 6160

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Nicola Considine CPA

Birthday: 1993-02-26

Address: 3809 Clinton Inlet, East Aleisha, UT 46318-2392

Phone: +2681424145499

Job: Government Technician

Hobby: Calligraphy, Lego building, Worldbuilding, Shooting, Bird watching, Shopping, Cooking

Introduction: My name is Nicola Considine CPA, I am a determined, witty, powerful, brainy, open, smiling, proud person who loves writing and wants to share my knowledge and understanding with you.