How much time should it take to compute statistical forecasts?
The top factors that impact the speed of your forecast engine 

How long should it take for a demand forecast to be computed using statistical methods?  This question is often asked by customers and prospects.  The answer truly depends.  Forecast results for a single item can be computed in the blink of an eye, in as little as a few hundredths of a second, but sometimes they may require as much as five seconds.  To understand the differences, it’s important to understand that there is more involved than grinding through the forecast arithmetic itself.   Here are six factors that influence the speed of your forecast engine.

1) Forecasting method.  Traditional time-series extrapolative techniques (such as exponential smoothing and moving average methods), when cleverly coded, are lighting fast.  For example, the Smart Forecast automatic forecasting engine that leverages these techniques and powers our demand planning and inventory optimization software can crank out statistical forecasts on 1,000 items in 1 second!  Extrapolative methods produce an expected forecast and a summary measure of forecast uncertainty. However, more complex models in our platform that generate probabilistic demand scenarios take much longer given the same computing resources.  This is partly because they create a much larger volume of output, usually thousands of plausible future demand sequences. More time, yes, but not time wasted, since these results are much more complete and form the basis for downstream optimization of inventory control parameters.

2) Computing resources.  The more resources you throw at the computation, the faster it will be.  However, resources cost money and it may not be economical to invest in these resources.  For example, to make certain types of machine learning-based forecasts work, the system will need to multi-thread computations across multiple servers to deliver results quickly.  So, make sure you understand the assumed compute resources and associated costs. Our computations happen on the Amazon Web Services cloud, so it is possible to pay for a great deal of parallel computation if desired.

3) Number of time-series.  Do you have to forecast only a few hundred items in a single location or many thousands of items across dozens of locations?  The greater the number of SKU x Location combinations, the greater the time required.  However, it is possible to trim the time to get demand forecasts by better demand classification.  For example, it is not important to forecast every single SKU x Location combination. Modern Demand Planning Software can first subset the data based on volume/frequency classifications before running the forecast engine.  We’ve observed situations where over one million SKU x Location combinations existed, but only ten percent had demand in the preceding twelve months.

4) Historical Bucketing.  Are you forecasting using daily, weekly, or monthly time buckets?  The more granular the bucketing, the more time it is going to take to compute statistical forecasts.  Many companies will wonder, “Why would anyone want to forecast on a daily basis?” However, state-of-the-art demand forecasting software can leverage daily data to detect simultaneous day-of-week and week-of-month patterns that would otherwise be obscured with traditional monthly demand buckets. And the speed of business continues to accelerate, threatening the competitive viability of the traditional monthly planning tempo.

5) Amount of History.  Are you limiting the model by only feeding it the most recent demand history, or are you feeding all available history to the demand forecasting software? The more history you feed the model, the more data must be analyzed and the longer it is going to take.

6) Additional analytical processing.  So far, we’ve imagined feeding items’ demand history in and getting forecasts out. But the process can also involve additional analytical steps that can improve results. Examples include:

a) Outlier detection and removal to minimize the distortion caused by one-off events like storm damage.

b) Machine learning that decides how much history should be used for each item by detecting regime change.

c) Causal modeling that identifies how changes in demand drivers (such as price, interest rate, customer sentiment, etc.) impact future demand.

d) Exception reporting that uses data analytics to identify unusual situations that merit further management review.

 

The Rest of the Story. It’s also critical to understand that the time to get an answer involves more than the speed of forecasting computations per se.  Data must be loaded into memory before computing can begin. Once the forecasts are computed, your browser must load the results so that they may be rendered on screen for you to interact with.  If you re-forecast a product, you may choose to save the results.  If you are working with product hierarchies (aggregating item forecasts up to product families, families up to product lines, etc.), the new forecast is going to impact the hierarchy, and everything must be reconciled.   All of this takes time.

