How Much Will Each Store Sell in the Next Two Weeks?
How much stock should each store order for the next fortnight? Order too little and shelves go empty at the weekend. Order too much and cash sits in the stockroom. A planner needs a number for each store and each day, and a sense of how wrong it could be.
The table
One row per store per day: the date, the store and the units sold. The walkthrough builds a year of daily sales for three stores so it runs anywhere. Swap in your own history with the same three columns.
Walkthrough
Get the history
A year of daily sales for three stores, busier at weekends.
import numpy as np import pandas as pd rng = np.random.default_rng(0) days = pd.date_range("2025-01-01", periods=365, freq="D") history = pd.concat([pd.DataFrame({ "date": days, "store": store, "sales": level * (1 + 0.3 * (days.dayofweek >= 5)) + rng.normal(0, 5, len(days)), }) for store, level in {"north": 120, "south": 90, "east": 60}.items()], ignore_index=True)Forecast every store at once
Chronos-2 reads all three series in one request.
from welt import Forecast model = Forecast(model="chronos-2").fit(history, time="date", id="store", target=["sales"]) result = model.forecast(14, quantile_levels=[0.1, 0.5, 0.9])Read the plan and its range
The median is the plan. The 10% and 90% columns show a low and a high day to plan stock around.
plan = result.to_frame() print(plan[["id", "timestamp", "median", "q_0.1", "q_0.9"]].head(14))
What you get
Try it
Use Open with to run the forecasting notebook in Colab, Kaggle or Jupyter, or run the code above after pip install "welt-client[parquet]".
Open with
- Type
- Use case
- Area
- Customers
- Question
- How Much Will Each Store Sell in the Next Two Weeks?
- Model
- Chronos-2
- Data
- A year of daily sales for three stores, built in the notebook
- For
- Planners and operations analysts