Unit 2 / 11

Demand Forecasting: Sales Forecast, Seasonality and Trend Analysis

Gains:

  • Ability to produce a draft demand forecast on an SKU basis with artificial intelligence support by combining historical sales data, seasonal effects and external factors.
  • Ability to interpret forecast accuracy (MAPE, bias) and distinguish the business consequences of overestimation and underestimation
  • Being able to maintain that the forecast produced by artificial intelligence is a prediction and the final order decision belongs to the manager together with the stock cost and cash flow.

There are two most expensive mistakes in retail: keeping too much stock and letting the money languish on the shelf, or not keeping enough stock and leaving the customer empty-handed. Both have the same source: bad demand forecasting. In this unit you will learn how to use artificial intelligence as a powerful assistant that predicts the future from past sales. But let's say from the beginning: a prediction is not a prophecy, but a probabilistic prediction. AI gives you a number; It's your job to translate that number into an ordering decision.

Demand forecasting: It is the task of predicting how much of a product or category will be sold in the future by looking at historical data and influencing factors.

SKU (Stock Keeping Unit): It is the unique stock code kept for each different product-variant. For example, “red, size 42 sneakers” is a SKU; number 43 of the same model is a separate SKU.

Three sources of information that feed the forecast

A good forecast combines three things:

  1. Historical sales (baseline): Weekly/monthly sales of the product over the last 12-24 months. The AI ​​extracts a "normal" level from this series.
  2. Seasonal and calendar effects: Holidays, school term, summer-winter, weekend, payday. For example, ice cream increases in summer and socks increase in winter.
  3. External factors: Campaign, price change, weather, competitor movement, opening/closing. These push the estimate up or down.
Tip: Don't just tell the AI ​​"we sold 100 last month." Say, "We sold 100 last month, but there was a 20% discount and it was a holiday week." Without context, prediction is misleading.

Step by step prediction generation

  1. Prepare the data: An anonymous, clean table: date, SKU, quantity sold, price, promotion/no promotion, availability. Mark the days of out-of-stock; Otherwise, artificial intelligence will think that day is "low demand".
  2. Give context: Write down the season, upcoming events, planned campaigns.
  3. Request a forecast: Request a forecast and a confidence interval (worst/best case scenario) for a specific period, by SKU or category.
  4. Measure accuracy: Compare your past predictions to reality (MAPE below).
  5. Turn it into a decision: Combine the estimate with safety stock and budget and make the ordering decision.

Reading forecast accuracy: MAPE and bias

MAPE (Mean Absolute Percent Error): Shows the average percentage deviation of forecasts from actual sales. The formula is simply: |actual − forecast| for each period / real is their average.

  • MAPE 10% → estimates deviate by 10% on average, pretty good.
  • MAPE 40% → forecasts are unreliable, more buffer (safety stock) is needed in order decision.

Direction (bias): Is your forecast consistently above (risk of overstocking) or below (risk of stocking out) the reality? Watch this also; MAPE does not show direction.

Status

Meaning

business result

Persistent high estimate

You are exaggerating the demand

Excess stock, meltdown, loss of margin

Persistent underestimation

You underestimate the demand

Out of stock, missed sales, dissatisfaction

High MAPE, balanced direction

Uncertainty is high

Increase safety stock, review frequently

Low MAPE

accurate prediction

Leaner stock, better cash

mini cases

Case 1 — Missing seasonality: A grocery store orders school notebooks based on last year's July sales (200 units per month). When the artificial intelligence is given the context of "August-September school term, sales quadrupled in this period last year", the prediction increases to 780 units instead of 200. Thanks to the correct order, you do not run out of stock during the school year; The estimated turnover of 60,000 TL, which escaped the previous year, is being caught this year.

Case 2 — Not counting the out of stock day: A store was out of stock of a popular coffee for 3 weeks. Looking at the raw data, artificial intelligence sees those weeks as "5 sales per week" and gives a low estimate. When the analyst marks the days without stock and says "these weeks do not reflect the demand", the forecast increases to 45 per week. Real demand emerges.

Case 3 — Generalizing the campaign effect: A textile chain considers a 50% discount week sale (600 units) as "normal" and constantly orders 600. When the artificial intelligence is told "this sale was made with a one-time campaign, normal week is 180", the prediction is corrected. The risk of overstock and subsequent markdown loss is prevented.

