The Automatic Forecasting Feature

Automatic forecasting is the most popular and most used feature of SmartForecasts and Smart Demand Planner. Creating Automatic forecasts is easy. But, the simplicity of Automatic Forecasting masks a powerful interaction of a number of highly effective methods of forecasting. In this blog, we discuss some of the theory behind this core feature. We focus on Automatic forecasting, in part because of its popularity and in part because many other forecasting methods produce similar outputs. Knowledge of Automatic forecasting immediately carries over to Simple Moving Average, Linear Moving Average, Single Exponential Smoothing, Double Exponential Smoothing, Winters’ Exponential Smoothing, and Promo forecasting.

 

Forecasting tournament

Automatic forecasting works by conducting a tournament among a set of competing methods. Because personal computers and cloud computing are fast, and because we have coded very efficient algorithms into the SmartForecasts’ Automatic forecasting engine, it is practical to take a purely empirical approach to deciding which extrapolative forecasting method to use. This means that you can afford to try out a number of approaches and then retain the one that does best at forecasting the particular data series at hand. SmartForecasts fully automates this process for you by trying the different forecasting methods in a simulated forecasting tournament. The winner of the tournament is the method that comes closest to  predicting new data values from old. Accuracy is measured by average absolute error (that is, the average error, ignoring any minus signs). The average is computed over a set of forecasts, each using a portion of the data, in a process known as sliding simulation.

 

Sliding simulation

The sliding simulation sweeps repeatedly through ever-longer portions of the historical data, in each case forecasting ahead the desired number of periods in your forecast horizon. Suppose there are 36 historical data values and you need to forecast six periods ahead. Imagine that you want to assess the forecast accuracy of some particular method, say a moving average of four observations, on the data series at hand.

At one point in the sliding simulation, the first 24 points (only) are used to forecast the 25th through 30th historical data values, which we temporarily regard as unknown. We say that points 25-30 are “held out” of the analysis. Computing the absolute values of the differences between the six forecasts and the corresponding actual historical values provides one instance each of a 1-step, 2-step, 3-step, 4-step, 5-step, and 6-step ahead absolute forecast error. Repeating this process using the first 25 points provides more instances of 1-step, 2-step, 3-step ahead errors, and so on. The average over all of the absolute error estimates obtained this way provides a single-number summary of accuracy.

 

Methods used in Automatic forecasting

Normally, there are six extrapolative forecasting methods competing in the Automatic forecasting tournament:

  • Simple moving average
  • Linear moving average
  • Single exponential smoothing
  • Double exponential smoothing
  • Additive version of Winters’ exponential smoothing
  • Multiplicative version of Winters’ exponential smoothing

 

The latter two methods are appropriate for seasonal series; however, they are automatically excluded from the tournament if there are fewer than two full seasonal cycles of data (for example, fewer than 24 periods of monthly data or eight periods of quarterly data).

These six classical, smoothing-based methods have proven themselves to be easy to understand, easy to compute and accurate. You can exclude any of these methods from the tournament if you have a preference for some of the competitors and not others.

 

 

 

 

The Objectives in Forecasting

A forecast is a prediction about the value of a time series variable at some time in the future. For instance, one might want to estimate next month’s sales or demand for a product item. A time series is a sequence of numbers recorded at equally spaced time intervals; for example, unit sales recorded every month.

The objectives you pursue when you forecast depend on the nature of your job and your business. Every forecast is uncertain; in fact, there is a range of possible values for any variable you forecast. Values near the middle of this range have a higher likelihood of actually occurring, while values at the extremes of the range are less likely to occur. The following figure illustrates a typical distribution of forecast values.

forecast distribution of forecast values

Illustrating a forecast distribution of forecast values

 

Point forecasts

The most common use of forecasts is to estimate a sequence of numbers representing the most likely future values of the variable of interest. For instance, suppose you are developing a sales and marketing plan for your company. You may need to fill in 12 cells in a financial spreadsheet with estimates of your company’s total revenues over the next 12 months. Such estimates are called point forecasts because you want a single number (data point) for each forecast period. Smart Demand Planner’ Automatic forecasting feature provides you with these point forecasts automatically.

Interval forecasts

