Sales Forecasting System

Sales forecasting app with six models, honest back-test, 95 percent forecast range and a stock planner that turns the forecast into an order quantity. Python, Tkinter, NumPy.

  • Price: ₹1,499
  • Category: AI / ML
  • Technology: Python, Tkinter, SQLite, NumPy, Holt-Winters, regression, autoregression (own code), Matplotlib
  • Includes: Source code + database
  • Suitable for: BCA / B.Sc CS, MCA / M.Sc CS, B.E / B.Tech CSE & IT

Project overview

Too little stock loses sales and too much stock wastes money, and beverage sales swing with the weekday, the season and promotions. This desktop application forecasts daily sales with six models written from scratch - naive, seasonal naive, moving average, Holt-Winters, regression on trend, weekday and month, and autoregression. The Compare Models screen hides the last 7 to 90 days, forecasts them with every model and ranks the models by MAE, RMSE, MAPE and sMAPE (on the demo data the best model is typically 7-10 percent off per day) with a chart of the three best. The Forecast screen predicts up to 90 days ahead with the best model or one you choose, draws a 95 percent range and exports the numbers. The Stock Planner turns the forecast into an order: expected demand over the supplier lead time plus a safety stock (z x RMSE x sqrt of lead time) minus the stock on hand. Two years of demo sales for four beverages are included; import a CSV (date, product, units) to use real data. The models are checked in the tests against hand-calculated and exactly predictable patterns.

Modules

  1. Login: Admin login with a salted password hash; change the password from the side menu.
  2. Dashboard: Products, days of data, units and best seller of the last 30 days; daily sales lines and units per month.
  3. Data: Generate demo sales (seed), import / export CSV (date, product, units), filter by product, clear.
  4. Compare Models: Back-test six models on the hidden last days; MAE, RMSE, MAPE, sMAPE table with the winner highlighted; chart; CSV export.
  5. Forecast: Forecast 1 to 90 days with the best or a chosen model; chart with 95 percent range; table; CSV export.
  6. Stock Planner: Lead time, service level (90 / 95 / 97.5 / 99 percent) and stock on hand give the safety stock, reorder point and order quantity.

Requirements

  • Python 3.11
  • Internet once, to install the libraries (about 2 minutes)
  • Windows 10 / 11

How to run this project

  1. Install Python 3.11 from python.org and tick "Add python.exe to PATH" during setup.
  2. Extract the zip and open the project folder (STUDENT_GUIDE.md explains every step in simple words).
  3. Double-click `1_INSTALL.bat` once and wait until it says [OK] (about 2 minutes; it downloads the libraries into a private .venv folder).
  4. Double-click `2_RUN.bat` to start the project. If it does not start, double-click `CHECK_SETUP.bat` and read what it says.
  5. Log in with admin / admin123.
  6. Open Forecast, keep 'Best model', set 30 days and click Forecast: show the 95 percent range and export the CSV. Open Stock Planner: lead time 7 days, service level 95, stock on hand 300, click Calculate and read the order quantity.

More AI / ML projects