Machine Learning

Retail Demand Forecasting Engine

Hierarchical SKU-level forecasting that cut inventory error nearly in half.

All projects
Retail Demand Forecasting Engine preview
PythonLightGBMpandasAirflowSnowflake

Business problem

A national retailer was over-ordering slow movers and stocking out of best sellers, tying up working capital while missing sales during promotional peaks.

Dataset

4 years of daily sales for 1,200 SKUs across 48 stores, joined with promotion calendars, weather and public holiday data (~26M rows).

Methodology

  • Built a reconciled hierarchy at SKU, store and region level.
  • Engineered lag, rolling-window, promotion and holiday features.
  • Trained gradient-boosted models with time-series cross-validation.
  • Deployed a weekly batch pipeline with drift monitoring.

Key findings

  • Promotion depth explained 38% of forecast variance for top SKUs.
  • Weather features mattered only for seasonal categories.
  • MAPE improved from 21% to 11.4% across the portfolio.

Recommendations

  • Shift replenishment to a weekly forecast-driven cycle.
  • Cap promotion depth on SKUs with high cannibalisation scores.
  • Retrain quarterly and monitor drift on the top 200 SKUs.