Although point forecasts are convenient, you will often benefit more from interval forecasts. Interval forecasts show the most likely range (interval) of values that might arise in the future. These are usually more useful than point forecasts because they convey the amount of uncertainty or risk involved in a forecast. The forecast interval percentage can be specified in the various forecasting dialog boxes in the Demand Planning SoftwareEach of the many forecasting methods (automatic, moving average, exponential smoothing and so on) available in Smart Demand Planner allow you to set a forecast interval.

The default configuration in Smart Demand Planner provides 90% forecast intervals. Interpret these intervals as the range within which the actual values will fall 90% of the time. If the intervals are wide, then there is a great deal of uncertainty associated with the point forecasts. If the intervals are narrow, you can be more confident. If you are performing a planning function and want best case and worst case values for the variables of interest at several times in the future, you can use the upper and lower limits of the forecast intervals for that purpose, with the single point estimate providing the most likely value. In the previous figure, the 90% forecast interval extends from 3.36 to 6.64.

Upper percentiles

In inventory control, your goal may be to make good estimates of a high percentile of the demand for a product item. These estimates help you cope with the tradeoff between, on the one hand, minimizing the costs of holding and ordering stock, and, on the other hand, minimizing the number of lost or back-ordered sales due to a stock out. For this reason, you may wish to know the 99th percentile or service level of demand, since the chance of exceeding that level is only 1%.

When forecasting individual variables with features like Automatic forecasting, note that the upper limit of a 90% forecast interval represents the 95th percentile of the predicted distribution of the demand for that variable. (Subtracting the 5th percentile from the 95th percentile leaves an interval containing 95%-5% = 90% of the possible values.) This means you can estimate upper percentiles by changing the value of the forecast interval. In the figure, “Illustrating a forecast distribution”, the 95th percentile is 6.64.

To optimize stocking policies at the desired service level or to let the system recommend which stocking policy and service level generates the best return, consider using Smart Inventory Optimization.   It is designed to support what-if scenarios that show predicted tradeoffs of varying inventory polices including different service level targets.

Lower percentiles

Sometimes you may be concerned with the lower end of the predicted distribution for a variable. Such cases often arise in financial applications, where a low percentile of a revenue estimate represents a contingency requiring financial reserves. You can use Smart Demand Planner in this case in a way analogous to the case of forecasting upper percentiles. In the figure, “Illustrating a forecast distribution” , the 5th percentile is 3.36.

In conclusion, forecasting involves predicting future values, with point forecasts offering single estimates and interval forecasts providing likely value ranges. Smart Demand Planner automates point forecasts and allows users to set intervals, aiding in uncertainty assessment. For inventory control, the tool facilitates understanding upper (e.g., 99th percentile) and lower (e.g., 5th percentile) percentiles. To optimize stocking policies and service levels, Smart Inventory Optimization supports what-if scenarios, ensuring effective decision-making on how much to stock given the risk of stock out you are willing to accept.

 

 

 

Don’t blame shortages on problematic lead times.

Lead time delays and supply variability are supply chain facts of life, yet inventory-carrying organizations are often caught by surprise when a supplier is late. An effective inventory planning process embraces this fact of life and develops policies that effectively account for this uncertainty. Sure, there will be times when lead time delays come out of nowhere and cause a shortage. But most often, the shortages result from:

  1. Not computing stocking policies (e.g., reorder points, safety stocks, and Min/Max levels) often enough to catch changes in the lead time. 
  2. Using poor estimates of actual lead time such as using only averages of historical receipts or relying on a supplier quote.

Instead, recalibrate policies across every single part during every planning cycle to catch changes in demand and lead times.  Rather than assuming only an average lead time, simulate the lead times using scenarios.  This way, recommended stocking policies account for the probabilities of lead times being high and adjust accordingly.  When you do this, you’ll identify needed inventory increases before it is too late. You’ll capture more sales and drive significant improvements in customer satisfaction.

A Gentle Introduction to Two Advanced Techniques: Statistical Bootstrapping and Monte Carlo Simulation

Summary

Smart Software’s advanced supply chain analytics exploits multiple advanced methods. Two of the most important are “statistical bootstrapping” and “Monte Carlo simulation”. Since both involve lots of random numbers flying around, folks sometimes get confused about which is which and what they are good for. Hence, this note. Bottom line up front: Statistical bootstrapping generates demand scenarios for forecasting. Monte Carlo simulation uses the scenarios for inventory optimization.

Bootstrapping