Fast Enough for You? When you are evaluating software to see whether your need for speed will be satisfied, all of this can be tested as part of a proof of concept or trial offered by demand planning software solution providers.  Test it out, and make sure that the compute, load, and save times are acceptable given the volume of data and forecasting methods you want to use to support your process.

 

 

 

Do your statistical forecasts suffer from the wiggle effect?

 What is the wiggle effect? 

It’s when your statistical forecast incorrectly predicts the ups and downs observed in your demand history when there really isn’t a pattern.  It’s important to make sure your forecasts don’t wiggle unless there is a real pattern.

Here is a transcript from a recent customer where this issue was discussed:

Customer: “The forecast isn’t picking up on the patterns I see in the history.  Why not?” 

Smart:  “If you look closely, the ups and downs you see aren’t patterns.  It’s really noise.”  

Customer:  “But if we don’t predict the highs, we’ll stock out.”

Smart: “If the forecast were to ‘wiggle’ it would be much less accurate.  The system will forecast whatever pattern is evident, in this case a very slight uptrend.  We’ll buffer against the noise with safety stocks. The wiggles are used to set the safety stocks.”

Customer: “Ok. Makes sense now.” 

Do your statistical forecasts suffer from the wiggle effect graphic

The wiggle looks reassuring but, in this case, it is resulting in an incorrect demand forecast. The ups and downs aren’t really occurring at the same times each month.  A better statistical forecast is shown in light green.

 

 

5 Tips for Creating Smart Forecasts

In Smart Software’s forty-plus years of providing forecasting software, we’ve met many people who find themselves, perhaps surprisingly, becoming demand forecasters. This blog is aimed primarily at those fortunate individuals who are about to start this adventure (though seasoned pros may enjoy the refresher).

Welcome to the field! Good forecasting can make a big difference to your company’s performance, whether you are forecasting to support sales, marketing, production, inventory, or finance.

There is a lot of math and statistics underlying demand forecasting methods, so your assignment suggests that you are not one of those math-phobic people who would rather be poets. Luckily, if you are feeling a bit shaky and not yet healed from your high school geometry class, a lot of the math is built into forecasting software, so your first job is to leave the math for later while you get a view of the big picture. It is indeed a big picture, but let’s isolate few of the ideas that will most help you succeed.

 

  1. Demand Forecasting is a team sport. Even in a small company, the demand planner is part of a team, with some folks bringing the data, some bringing the tech, and some bringing the business judgment. In a well-run business, your job will never be to simply feed some data into a program and send out a forecast report. Many companies have adopted a process called Sales and Operations Planning (S&OP) in which your forecast will be used to kick off a meeting to make certain judgments (e.g., Should we assume this trend will continue? Will it be worse to under-forecast or over-forecast?) and to blend extra information into the final forecast (e.g., sales force input, business intelligence on competitors’ moves, promotions). The implication for you is that your skills at listening and communicating will be important to your success.

 

  1. Statistical Forecasting engines need good fuel. Historical data is the fuel used by statistical forecasting programs, so bad or missing or delayed data can degrade your work product. Your job will implicitly include a quality control aspect, and you must keep a keen eye on the data that are supplied to you. Along the way, it is a good idea to make the IT people your friends.

 

  1. Your name is on your forecasts. Like it or not, if I send forecasts up the chain of command, they get labeled as “Tom’s forecasts.” I must be prepared to own those numbers. To earn my seat at the table, I must be able to explain what data my forecasts were based on, how they were calculated, why I used Method A instead of Method B to do the calculations, and especially how firm or squishy they are. Here honesty is important. No forecast can reasonably be expected to be perfectly accurate, but not all managers can be expected to be perfectly reasonable. If you’re unlucky, your management will think that your reports of forecast uncertainty suggest either ignorance or incompetence. In truth, they indicate professionalism. I have no useful advice about how best to manage such managers, but I can warn you about them. It’s up to you to educate those who use your forecasts. The best managers will appreciate that.

 

  1. Leave your spreadsheets behind. It’s not uncommon for someone to be promoted to forecaster because they were great with Excel. Unless you are with an unusually small company, the scale of modern corporate forecasting overwhelms what you can handle with spreadsheets. The increasing speed of business compounds the problem: the sleepy tempo of annual and quarterly planning meetings is rapidly giving way to weekly or even daily re-forecasts as conditions change. So, be prepared to lean on a professional vendor of modern, scalable cloud-based demand planning and statistical forecasting software for training and support.

 

  1. Think visually. It will be very useful, both in deciding how to generate demand forecasts and in presenting them to management, so take advantage of the visualization capabilities built into forecasting software. As I noted above, in today’s high-frequency business world, the data you work with can change rapidly, so what you did last month may not be the right thing to do this month. Literally keep an eye on your data by making simple plots, like “timeplots” that show things like trend or seasonality or (especially) changes in trend or seasonality or anomalies that must be dealt with. Similarly, supplementing tables of forecasts with graphs comparing current forecasts to prior forecasts to actuals can be very helpful in an S&OP process. For example, timeplots showing past values, forecasted values, and “forecast intervals” indicating the objective uncertainty in the forecasts provide a solid basis for your team to fully appreciate the message in your forecasts.

 

