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.

 

What is “A Good Forecast”

The Smart Forecaster

Pursuing best practices in demand planning,

forecasting and inventory optimization

Tremendous cost-saving efficiencies can result from optimizing inventory stocking levels using the best predictions of future demand. Familiarity with forecasting basics is an important part of being effective with the software tools designed to exploit this efficiency. This concise introduction (the first in a short series of blog posts) offers the busy professional a primer in the basic ideas you need to bring to bear on forecasting. How do you evaluate your forecasting efforts, and how reliable are the results?

A good forecast is “unbiased.” It correctly captures predictable structure in the demand history, including: trend (a regular increase or decrease in demand); seasonality (cyclical variation); special events (e.g. sales promotions) that could impact demand or have a cannibalization effect on other items; and other, macroeconomic events.

By “unbiased,” we mean that the estimated forecast is not projecting too high or too low; the actual demand is equally likely to be above or below predicted demand. Think of the forecast as your best guess of what could happen in the future. If that forecast is “unbiased,” the overall picture will show that measures of actual future demand will “bracket” the forecasts—distributed in balance above and below predictions by the equal odds.

You can think of this as if you are an artillery officer and your job is to destroy a target with your cannon. You aim your cannon (“the forecast”) and then shoot and watch the shells fall. If you aimed the cannon correctly (producing an “unbiased” forecast), those shells will “bracket” the target; some shells will fall in front and some shells fall behind, but some shells will hit the target. The falling shells can be thought of as the “actual demand” that will occur in the future. If you forecasted well (aimed your cannon well), then those actuals will bracket the forecasts, falling equally above and below the forecast.

Once you have obtained an “unbiased” forecast (in other words, you aimed your cannon correctly), the question is: how accurate was your forecast? Using the artillery example, how wide is the range around the target in which your shells are falling? You want to have as narrow a range as possible. A good forecast will be one with the minimal possible “spread” around the target.

However, just because the actuals are falling widely around the forecast does not mean you have a bad forecast. It may merely indicate that you have very “volatile” demand history. Again, using the artillery example, if you are starting to shoot in a hurricane, you should expect the shells to fall around the target with a wide error.

Your goal is to obtain as accurate a forecast as is possible with the data you have. If that data is very volatile (you’re shooting in a hurricane), then you should expect a large error. If your data is stable, then you should expect a small error and your actuals will fall close to the forecast—you’re shooting on a clear day!

So that you can understand both the usefulness of your forecasts and the degree of caution appropriate when applying them, you need to be able to review and measure how well your forecast is doing. How well is it estimating what actually occurs? SmartForecasts does this automatically by running its “sliding simulation” through the history. It simulates “forecasts” that could have occurred in the past. An older part of the history, without the most recent numbers, is isolated and used to build forecasts. Because these forecasts then “predict” what might happen in the more recent past—a period for which you already have actual demand data—the forecasts can be compared to the real recent history.

In this manner, SmartForecasts can empirically compute the actual forecast error—and those errors are needed to properly estimate safety stock. Safety stock is the amount of extra stock you need to carry in order to account for the anticipated error in your forecasts. In a subsequent essay, I’ll discuss how we use our estimated forecasts error (via the SmartForecasts sliding simulation) to correctly estimate safety stocks.

Nelson Hartunian, PhD, co-founded Smart Software, formerly served as President, and currently oversees it as Chairman of the Board. He has, at various times, headed software development, sales and customer service.

Leave a Comment

Related Posts

Confused about AI and Machine Learning?

Confused about AI and Machine Learning?

Are you confused about what is AI and what is machine learning? Are you unsure why knowing more will help you with your job in inventory planning? Don’t despair. You’ll be ok, and we’ll show you how some of whatever-it-is can be useful.

How to Forecast Inventory Requirements

How to Forecast Inventory Requirements

Forecasting inventory requirements is a specialized variant of forecasting that focuses on the high end of the range of possible future demand. Traditional methods often rely on bell-shaped demand curves, but this isn’t always accurate. In this article, we delve into the complexities of this practice, especially when dealing with intermittent demand.

Six Demand Planning Best Practices You Should Think Twice About

Six Demand Planning Best Practices You Should Think Twice About

Every field, including forecasting, accumulates folk wisdom that eventually starts masquerading as “best practices.” These best practices are often wise, at least in part, but they often lack context and may not be appropriate for certain customers, industries, or business situations. There is often a catch, a “Yes, but”. This note is about six usually true forecasting precepts that nevertheless do have their caveats.