Bootstrapping, also called “resampling” is a method of computational statistics that we use to create demand scenarios for forecasting. The essence of the forecasting problem is to expose possible futures that your company might confront so you can work out how to manage business risks. Traditional forecasting methods focus on computing “most likely” futures, but they fall short of presenting the full risk picture. Bootstrapping provides an unlimited number of realistic what-if scenarios.

Bootstrapping does this without making unrealistic assumptions about the demand, i.e., that it is not intermittent, or that it has a bell-shaped distribution of sizes. Those assumptions are crutches to make the math simpler, but the bootstrap is a procedure,  not an equation, so it doesn’t need such simplifications.

For the simplest demand type, which is a stable randomness with no seasonality or trend, bootstrapping is dead easy. To get a reasonable idea of what a single future demand value might be, pick one of the historical demands at random. To create a demand scenario, make multiple random selections from the past and string them together. Done. It is possible to add a little more realism by “jittering” the demand values, i.e., adding or subtracting a bit of additional randomness to each one, but even that is simple.

Figure 1 shows a simple bootstrap. The first line is a short sequence of historical demand for an SKU. The following lines show scenarios of future demand created by randomly selecting values from the demand history. For instance, the next three demand might be (0, 14, 6), or (2, 3, 5), etc.

Statistical Bootstrapping and Monte Carlo Simulation 1

Figure 1: Example of demand scenarios generated by a simple bootstrap

 

Higher frequency operations such as daily forecasting bring with them more complex demand patterns, such as double seasonality (e.g., day-of-week and month-of-year) and/or trend. This challenged us to invent a new generation of bootstrapping algorithms. We recently won a US Patent for this breakthrough, but the essence is as described above.

Monte Carlo Simulation

Monte Carlo is famous for its casinos, which, like bootstrapping, invoke the idea of randomness. Monte Carlo methods go back a long way, but the modern impetus came with the need to do some hairy calculations about where neutrons would fly when an A-bomb explodes.

The essence of Monte Carlo analysis is this: “Our problem is too complicated to analyze with paper-and-pencil equations. So, let’s write a computer program that codes the individual steps of the process, put in the random elements (e.g., which way a neutron shoots away), wind it up and watch it go. Since there’s a lot of randomness, let’s run the program a zillion times and average the results.”

Applying this approach to inventory management, we have a different set of randomly occurring events: e.g., a demand of a given size arrives on a random day, a replenishment of a given size arrives after a random lead time, we cut a replenishment PO of a given size when stock drops to or below a given reorder point. We code the logic relating these events into a program. We feed it with a random demand sequence (see bootstrapping above), run the program for a while, say one year of daily operations, compute performance metrics like Fill Rate and Average On Hand inventory, and “toss the dice” by re-running the program many times and averaging the results of many simulated years. The result is a good estimate of what happens when we make key management decisions: “If we set the reorder point at 10 units and the order quantity at 15 units, we can expect to get a service level of 89% and an average on hand of 21 units.” What the simulation is doing for us is exposing the consequences of management decisions based on realistic demand scenarios and solid math. The guesswork is gone.

Figure 2 shows some of the inner workings of a Monte Carlo simulation of an inventory system in four panels. The system uses a Min/Max inventory control policy with Min=10 and Max=25. No backorders are allowed: you have the good or you lose the business. Replenishment lead times are usually 7 days but sometimes 14. This simulation ran for one year.

The first panel shows a complex random demand scenario in which there is no demand on weekends, but demand generally increases each day from Monday to Friday. The second panel shows the random number of units on hand, which ebbs and flows with each replenishment cycle. The third panel shows the random sizes and timings of replenishment orders coming in from the supplier. The final panel shows the unsatisfied demand that jeopardizes customer relationships. This kind of detail can be very useful for building insight into the dynamics of an inventory system.

Statistical Bootstrapping and Monte Carlo Simulation 2

Figure 2: Details of a Monte Carlo simulation

 

Figure 2 shows only one of the countless ways that the year could play out. Generally, we want to average the results of many simulated years. After all, nobody would flip a coin once to decide if it were a fair coin. Figure 3 shows how four key performance metrics (KPI’s) vary from year to year for this system. Some metrics are relatively stable across simulations (Fill Rate), but others show more relative variability (Operating Cost= Holding Cost + Ordering Cost + Shortage Cost). Eyeballing the plots, we can estimate that the choices of Min=10, Max=25 leads to an average Operating cost of around $3,000 per year, a Fill Rate of around 90%, a Service Level of around 75%, and an Average On Hand of about 10

