seasonality – Demand Planning, S&OP/ IBP, Supply Planning, Business Forecasting Blog https://demand-planning.com S&OP/ IBP, Demand Planning, Supply Chain Planning, Business Forecasting Blog Wed, 24 Feb 2021 16:35:37 +0000 en hourly 1 https://wordpress.org/?v=6.6.4 https://demand-planning.com/wp-content/uploads/2014/12/cropped-logo-32x32.jpg seasonality – Demand Planning, S&OP/ IBP, Supply Planning, Business Forecasting Blog https://demand-planning.com 32 32 Practical Methods For Identifying Seasonality In A Dataset https://demand-planning.com/2021/02/24/practical-methods-for-identifying-seasonality-in-a-dataset/ https://demand-planning.com/2021/02/24/practical-methods-for-identifying-seasonality-in-a-dataset/#comments Wed, 24 Feb 2021 16:31:03 +0000 https://demand-planning.com/?p=8956

At my former company, Bendix Commercial Vehicle Systems, an Ohio-based manufacturer of brakes and safety systems, I was asked to come up with a list of seasonal items across multiple levels of product hierarchy.

The product hierarchy was part → plant → device code → main family, and was spread across several plants, focusing exclusively on the aftermarket portion of the business. The project developed into a means of identifying seasonality via multiple indicators and approaches, culminating in the use of a statistical forecasting model for comparison against moving average models. Below is a summary of the project complete with the process steps and outputs. The primary tools used were Excel and the R forecasting package.

Starting With Time Series Decomposition

To accomplish this task, I went back to some basic yet powerful statistical concepts, beginning with time series decomposition. In time series decomposition, seasonality can be separated from noise and trend (at least in theory). I ended up identifying seasonality in 2 ways – the first was with Excel, using a median demand value over each year compared to each month’s demand patterns. Excel doesn’t have a decomposition feature, so I performed this manually.

In this case, if the output (what I called “indices”) were the same or close for over 75% of the year, I considered it to be seasonal. The reason why I allowed values that were ‘close’ as well as the same was to account for any rounding or fluctuation in decimals as decimals were not recorded to every decimal place.

Having the ability towards the end of the project to program in R, I used the default time series decomposition function in this package to identify seasonality as well. R seemed to confuse (or fail to distinguish seasonality) from noise in the time series tested. This I attribute to natural fluctuations in demand levels from year to year. Given my earlier analysis in Excel, I was fairly confident that seasonality existed in the dataset, so I started looking at other models that could confirm or deny this. I eventually utilized Holt-Winters filtering to filter the time series which indeed confirmed the existence of seasonality.

Holt-Winters Filtering

The results of the Holt-Winters filtering were quite different than standard time series decomposition. Because of the noise in the time series, the default time series decomposition in R did not adequately identify seasonality – but Holt-Winters filtering did (see Figure 1).

 

Figure 1. Identifying seasonality with Holt-Winters Filtering

Filtering is also a powerful tool for optimizing a time series. Holt-Winters filtering also allowed for the determination of coefficients across various periods. The goal of this was to look for coefficients that repeated over time at the same (or nearly the same) periodicity with roughly the same value. This would support my theory that seasonality was present in the dataset as coefficients should roughly change at the same interval if seasonality were present – values could change but the pattern of repeating was a strong indication of seasonality. Given this was a test for seasonality, the specific values were not extremely important at this stage but rather the pattern of coefficients and the intervals. See Figure 2 for the fitted plot and for a plot of the coefficients.

Figure 2. A plot of the coefficients using Holt-Winters Filtering

Another important aspect of this project was to perform “what if” analysis, i.e., what seasonal demand might look via a simulation. In most instances, a uniform distribution was used, employing a minimum and maximum based on historical demand. In Excel and R, this was performed with a randomized uniform distribution.

At some combinations at higher levels of product hierarchy, discrete distributions were used but later analysis revealed little to no seasonality at lower levels. This led me to use uniform distribution for the combinations, which show seasonal behavior.

Results show that demand does follow a seasonal pattern with a roughly consistent cycle over the 36 months of demand history. The simulations were run first based on an interval for 1 year and then for an interval over the entire 3 years of demand history with little to no change in results.

Figure 3. Demand showing a seasonal pattern.

Given this project was done as part of a demand planning and forecasting team, the natural progression was to determine how to deliver a better forecast for seasonal items. Utilizing averages will often lead to over smoothing on seasonal items unless the seasonality occurs on the same cycle or line as the average. Rather than attempt to tune the moving average, I utilized a 6-month moving average for comparison purposes and my baseline.

Harnessing the power of R forecasting package, I was able to perform a triple exponential smoothing forecast. The forecast is based on the original time series with 36 points which results in a forecast for 36 months. The package fits the forecast to the time series and provides the resulting coefficients for each of the periods as well. These coefficients allowed for forecast comparison on demand and the six month moving average as well. See below (Figure 4) for comparisons between demand (actuals) and triple exponential smoothing and 6 month moving average.

 

Figure 4. Forecast vs. actual demand

At the end of this project, 6 out of 30 product groups showed seasonality which is approximately thirty percent of the entire product portfolio. Statistical and quantitative analysis allows for comparison of time series and determination of seasonal coefficients and simulation. But just as important are consideration of non–quantitative factors as well. These may include customer, markets and perhaps other external factors such as structural shifts or product advancements.

