Command Palette

Search for a command to run...

Demand Forecast & Reorder Simulation

completed

SKU-level 7-day demand forecasting for 100 retail SKUs with LightGBM, tested against simple baselines with leakage checks, and a simulated reorder policy that shows what better forecasts do to stock and fill rate.

Test-period WAPE by segment
Technologies & Frameworks
PythonLightGBMPandasTime Seriesscikit-learnSimulationpytest

Forecasts daily unit sales seven days ahead for 100 SKUs in one store of the M5 (Walmart) dataset, used as a stand-in for dark-store demand. The SKUs were sampled across fast, medium and intermittent sellers. Validation is a rolling-origin backtest with three 28-day folds, followed by a held-out 91-day test period scored once. A test scrambles all sales after a cutoff and checks that no feature for an earlier forecast origin changes, to rule out leakage.

On the test period LightGBM reaches a WAPE of 0.683 against 0.725 for the best simple baseline, a 28-day moving average. That is about 6% better, mostly on fast sellers. It wins on 70 of the 100 SKUs and is effectively tied on intermittent ones. P90 quantile forecasts cover 90.3% of outcomes against a 90% target.

The forecasts feed a simulated reorder policy with a 2-day lead time. A P90 safety-stock policy fills 97.0% of demand against 74.5% for a moving-average policy, but holds about three times the stock. Compared at equal inventory the gain is small, around 2.3 points at 4.2 units per SKU. The simulation is assumed rather than observed, covers one store and one 91-day window, and uses M5 retail data, not quick-commerce data.

Fill rate against average inventory for each reorder policy
Fill rate against average inventory for each reorder policy
Actual against forecast for five SKUs
Actual against forecast for five SKUs