Pro

Retail Sales Forecasting

A forecast chart nobody backtested is a drawing — the only honest accuracy number comes from data the model never saw.

  • Python
  • Prophet
  • Streamlit

About this project

A daily retail sales forecaster over four Indian cities, built on Prophet, with a Streamlit dashboard. Almost every forecasting tutorial stops at a chart: fit a model on all the data, plot a line into the future, and call it a forecast. That chart has never been checked against anything — there is no way to know whether it is accurate to 2% or 40%.

This project puts the measurement first. A walk-forward backtest fits only on data strictly before a holdout window, predicts that window, and compares against the real values the model never saw — producing a MAPE of 2.27% / 2.32% / 2.73% across 14, 30 and 60-day holdouts. The dashboard shows that backtested error above the forecast, not as a footnote under it. The same machinery then measures whether Prophet's holiday feature actually earns its place: on a 175-day window spanning Diwali 2025, MAPE is 2.90% with the holiday regressor and 5.24% without — and on Diwali itself, the model without it predicts barely half the real sales. That is a measured contribution, not an assumed one.

What you will learn

  • Build a walk-forward backtest — fit only on data before the holdout, then score against withheld truth
  • Compute and interpret MAPE, and know what a 2% vs a 5% figure actually means for a business
  • Prove there is no data leakage between train and test rather than assuming it
  • Measure a holiday regressor's real contribution instead of asserting that it helps
  • Reuse the same backtest pattern for any time-series forecast — demand, enrolment, capacity

Before you start

  • Python and pandas basics — DataFrames, dates, and filtering
  • Python 3.10+ — Prophet and Streamlit install from PyPI, no GPU or API key needed
  • Comfort with the idea of holding data back from a model to test it

New to Python? The free Python course covers everything this project assumes.

Academic integrity notice

These projects are provided for learning, experimentation and reference. Understand the code, modify it for your own requirements, and acknowledge external work according to your institution’s academic policies. Priodemy does not supply work to be submitted as your own.