Hopefully this will provide a simple yet useful means to identify seasonality and ultimately assist in developing a robust forecast.

 

]]>
https://demand-planning.com/2021/02/24/practical-methods-for-identifying-seasonality-in-a-dataset/feed/ 2
How To Identify Multiple Seasonal Factors For The Same Product https://demand-planning.com/2019/04/02/how-to-identify-multiple-seasonal-factors-for-the-same-product/ https://demand-planning.com/2019/04/02/how-to-identify-multiple-seasonal-factors-for-the-same-product/#respond Tue, 02 Apr 2019 13:18:03 +0000 https://demand-planning.com/?p=7681

Most forecasting approaches are based on the idea that a forecast can be improved if the underlying factors in the data can be identified and forecasted separately. It stands to reason then that we can gain insights by isolating components separately, and model things like seasonality separately.

Seasonality is one of most frequently used statistical patterns used to improve the accuracy of demand forecasts. Whether it be a summer selling season, back to school, Singles Day, a President’s Day mattress sale, or Santa’s big day once a year, most companies are dealing with some sort of seasonality. While most industries and companies do exhibit some seasonality in their items, the real problem is that most companies actually have multiple seasonalities for a single product.

Most companies actually have multiple seasonalities for a single product.

This is even more apparent today with the growth of omni-channel and global markets.

Consider an item that is sold not only in a retail brick-and-mortal store that purchases the stock a month or more in advance of their selling season. That same item may be sold direct to consumers or on Amazon to ship the next day during the middle of the selling season as well.

What about the climate in southern states compared to other regions and the impact of geography on a product? When looking at sales at the store level, the seasonality of the product itself is typically entangled with the seasonality of the store.

Transforming the data through aggregation allows you to gather additional information about the series at hand, resulting in better forecasts.

It’s very common in forecasting to aggregate data in order to increase the signal/noise ratio. There are several papers on the effect of hierarchical and temporal aggregation on forecast accuracy. Transforming the data through aggregation allows you to gather additional information about the series at hand, resulting in better forecasts. By decomposing the time series and isolating the different systematic components, we can do this separately for the seasonal component without confining ourselves to a product or item hierarchy.

While this is common and done frequently, another potential step is to model each systematic component on its own at different levels of aggregation or clusters that fit that component. This helps to improve overall forecast accuracy.

Multi-Cluster Time Series Analysis

Using multi-cluster time series analysis (MCTSA), seasonality (just one example) may be evaluated not on a single item or single level of aggregation, but looking at multiple customer-item-location combinations and then clustering based on attributes of similar behavior. You do not need to limit your groups either – other attributes may be aggregated e.g, grouping days into weeks or months to find optimal groupings.

To find these clusters, we can use some fuzzy math or, more specifically, Fuzzy K–Means cluster analysis. A Fuzzy clustering is a form of clustering in which each data point can belong to more than one cluster. It works basically the same way as the popular K-Means cluster analysis with the one distinction being that each data point computes its coefficients of being in each cluster.

Computing The Fuzzy K-Means Analysis

To perform this Fuzzy K-Means analysis, deseasonalize your data or isolate the component you would like to analyze and cluster. You will need to specify the number of clusters and a probability of that data point being in those clusters. You then compute cluster centroids, or calculate the mean of each cluster. Next, compute the distance of each point from each cluster by computing its distance from the corresponding cluster mean. Assign each point to the cluster it is nearest to. A data point can theoretically belong to all groups, with a membership function (also called a membership grade) between 0 and 1, where 0 is the data point at the farthest possible point from a cluster’s center, and where 1 is the data point closest to the center. The procedure repeats until the distance between cluster center is maximized.

This analysis will sort through the data on item-location-customer attributes (or others) and cluster them in like groups. In order to decide which clusters should be combined (for agglomerative), or where a cluster should be split (for divisive), a measure of dissimilarity between sets of observations is required. Items that belong to the same cluster are similar to each other and have a similarity between the correlation coefficients. We may find 0.6 of an item’s seasonality comes from this certain item-customer combination and the rest comes from various item-region groups. Combined, you can determine this individual product’s seasonal profile and arrive at an index that can be forecasted.

Bringing It Back To One

The uses of these new-found seasonalities can be used in the way you currently use forecasting or predictive analytics. Isolating just the seasonal component may be used as a ratio or index that can be used to extract the baseline and trend. This index may be used to deseasonalize data for other purposes. As a systematic component of time series, it can be separated, forecasted at multiple levels, then aggregated and combined allowing for multiple standard models – both additive and multiplicative. In the case of new products or items with intermittent demand, you can create seasonal profiles that may be applied to models or even qualitative forecasting approaches.

All of this is focused on extracting the most accurate seasonal profiles for your data and using them to work towards a more accurate forecast. It is clear that different ways of looking at the data and different aggregation can reveal or conceal various time series features and different seasonal silhouettes. As the models will be different, instead of preferring a single one or single level, combine seasonality into a robust final forecast that takes into account information from all frequencies of the data. This will provide a more accurate picture of true seasonality and a more accurate picture of the future.

]]>
https://demand-planning.com/2019/04/02/how-to-identify-multiple-seasonal-factors-for-the-same-product/feed/ 0