# Forecasting demand and optimizing assortment by store cluster
A store in coastal Florida and a store in suburban Minnesota carry the same logo, the same corporate planogram, and often the same winter jacket order. One sells out of umbrellas in July. The other has snow shovels stacked in the back through May. Both leave money on the table.
This is the core tension in retail: a national buying decision meets thousands of hyperlocal demand realities. Data lets you close that gap, not perfectly, but enough to matter.
Every assortment decision is a bet against two opposite failures.
Lost sales (stockouts): a customer wants the product, the shelf is empty, they walk (or buy from a competitor). You never see this sale, which makes it invisible in your reports. That is what makes it dangerous.
Markdown-bound overstock: you bought too much, it did not sell, and now you cut the price to clear it. The markdown (a permanent price reduction to move inventory) eats your margin and often your storage space.
Good forecasting is the art of sitting between these two. You will never eliminate both. The goal is to minimize the total cost of being wrong.
A single chain-wide forecast for a SKU (Stock Keeping Unit, the unique code for one specific product variant, like "men's fleece, navy, size L") assumes every store faces the same demand. They do not.
Demand at a given store is shaped by:
Forecasting each of thousands of stores individually is expensive and noisy. Forecasting the whole chain is cheap but wrong. The practical middle ground is store clustering.
Clustering groups stores that behave similarly, so you can forecast and assort for a handful of clusters instead of thousands of stores.
You do not cluster on geography alone. A downtown store in Chicago may behave more like a downtown store in Denver than like a suburban store 20 miles away. Common clustering inputs:
Free, high-quality demographic data for U.S. trade areas is available from the U.S. Census Bureau's data portal, which many retailers use as a starting layer before adding purchased datasets.
Here is the shape of a simple clustering step using sales and demographic features:
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import KMeans
# features: one row per store
# e.g., pct_sales_outdoor, pct_sales_baby, median_income,
# avg_summer_temp, store_sqft
X = store_features[feature_cols]
X_scaled = StandardScaler().fit_transform(X) # scale so no feature dominates
km = KMeans(n_clusters=8, random_state=42)
store_features["cluster"] = km.fit_predict(X_scaled)Eight clusters is illustrative, not a rule. You want few enough clusters to manage, but enough to capture real differences. Retailers often land somewhere between 5 and 20, then name them in plain language: "urban young professional," "family suburban," "rural value," "tourist seasonal."
The point of a name is action. A buyer can reason about "tourist seasonal" stores. Nobody can reason about "cluster 6."
Once stores are clustered, you forecast demand at the cluster and SKU level. A modern approach layers several signal types.
Start with what the SKU (or a similar SKU) did last year in that cluster, adjusted for the calendar. This captures the recurring rhythm: the sunscreen curve, the holiday spike.
For genuinely new products with no history, you borrow the curve from a comparable product (a like item or attribute-based analog) and scale it.
Weather is one of the highest-value external signals in retail because it is both predictive and available in advance. Short-range forecasts (roughly one to two weeks) are reliable enough to shift store-level replenishment.
A concrete example: a beverage supplier knows that once daily highs cross a local threshold, cold drink demand jumps in a nonlinear way. The threshold differs by region because a "hot day" in Phoenix is not a hot day in Seattle. Clustering plus local weather baselines handles this.
Demographics rarely change week to week, so they mostly inform the baseline and the assortment (below). Local events (a stadium schedule, a festival, a school calendar) are the sharper short-term movers.
No forecast is exact. Track error honestly. A common metric is MAPE (Mean Absolute Percentage Error), the average size of your miss as a percentage of actual sales. Lower is better, but chasing a perfect number is a trap: the value is in being less wrong than your current process, not in being right.
Also watch bias (do you consistently over- or under-forecast?). A forecast that is off but balanced is manageable. A forecast that is always low quietly creates chronic stockouts.
Forecasting tells you *how much*. Assortment tells you *what earns shelf space*.
Shelf space is finite and expensive. Every SKU you carry competes for room, cash tied up in inventory, and labor. Assortment optimization decides which SKUs to stock in each cluster, given that constraint.
The logic per cluster:
1. Rank SKUs by expected contribution: forecast demand times margin, adjusted for the cost of holding it.
2. Account for substitution. If you drop a SKU, some of its demand flows to a similar one. Two nearly identical navy fleeces may not both deserve space. This is assortment cannibalization, and ignoring it makes you overstate the value of duplicate items.
3. Protect the "must-stock" core. Some items exist for traffic or brand promise, not margin (milk, basic staples). They stay regardless of rank.
4. Fit the space. Add SKUs down the ranked list until the shelf or capital budget is full.
The practical output is a cluster-specific planogram (the diagram showing exactly which products go where on the shelf). The Minnesota family-suburban cluster gets snow gear and a deep baby aisle. The Florida tourist-seasonal cluster gets sunscreen facings and travel sizes. Same chain, different shelves.
Vérification des acquis
1. Why are lost sales from stockouts described as especially dangerous compared to overstock?
2. What is the fundamental problem with using a single chain-wide forecast for a SKU?
3. What is the central goal of good demand forecasting as framed in the lesson?
4. Why is forecasting each individual store separately not the ideal solution despite being the most local approach?
5. Select ALL correct answers. Which factors are described as shaping demand at a given store?
Sélectionnez toutes les réponses correctes.
6. Select ALL correct answers. Which statements accurately describe the trade-off between the two costs in assortment decisions?
Sélectionnez toutes les réponses correctes.
Clustering once and forgetting. Trade areas shift as neighborhoods change. Re-cluster on a schedule (many retailers revisit annually) and check whether stores have drifted between clusters.
Trusting sales as demand. Your sales data only shows what you *could* sell given what was on the shelf. If an item stocked out, its true demand was higher. Correcting for this is called unconstraining or demand recovery. Skip it and your forecast will keep under-ordering your best sellers, a self-reinforcing mistake.
Over-trimming the tail. Cutting slow SKUs feels efficient, but a thin assortment can drive shoppers to competitors who carry the full range. The long tail sometimes exists to keep the whole basket.
One model for everything. A stable staple (toothpaste) and a volatile fashion item behave differently. Fashion has short life cycles and little repeat history; staples are predictable. Use forecasting approaches matched to the product's behavior.
A regional grocer clusters its stores and finds a "high-density urban" cluster where basket sizes are small and shoppers visit often. The chain-wide plan allocates a full range of large family-pack cereals to every store.
The cluster forecast, informed by demographics (smaller households, less pantry space), predicts weak demand for the biggest packs and strong demand for single-serve. The grocer reallocates shelf space: fewer family packs, more single-serve and premium small formats.
Result direction (not a guaranteed number): fewer markdowns on unsold family packs, fewer stockouts on the single-serve items customers actually wanted. The shelf finally matches the shopper.