Building a differentiated, machine-first demand forecasting engine

Savitha Nallasamy
8 min readSep 25, 2022

--

A highly automated, reliable, accurate machine forecast is a great starting point for a best-in-class demand planning software.

Demand Forecast is about accurately predicting what the customer demand is, at a time and specific location. A good forecast engine is the starting point for a reliable, well automated forecast.

To put forecast management complexity in perspective, in a typical retail company, there are 90–150 million SKUs that are forecasted weekly. These forecasts are created for a diverse set of products — some that sell 100 units a week and some that sell 1 a month, some that sell only 12 weeks in a year and others that sell throughout the year, some that are priced $1000 a piece and others that are priced 10 cents, some that have to be ordered 6 weeks and others 6 months in advance, some that are trending and others that are phasing out. The scenarios are endless.

The sheer diversity of the type of products forecasted, factors that influence the forecast, ever changing customer behavior combined with macroeconomic trends — all make forecasting one of the most complex problems.

In 100 billion+ retail companies, there are roughly 30–50 demand planners managing 90–150 million SKUs. That translates to a single human having responsibility for 3 million forecasts! Also, typically 60% of forecasts are touched by a demand planner and that is still millions of forecasts. Also, the type/number of data inputs the traditional forecast models can handle are very limited having the planner to hand key and/or change a lot of forecast numbers.

The scale and complexity of the forecasting problem makes it the best case for data science. Also, the application of AI/ML, neural network models supports handling different types of structured and unstructured data, enables understanding interactivity between these inputs and the eventual influence on customer demand. Hence, the goal of the machine forecast (demand forecast engine) should be to maximize the number of perfect forecasts leaving very little outliers for the demand planner(human) to correct.