That’s enough for now. As a person who’s taught in universities for half a century, I’m inclined to start into the statistical side of forecasting, but I’ll save that for another time. The five tips above should be helpful to you as you grow into a key part of your corporate planning team. Welcome to the game!

 

 

 

Supply Chain Math: Don’t Bring a Knife to a Gunfight

Whether you understand it in detail yourself or rely on trustworthy software, math is a fact of life for anyone in inventory management and demand forecasting who is hoping to remain competitive in the modern world.

At a conference recently, the lead presenter in an inventory management workshop proudly proclaimed that he had no need for “high-fallutin’ math”, which was explained to mean anything beyond sixth-grade math.

Math is not everyone’s first love. But if you really care about doing your job well, you can’t approach the work with a grade school mentality. Supply chain tasks like demand forecasting and inventory management are inherently mathematical. The blog associated with edX, a premier site for online college course material, has a great post on this topic, at https://www.mooc.org/blog/how-is-math-used-in-supply-chain. Let me quote the first bit:

Math and the supply chain go hand and hand. As supply chains grow, increasing complexity will drive companies to look for ways to manage large-scale decision-making. They can’t go back to how supply chains were 100 years ago—or even two years ago before the pandemic. Instead, new technologies will help streamline and manage the many moving parts. The logistics skills, optimization technologies, and organizational skills used in supply chain all require mathematics.

Our customers don’t need to be experts in supply chain math, they just need to be able to wield the software that contains the math. Software combines users’ experience and subject matter expertise to produce results that make the difference between success and failure. To do its job, the software can’t stop at sixth-grade math; it needs probability, statistics, and optimization theory.

It’s up to us software vendors to package the math in such a way that what goes into the calculations is all that is relevant, even if complicated; and that what comes out is clear, decision-relevant, and defensible when you must justify your recommendations to higher management.

Sixth-grade math can’t warn you when the way you propose to manage a critical spare part will mean a 70% chance of falling short of your item availability target. It can’t tell you how best to adjust your reorder points when a supplier calls and says, “We have a delivery problem.” It can’t save your skin when there is a surprisingly large order and you have to quickly figure out the best way to set up some expedited special orders without busting the operating budget.

So, respect the folk wisdom and don’t bring a knife to a gunfight.

 

 

Scenario-based Forecasting vs. Equations

Why Scenario-based planning helps planners better manage risk and create better outcomes.

If you are reading this, you are probably a supply chain professional with responsibilities for demand forecasting, inventory management or both. If you live in the 21st century, you use software of some kind to help you do your job. But what, fundamentally, does your software do for you?

Traditionally, software has served as a delivery vehicle for equations. Even if you decided early on in life that you and equations don’t get along, they can still do something for you, and you can live with them—provided some software keeps all that math at a safe distance away.