Recent Posts

  • What is Inventory Control Planning Management Optimization DictionaryWhat is Inventory Planning? A Brief Dictionary of Inventory-Related Terms
    People involved in the supply chain are likely to have questions about various inventory terms and methods used in their jobs. This note may help by explaining these terms and showing how they relate. […]
  • artificial intelligence ai and machine learning inventory managementConfused about AI and Machine Learning?
    Are you confused about what is AI and what is machine learning? Are you unsure why knowing more will help you with your job in inventory planning? Don’t despair. You’ll be ok, and we’ll show you how some of whatever-it-is can be useful. […]
  • Centering Act Spare Parts Timing Pricing and ReliabilityCentering Act: Spare Parts Timing, Pricing, and Reliability
    In this article, we'll walk you through the process of crafting a spare parts inventory plan that prioritizes availability metrics such as service levels and fill rates while ensuring cost efficiency. We'll focus on an approach to inventory planning called Service Level-Driven Inventory Optimization. Next, we'll discuss how to determine what parts you should include in your inventory and those that might not be necessary. Lastly, we'll explore ways to enhance your service-level-driven inventory plan consistently. […]
  • Balance,Concept,With,Chrome,Balls,inventory optimization softwareHow to Forecast Inventory Requirements
    Forecasting inventory requirements is a specialized variant of forecasting that focuses on the high end of the range of possible future demand. Traditional methods often rely on bell-shaped demand curves, but this isn't always accurate. In this article, we delve into the complexities of this practice, especially when dealing with intermittent demand. […]
  • Demand Planning twin brothers holding forecasting toolsSix Demand Planning Best Practices You Should Think Twice About
    Every field, including forecasting, accumulates folk wisdom that eventually starts masquerading as “best practices.” These best practices are often wise, at least in part, but they often lack context and may not be appropriate for certain customers, industries, or business situations. There is often a catch, a “Yes, but”. This note is about six usually true forecasting precepts that nevertheless do have their caveats. […]

    Inventory Optimization for Manufacturers, Distributors, and MRO

    • Centering Act Spare Parts Timing Pricing and ReliabilityCentering Act: Spare Parts Timing, Pricing, and Reliability
      In this article, we'll walk you through the process of crafting a spare parts inventory plan that prioritizes availability metrics such as service levels and fill rates while ensuring cost efficiency. We'll focus on an approach to inventory planning called Service Level-Driven Inventory Optimization. Next, we'll discuss how to determine what parts you should include in your inventory and those that might not be necessary. Lastly, we'll explore ways to enhance your service-level-driven inventory plan consistently. […]
    • 5 Steps to Improve the Financial Impact of Spare Parts Planning5 Steps to Improve the Financial Impact of Spare Parts Planning
      In today’s competitive business landscape, companies are constantly seeking ways to improve their operational efficiency and drive increased revenue. Optimizing service parts management is an often-overlooked aspect that can have a significant financial impact. Companies can improve overall efficiency and generate significant financial returns by effectively managing spare parts inventory. This article will explore the economic implications of optimized service parts management and how investing in Inventory Optimization and Demand Planning Software can provide a competitive advantage. […]
    • Bottom Line strategies for Spare Parts Planning SoftwareBottom Line Strategies for Spare Parts Planning
      Managing spare parts presents numerous challenges, such as unexpected breakdowns, changing schedules, and inconsistent demand patterns. Traditional forecasting methods and manual approaches are ineffective in dealing with these complexities. To overcome these challenges, this blog outlines key strategies that prioritize service levels, utilize probabilistic methods to calculate reorder points, regularly adjust stocking policies, and implement a dedicated planning process to avoid excessive inventory. Explore these strategies to optimize spare parts inventory and improve operational efficiency. […]
    • professional technician engineer planning spare parts in industrial manufacturing factory,Prepare your spare parts planning for unexpected shocks
      In today's unpredictable business climate, we do have to worry about supply chain disruptions, long lead times, rising interest rates, and volatile demand. With all these challenges, it's never been more vital for organizations to accurately forecast parts usage, stocking levels, and to optimize replenishment policies such as reorder points, safety stocks, and order quantities. In this blog, we'll explore how companies can leverage innovative solutions like inventory optimization and parts forecasting software that utilize machine learning algorithms, probabilistic forecasting, and analytics to stay ahead of the curve and protect their supply chains from unexpected shocks. […]