Retail Demand Forecasting with Inventory Recommendations
A demand forecasting and reorder recommendation tool for small and mid-sized retailers, such as pharmacies, grocery chains and online sellers, that turns sales history into forecasts with uncertainty and reorder quantities. A data and machine learning final year project that backtests inventory cost, not just forecast error.
Intermediate
A small team, or one strong student willing to learn something new.1 semester · 2 students
6 to ship
3 optional extrasSuggested stack
What you should ship
- A cleaning pipeline handling promotions, returns and stockouts, treating a stockout as censored demand rather than zero demand
- Baseline forecasts (seasonal naive, exponential smoothing) compared against a LightGBM model across many products
- Forecast intervals rather than point estimates, with calibration checked against actual sales
- Reorder recommendations combining the forecast with lead time, holding cost, stockout cost and pack sizes
- A backtest reporting forecast error and simulated inventory cost and service level against the historical ordering policy
- A Streamlit interface where a store manager sees this week's suggested orders with the reason for each
If you have time left
- Hierarchical forecasts reconciled across product, category and store levels
- Forecasts for new products from similar items with no sales history
- Explicit treatment of promotional uplift and cannibalisation between products
The problem retailers have with ordering
Small and mid-sized retailers, such as a pharmacy chain, a grocery store or an online seller with a few hundred products, either over-order and sit on dead stock or under-order and lose sales. Both are expensive, and both usually come from ordering by intuition or "last month plus a bit". The owner remembers the fast sellers and forgets the long tail; expiry dates and supplier lead times make mistakes costly.
Large retailers have planning teams and software. Small ones have a spreadsheet and an experienced manager whose judgement does not scale to a second branch.
What already exists and the gap
- RELEX Solutions and Blue Yonder sell forecasting and replenishment platforms to large retailers.
- Inventory Planner and similar tools offer demand forecasting for e-commerce stores on Shopify and similar platforms.
- Point of sale systems used by small shops usually show stock levels and sales history, with basic low-stock alerts.
- Public benchmarks such as the M5 forecasting competition (Walmart sales data) and the Favorita grocery dataset on Kaggle show how hard this is at scale.
Enterprise tools are out of reach for a pharmacy with three branches, and low-stock alerts ignore seasonality and uncertainty. The gap is a transparent tool that forecasts with honest uncertainty and turns it into order quantities a manager can check and override.
What you build
- Cleaning pipeline: handles returns, promotions and, most importantly, stockouts.
- Forecasts: simple baselines first, then a machine learning model trained across many products, with prediction intervals.
- Reorder policy: for each product, combine the forecast distribution over the lead time with holding cost, stockout cost, minimum order and pack size to recommend a quantity.
- Backtest: replay history week by week, place the orders your policy would have placed, and simulate stock, lost sales and holding cost.
- Interface: this week's suggested orders, the forecast chart for each product and a reason ("sales rising, 9 days of stock left, supplier lead time 7 days").
The technically interesting part
The data trap that catches everyone is stockouts. When an item was unavailable, sales were zero and demand was not. Training on those zeros teaches the model to predict low demand for exactly the products that sell out. Detecting censored periods (zero stock, or zero sales on a normally busy product) and excluding or imputing them is the most important step, and the one most student projects miss.
The second is why intervals matter more than the point forecast. The reorder decision depends on the spread. If stocking out is expensive and holding is cheap, you order against the upper end of the interval. Show your supervisor calibration: do 80 percent intervals contain the actual sales about 80 percent of the time?
How to evaluate it
- Forecast accuracy: error per product against seasonal naive, reported by product group (fast, slow, intermittent).
- Calibration: interval coverage at 80 and 95 percent.
- Policy backtest: total simulated cost and service level against the historical ordering, on the same period. A result such as lower inventory cost at the same service level is what counts; a lower error metric alone is not.
- Manager test: 2 or 3 people who order stock review a week of suggestions and say which they would accept.
Suggested plan
- Weeks 1 to 3: choose the dataset, cleaning, stockout detection.
- Weeks 4 to 6: baselines and the LightGBM model with intervals.
- Weeks 7 to 9: reorder policy and backtest simulator.
- Weeks 10 to 12: interface with reasons and overrides.
- Weeks 13 to 15: evaluation, manager test, report.
Path to a product
Start with a public dataset, then find one real retailer, such as a local pharmacy or grocery store, willing to share exported sales and stock history. Offer a pilot where you send weekly order suggestions and compare them with what they actually ordered. The model is a monthly subscription per branch, sold alongside or integrated with the point of sale system they already use.
Scope warning
Forecasting and reorder policy only. Do not build a point of sale system, supplier integration, warehouse management or pricing optimisation. Use a public retail dataset for development and never publish a real retailer's data.
Learn what you need on Sefism
- Machine learning roadmap : regression, validation and feature engineering.
- Data analytics roadmap : cleaning and exploring sales data.
- Machine learning cheat sheet : error metrics and cross-validation for time series.
- Kaggle Datasets : public retail sales datasets to start from.
- OpenIntro Statistics : distributions and intervals behind the reorder policy.
Get help with this idea
The mark-winning part is the backtest of the whole policy. Tauseef can help you pick a dataset, design the simulator and keep the scope to what two students can finish. If you are new here, create a free account first.
Ideas and guidance, not finished projects
These are project ideas and scoping guidance, published free for students to use as a starting point. I do not build, write, or sell final-year projects, and I do not complete coursework for anyone. Take an idea, make it yours, and build it.
Not sure this one fits you?
I help students pick an idea that matches their skills and their deadline, then scope it down until it is finishable. Guidance only, never done for you.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.