Here is a checklist of key things for a forecast engine for retail:

  • Leverage an ecosystem of diverse set of algorithms from simple mathematical models to neural networks: Each algorithm might be designed for a specific purpose, some do very well on fast movers and others on slow movers, some might work for intermittent demand and others for regular demand, some for seasonal products and others for regular sellers. The complex models do a great job in predicting demand where there are many influencing variables with complex relationships amongst themselves. A good ecosystem encourages the addition of both simple (even the weighted average) models as well as complex ones and lets the model selection mechanism decide which model to pick. Openness, by design, to add a new algorithm/model should considered as well.
  • Built on a sophisticated ensembler ecosystem: A well designed ensembler is one of the most critical and differentiating pieces of a great machine forecast. The ensembler determines which forecast/algorithm would be picked as the choice for a specific product’s forecast. Another thing to keep in mind is the cadence (when and how often) in which switching models could happen. Additional rules are needed to make sure that forecasts for a specific location or product hierarchy are coherent. and something that will need the most brainstorming with the consumers/users of the forecast.
  • Models are self monitoring and set for constant tuning. A great machine forecast is built on a foundation of sophisticated model monitoring. Automated model monitoring is important to make sure model fitment or deterioration is on constant watch. A specific trend in social media about a DIY product can make sales to be 10X the prior year’s trend. The retailer who picks this trend up quickly (either from social media data or from a vendor input or a demand planner) and reacts to it is the one to capture the market Other examples are models that work pre-season might not work for post-season, the factors that influence demand for a trending product line also change over time.
  • Built for scale and efficiency. An accurate forecast is not just enough. The forecast run time should be “reasonable”. While adding processing infrastructure is an easy way to speed up run time, there are other ways like batching and sequencing products and/or locations. For instance, in scenarios where forecasts are refreshed Saturday weekly, waiting for end of Friday for the entire week’s sales history to be available might not be needed for all items. 60–70% items might qualify for “part one “ of the weekly forecast run just with sales until Thursday. Having such options configurable and change-able saves forecast run time.
  • Automates ingestion of all direct and indirect external demand influencers as an input to the forecast engine. Examples are retail price, planned promotions, holidays, in-store events, media ads, store flier promotions, newspaper ads, competitor location, competitor prices, infrastructure development in the region, Macro-economic trends, traffic patterns, local community/cultural/sports/school events, local weather, hurricane and tornado impacted areas, commodity prices/locations/promotions, any social media trends related to the product/category/related categories.
  • Designed to produce a forecast that is reflective of total demand and assuming “sufficient” product availability. Historic sales numbers might be impacted from low instock or zero in-stock days. Ex. There might be no sales record for a series of weeks the product was not instock for the customer. Forecast engine should be able to account for such scenarios, auto-correct the historical sales numbers and project a total demand assuming “sufficient” product availability in the future for the customers.
  • Constantly looks to add additional, relevant inputs to the forecast model, constantly readjusts them for relevance and fitment. As more and more data is digitized, the list of inputs increases and evolves. A specific DIY craft trend on social media can trigger the sales of a slow of art and/or paint product
  • Standardized data pipelines: There are scenarios where multiple forecast engines might be in use for an evaluation period of years. It is critical to make sure that all forecast engines are set to use standardized data pipeline inputs. For instance, the sales and pricing data that feeds all forecast engines should be exactly the same.
  • Continuous learning, recalibration from human feedback and from historical forecast metrics. The model needs to take humans’ input on how each factor should be adjusted differently, how each input should be weighted differently, whether an input should be considered or ignored, which period of history to be treated differently or ignored.
  • Able to identify forecasts of significant “machine forecast potential”. Certain items are forecastable and the others are challenging. Being intentional about accuracy improvements (thro modelling) where possible and being able to call out the ones that need human intervention is critical
  • A good forecast is explainable. A well explained forecast indicates what part of the demand is from regular demand, what is contributed by weather, competitor, pricing changes, markdown, beginning of season, end of season , any other factors.
  • A forecast that can breakdown the forecast number into parts Ex. Repeat demand vs one time demand. Ability to breakdown the total demand into multiple components is critical to drive many downstream supplychain planning decisions, the simplest one being repeat demand vs one time demand . In most retail companies, Promo demand is positioned in stores ahead of time. In cases of new or strategic products, or seasonal products there is an initial one-time buy (to get the product pre-positioned) vs regular fulfillment. For seasonal product, a percentage of total season demand is bought ahead of the actual demand week. Forecast variance of repeat demand, for instance, might drives safety stock decisions, and a promo-influenced forecast drives promo ordering and promo planning.
  • A mature forecast engine senses a product’s lifestage as well as react to the life stage accordingly. Example Strategic new product introductions are most often accompanied with a “stock more than demand” strategy , In the regular/standard selling period, the expectation is to react to price, markdown and competitor strategies. Similarly for seasonal products it is important to understand the Pre-Season (Inventory Build up), In Season, End of Season inventory planning needs.
  • A good model provides qualifying confidence indicators along with a forecast number: A good forecast is not one number, It would additionally have qualifying data to indicate confidence in the forecast and an indicator of variability of forecast (over a period of time)— The confidence and the variability will direct which SKU ordering can be fully automated, semi-automated, and which ones should be manually planned. Additionally, the confidence and the variability of the forecast are what should drive safety stock decisions. (Safety stock decisions also account for supply variability, lead time variability, and ordering frequencies).
  • A good engine produces a whole number forecast that is actionable Wherever forecasts are less than a whole unit, a good forecast spits out an integer forecast. Sometimes, probablistic techniques are in use for this purpose. Ex. if a weekly forecast for an item is 0.2 units, it cannot be ordered or replenished.
  • Between the forecast engine and the demand planning software, there needs to be an understanding of the desired inventory targets/service levels. The solution must be able to map business strategies as target optimization parameters. Ex. 98% instock for A and B items, 95% for C and D items. Another example is to keep the forecast bias to +10% during the Thanksgiving season and change the bias close to 0% during mid-late January.
  • Single source of all forecasts for the enterprise and support multiple use cases, maturing companies to make decisions using the same source of forecast Ex. Unit forecast for inventory planning, $ forecast for financial planning, DC forecast (units, cube, weight) to support DC planning, Trailer forecast for inbound and outbound planning.
  • A forecast that caters to inventory fulfillment strategies: Forecast by Demand types/Fulfillment modes: More so for brick-and-mortar companies, being able to segregate the demand based on fulfillment modes is critical to plan upstream, especially if different. Ex. Pick up in-store demand, Deliver direct demand. This is more important when the same node services multiple demand types or fulfillment types. At many retailers, select regional DCs had a separate physical area where inventory needed to support online orders. There were select stores where the backroom was converted to support grocery online orders and this needed that the demand needed to be predicted separately, the inventory needs to be stocked and/or reserved separately from the inventory needed to support online orders. Another scenario is the need to rollup demand at upstream node Ex. In home improvement retailer, high cube items like appliances, trees are ordered into and held at a special upstream DC set up to handle bulky items. The special, upstream DC then distributes products to stores and acts as a fulfillment Center for customer direct shipping.
  • Allows real time “what-if”: Many times, there are “special” scenarios where a forecast plays a vital role in formulating strategies. For instance, In a brick-and-mortar environment, the store is where the sales is. If a DC fills up on storage capacity, there is most likely a decision to “push” or clear inventory for select items from a DC. In many retail companies, this kind of decision on which location to push is highly manual leading to products being pushed to locations that can sell

Related Stories

--

--

Savitha Nallasamy

Aspiring Writer , Product Manager by Profession, Mom, Living life on purpose, Spread goodness