← Back to work

Forecasting · 2026

Retail Demand Forecasting

SKU-level demand forecasting with honest evaluation: walk-forward validation across naive seasonal, Prophet, and XGBoost — beating the baseline before claiming anything.

MAE vs naive baseline (top SKU)
−74%
models compared per SKU
3
validation — no leakage
walk-forward

Architecture

Select a stage to explore it.

01 · Transactions

Real retail transactions cleaned and aggregated to SKU-level demand series — the messy step most forecasting demos skip.

GitHub Actions CIruff + blackDocker-ready

Visuals

Retail Demand Forecasting GitHub repository with backtesting framework
GitHub repository — walk-forward validation with Prophet, XGBoost, and naive seasonal baselines

01 · Problem

Inventory planning lives and dies on demand forecasts: order too little and you stock out, too much and capital sits on shelves. The question for any forecasting system is whether it actually beats the naive approach a planner would use anyway.

02 · Solution

A forecasting system built around a backtesting framework rather than a single model: naive seasonal, Prophet, and XGBoost compete per SKU under walk-forward validation, and the winner is chosen on out-of-sample error, not preference.

03 · Engineering decisions

The baseline comes first — a model only earns complexity by beating seasonal-naive out of sample. Walk-forward validation over a single train/test split, because retail demand drifts and a one-split score is a lucky draw. And bias is reported alongside MAE, because a symmetric error metric hides the asymmetric costs of over- and under-stocking.

04 · Results

On the highest-volume SKU, Prophet reduced MAE from 702 to 181 against the naive seasonal baseline — a 74% reduction — with XGBoost performing best overall across the evaluation suite. Every number comes from walk-forward backtests, reproducible in CI.

05 · Lessons learned

Forecast accuracy claims are only as good as the validation that produced them. The baseline and the backtest are the product; the model is an implementation detail.