This is fine, as far as it goes. But we at Smart Software think you would do better by trading in your equations for scenarios. Most often, the point of an equation is to give “the answer”, typically in the form of a number, as in “next month’s demand for SKUxxx will be 105 units.” Results like these are helpful, but incomplete.

Forecasting can be thought of as a computing problem, but it is more helpful to think of it as an exercise in risk management. The equation’s forecast of 105 units does not include any indication of the uncertainty in the forecast, though there is always some. It does not help you think about plausible contingencies: what if demand is for more than 105 units? What if it’s for fewer than 105? Could it get as high as 130 or as low as 80? Is 80 even remotely likely?

This is where scenario-based analysis shows its advantage. One definition of “scenario” is “a postulated sequence of events.” Our definition is more extensive: a scenario is “a postulated sequence of events and their associated probabilities of happening.” Scenarios are the ultimate what-if planning tool. Forecasting by equation will predict a demand for 105 units. Scenario forecasting produces a bundle of possible demand figures, some more likely and others less so. If there are few or no scenarios as low as 80, you can let that contingency go.

Plus-or-Minus How Much?

Those who are better versed in equation-based forecasting might protest that equation-based software sometimes provides indications of the “plus or minus” of a forecast, complete with a bell-shaped curve indicating the relative likelihood of various contingencies. However, when you see a perfect bell-shaped distribution, you know you are being asked to rely on a theoretical assumption that is only sometimes valid.

Scenario forecasts do not rely on that assumption.  In fact, they need not rely on any pre-conceived mathematical assumption whose main selling point is that it simplifies analysis. You don’t need a simplified analysis–you need a realistic analysis based on facts.

Cutting-edge software produces scenario forecasts, not just for demand planning but also for inventory management. Demand is a key input to inventory software, along with supplier behavior as reflected in replenishment lead times. Both demand and supply need to be forecasted if you want to see the consequences of, for instance, choosing a reorder point of 15 and an order quantity of 25.

Inventory systems are what is called “path sensitive”, meaning that any particular sequence of demand values will yield different performance than the same demand values in a different order. For example, if all your highest demand periods come bunched up, one after another, you’ll have much more difficulty keeping stocked than if the same high demand periods are spaced apart with time to restock in between. Scenarios reflect these differences in sufficient detail to yield average performance metrics reflective of the various contingencies inherent in uncertain demand.

Figure 1 illustrates the difference between an equation-based forecast and forecast scenarios.  The green cells hold 10 months of demand for a spare part. The blue cells hold an equation-based forecast that calls for average demand of 1.5 units in months 11, 12 and 13. The pistachio-colored cells hold eight scenario forecasts, though in practice our software would generate tens of thousands of scenarios. Now, the scenarios also average out to 1.5 units per month, but they go further and display the wide variety of ways that the next three months could play out. For instance, reading vertically, the monthly demand could range from 0 to 3. Reading horizontally, the three-month totals could range from 0 to 6, compared to the equation-based estimate of 4.5. Continuing with this toy example, if you have 5 units on hand and the replenishment lead time is greater than 3 months, the equation-based model says you will be ok over the next 3 months, but the scenario-based results say you have 1 chance in 8 (12.5%) chance of stocking out. Equivalently, you have an 87.5% service level. If the part is critical and you are aiming for a 95% service level, you are at risk of missing your item availability goal.

Scenario based Forecasting vs Equations hd2

Figure 1: Comparing equation-based and scenario-based forecasts

 

Summary

Remember, equation-based forecasting gives you information, but shallow information. Scenario-based forecasting can tell you not just what result is most likely but also how reliable any of a variety of predictions are—and this allows you to bring your judgment to bear on balancing risk and stocking expenses—all automated to scale to a vast catalog of items.

 

Top Five Tips for New Demand Planners and Forecasters