Statistical Bootstrapping and Monte Carlo Simulation 3

Figure 3: Variation in KPI’s computed over 1,000 simulated years

 

In fact, it is now possible to answer a higher level of management question. We can go beyond “What will happen if I do such-and-such?” to “What is the best thing I can do to achieve a fill rate of at least 90% for this item at the lowest possible cost?” The mathemagic  behind this leap is yet another key technology called “stochastic optimization”, but we’ll stop here for now. Suffice it to say that Smart’s SIO&P software can search the “design space” of Min and Max values to automatically find the best choice.

 

How does your ERP system treat safety stock?

Is safety stock regarded as emergency spares or as a day-to-day buffer against spikes in demand? Knowing the difference and configuring your ERP properly will make a big difference to your bottom line.

The Safety Stock field in your ERP system can mean very different things depending on the configuration. Not understanding these differences and how they impact your bottom line is a common issue we’ve seen arise in implementations of our software.

Implementing inventory optimization software starts with new customers completing the technical implementation to get data flowing.  They then receive user training and spend weeks carefully configuring their initial safety stocks, reorder levels, and consensus demand forecasts with Smart IP&O.  The team becomes comfortable with Smart’s key performance predictions (KPPs) for service levels, ordering costs, and inventory on hand, all of which are forecasted using the new stocking policies.

But when they save the policies and forecasts to their ERP test system, sometimes the orders being suggested are far larger and more frequent than they expected, driving up projected inventory costs.

When this happens, the primary culprit is how the ERP is configured to treat safety stock.  Being aware of these configuration settings will help planning teams better set expectations and achieve the expected outcomes with less effort (and cause for alarm!).

Here are the three common examples of ERP safety stock configurations:

Configuration 1. Safety Stock is treated as emergency stock that can’t be consumed. If a breach of safety stock is predicted, the ERP system will force an expedite no matter the cost so the inventory on hand never falls below safety stock, even if a scheduled receipt is already on order and scheduled to arrive soon.

Configuration 2. Safety Stock is treated as Buffer stock that is designed to be consumed. The ERP system will place an order when a breach of safety stock is predicted but on hand inventory will be allowed to fall below the safety stock. The buffer stock protects against stockout during the resupply period (i.e., the lead time).

Configuration 3. Safety Stock is ignored by the system and treated as a visual planning aid or rule of thumb. It is ignored by supply planning calculations but used by the planner to help make manual assessments of when to order.

Note: We never recommend using the safety stock field as described in Configuration 3. In most cases, these configurations were not intended but result from years of improvisation that have led to using the ERP in a non-standard way.  Generally, these fields were designed to programmatically influence the replenishment calculations.  So, the focus of our conversation will be on Configurations 1 and 2. 

Forecasting and inventory optimization systems are designed to compute forecasts that will anticipate inventory draw down and then calculate safety stocks sufficient to protect against variability in demand and supply. This means that the safety stock is intended to be used as a protective buffer (Configuration 2) and not as emergency sparse (Configuration 3).  It is also important to understand that, by design, the safety stock will be consumed approximately 50% of the time.

Why 50%? Because actual orders will exceed an unbiased forecast half of the time. See the graphic below illustrating this.  A “good” forecast should yield the value that will come closest to the actual most often so actual demand will either be higher or lower without bias in either direction.

 

How does your ERP system treat safety stock 1

 

If you configured your ERP system to properly allow consumption of safety stock, then the on hand inventory might look like the graph below.  Note that some safety stock is consumed but avoided a stockout.  The service level you target when computing safety stock will dictate how often you stockout before the replenishment order arrives.  Average inventory is roughly 60 units over the time horizon in this scenario.

 

How does your ERP system treat safety stock 2

 

If your ERP system is configured to not allow consumption of safety stock and treats the quantity entered in the safety stock field more like emergency spares, then you will have a massive overstock!  Your inventory on hand would look like the graph below with orders being expedited as soon as a breach of safety stock is expected. Average inventory is roughly 90 units, a 50% increase compared to when you allowed safety stock to be consumed.

 

How does your ERP system treat safety stock 3