Prediction horizon: how far ahead can you see?

Forecast horizon: How far into the future the forecast is made. The rule is simple: the longer the horizon, the greater the uncertainty. You predict next week's sales relatively accurately; six months later with a much wider range. So choose the forecast horizon according to the need of order decision: short horizon and frequent update for fresh product that runs out fast; Longer horizon and wider margin of safety for imported product with long lead times.

Another important distinction is new product forecasting. There is no past sale of a new SKU; in this case, you give the AI ​​the history of similar products (analogue), the category average, and the launch plan. Saying "This product has no history; give an initial estimate by looking at the first 8 weeks of similar products X and Y" is a reasonable way to fill in the blank. However, new product forecasting is always riskier; Quickly revise the forecast as actual data for the first weeks becomes available.

Caution: Don't treat the estimate as a "do it once and forget it" treatment. Demand forecasting is a live process; Every new sales week is an opportunity to update the forecast. The best forecasters are those who use the one that updates most frequently, not the smartest model.

Weak prompt / Strong prompt

Weak prompt:

Tell me how much this product will sell next month.

There is no context; AI makes up a random number.

Powerful prompt:

Your role: demand planning specialist. Data: Below are the monthly sales quantity and price for the last 18 months for SKU 4471 and whether there is a campaign that month. Context: This product is summer sandals; Demand peaks in May-August. Next month is June. There is no campaign planned. Price is fixed.Task: (1) expected sales quantity for June, (2) worst and best scenario range, (3) 2 main factors affecting the forecast.Rule: Do not count months marked as out of stock as low demand.Based only on the given data.Data: [paste table]

Copiable prompt templates

1) SKU based prediction

Your role: demand planning specialist. Generate future [period] forecast for [SKU] from the following anonymous monthly sales series. Output: expected quantity + worst/best range + 2 assumptions. Exclude periods marked out of stock. Data: [paste]

2) Seasonal pattern removal

Find the recurring seasonal pattern in the 24-month sales series below. Which months are the top and which months are the bottom? Give the deviation from the mean as a percentage. Present it in table form. Data: [paste]

3) Prediction accuracy evaluation

Below are my historical estimates and actual sales. (1) Calculate MAPE, (2) is my forecast consistently drifting higher or lower, (3) what does this mean for the stock? Show step by step.Data: [estimate, actual columns]

4) Extract campaign impact

Campaign weeks are marked in the sales series below. Estimate normal (non-campaign) demand; Give the campaign effect as a separate lift percentage. So I want to see the normal order level. Data: [paste]

Common mistakes

  • Not giving context: If the campaign, season, price change is not specified, the prediction will be misleading.
  • Whether to count out-of-stock days as demand: A out-of-stock period hides real demand; mark.
  • Accepting promotional sales as normal: Thinking that a one-time increase is permanent will lead to excess stock.
  • Relying on a single number: Not wanting a range (scenario) and relying on a single point hides the risk.
  • Not measuring accuracy at all: If MAPE and direction are not monitored, the prediction gets worse and worse.
  • Making direct orders with estimates: Ordering without cash, warehouse and shelf life control.

In summary

Good forecasting combines past sales, seasonality and external factors. Be sure to give the AI ​​the context (campaign, season, out-of-stock days). Monitor forecast accuracy with MAPE and bias direction; Increase safety stock in high uncertainty. A prediction is a prediction; The final ordering decision is yours, along with budget and constraints.

Application task

Get the sales of your top 5 best-selling SKUs for the last 12-18 months in an anonymous table and mark the out-of-stock and campaign periods. Generate a future forecast with the "1) SKU-based forecast" prompt, then extract the MAPE of your past forecasts with "3) Forecast accuracy evaluation". Compare the result with your own ordering decision.

checklist

  • [ ] I anonymized and cleaned my sales data.
  • [ ] I marked the out-of-stock and campaign periods.
  • [ ] I gave the season and external factor context to the AI.
  • [ ] I wanted a scenario range, not a single number.
  • [ ] I checked MAPE and yaw direction.
  • [ ] I made the ordering decision based on budget and constraints.