In Smart Software’s forty-plus years of providing forecasting software, we’ve met many people who find themselves, perhaps surprisingly, becoming demand forecasters. This blog is aimed primarily at those fortunate individuals who are about to start this adventure (though seasoned pros may enjoy the refresher).

Welcome to the field! Good forecasting can make a big difference to your company’s performance, whether you are forecasting to support sales, marketing, production, inventory, or finance.

There is a lot of math and statistics underlying demand forecasting methods, so your assignment suggests that you are not one of those math-phobic people who would rather be poets. Luckily, if you are feeling a bit shaky and not yet healed from your high school geometry class, a lot of the math is built into forecasting software, so your first job is to leave the math for later while you get a view of the big picture. It is indeed a big picture, but let’s isolate few of the ideas that will most help you succeed.

 

  1. Demand Forecasting is a team sport. Even in a small company, the demand planner is part of a team, with some folks bringing the data, some bringing the tech, and some bringing the business judgment. In a well-run business, your job will never be to simply feed some data into a program and send out a forecast report. Many companies have adopted a process called Sales and Operations Planning (S&OP) in which your forecast will be used to kick off a meeting to make certain judgments (e.g., Should we assume this trend will continue? Will it be worse to under-forecast or over-forecast?) and to blend extra information into the final forecast (e.g., sales force input, business intelligence on competitors’ moves, promotions). The implication for you is that your skills at listening and communicating will be important to your success.

 

  1. Statistical Forecasting engines need good fuel. Historical data is the fuel used by statistical forecasting programs, so bad or missing or delayed data can degrade your work product. Your job will implicitly include a quality control aspect, and you must keep a keen eye on the data that are supplied to you. Along the way, it is a good idea to make the IT people your friends.

 

  1. Your name is on your forecasts. Like it or not, if I send forecasts up the chain of command, they get labeled as “Tom’s forecasts.” I must be prepared to own those numbers. To earn my seat at the table, I must be able to explain what data my forecasts were based on, how they were calculated, why I used Method A instead of Method B to do the calculations, and especially how firm or squishy they are. Here honesty is important. No forecast can reasonably be expected to be perfectly accurate, but not all managers can be expected to be perfectly reasonable. If you’re unlucky, your management will think that your reports of forecast uncertainty suggest either ignorance or incompetence. In truth, they indicate professionalism. I have no useful advice about how best to manage such managers, but I can warn you about them. It’s up to you to educate those who use your forecasts. The best managers will appreciate that.

 

  1. Leave your spreadsheets behind. It’s not uncommon for someone to be promoted to forecaster because they were great with Excel. Unless you are with an unusually small company, the scale of modern corporate forecasting overwhelms what you can handle with spreadsheets. The increasing speed of business compounds the problem: the sleepy tempo of annual and quarterly planning meetings is rapidly giving way to weekly or even daily re-forecasts as conditions change. So, be prepared to lean on a professional vendor of modern, scalable cloud-based demand planning and statistical forecasting software for training and support.

 

  1. Think visually. It will be very useful, both in deciding how to generate demand forecasts and in presenting them to management, so take advantage of the visualization capabilities built into forecasting software. As I noted above, in today’s high-frequency business world, the data you work with can change rapidly, so what you did last month may not be the right thing to do this month. Literally keep an eye on your data by making simple plots, like “timeplots” that show things like trend or seasonality or (especially) changes in trend or seasonality or anomalies that must be dealt with. Similarly, supplementing tables of forecasts with graphs comparing current forecasts to prior forecasts to actuals can be very helpful in an S&OP process. For example, timeplots showing past values, forecasted values, and “forecast intervals” indicating the objective uncertainty in the forecasts provide a solid basis for your team to fully appreciate the message in your forecasts.

 

That’s enough for now. As a person who’s taught in universities for half a century, I’m inclined to start into the statistical side of forecasting, but I’ll save that for another time. The five tips above should be helpful to you as you grow into a key part of your corporate planning team. Welcome to the game!