Demand Forecasting and Promotional Optimisation for Retail
2021–2022 · Forecasting & Optimization
Retail planning sits at an uncomfortable intersection: too much stock and you write it down; too little and you lose the sale. Promotions make everything harder — they spike demand in ways that naive models miss entirely. This project combined ML forecasting with mathematical optimisation to give planners a more reliable picture.
The retailer's existing demand planning relied on historical averages with manual adjustments for promotions. During promotional windows — which drove a disproportionate share of revenue — forecast error was high, leading to stock-outs on hero products and excess inventory on adjacent lines.
I developed a two-part solution: a GBM-based forecasting model to predict demand at the product-store-week level, and a mixed-integer programming (MIP) model to optimise promotional selection and timing given supply constraints. The forecasting model used LightGBM incorporating promotional flags, seasonality features, and cross-product effects. The optimisation layer took the forecast outputs as inputs and optimised promotional schedules against margin, volume, and stock targets simultaneously. I built end-to-end ML pipelines with Docker and GitHub Actions, making the weekly forecasting cycle automated and auditable, and developed a web application in Python and JavaScript giving planners a working interface to explore scenarios and override model outputs where judgment called for it.
The forecasting and optimisation components had to work together — a small bias in the forecast could compound into a large error in the optimisation output. Significant validation work went into understanding where the model was systematically wrong and correcting for it before connecting the two layers.
Improved forecast accuracy during promotional windows, with a reduction in promotional stock-outs on hero SKUs. Planners adopted the scenario tool as part of their weekly workflow, which was the real signal that it was working.
Skills: LightGBM · Mixed-Integer Programming · Python · JavaScript · Docker · GitHub Actions · Retail Analytics