Forecasting Many Series
Top-down, bottom-up.
The founder wants a company forecast. Each manager wants their own. And the buyer wants one for each product in each cafe. If you add up the small forecasts, they rarely match the big one. Then two teams turn up at a meeting with different numbers, and trust disappears.

- The founder wants a total
- Managers want their own
- The numbers don't match
Top-down forecasting
Big totals are easier to forecast than small pieces, because noise cancels out. So one simple approach forecasts the company total, and then splits it, using each cafe's recent share. Run it. There's the company number, and the cafe numbers, and they add up exactly. Everyone is looking at one version of the truth.
import pandas as pd
sales = pd.read_csv("sales.csv", parse_dates=["date"])
weekly = sales.groupby(["city", pd.Grouper(key="date", freq="W")])["revenue"].sum().unstack(0)
total = weekly.sum(axis=1)
total_next = total.iloc[-5:-1].mean()
shares = weekly.iloc[-13:-1].sum() / weekly.iloc[-13:-1].sum().sum()
by_city = (shares * total_next).round(0).sort_values(ascending=False)
print(f"Company forecast: {total_next:,.0f}")
print(by_city.head(3).to_string())
print("Sum of the cities:", round(by_city.sum()))Company forecast: 80,881 city Osaka 9954.0 Milan 8453.0 Bergen 8139.0 Sum of the cities: 80882
Which approach?
You've got three main options. Top down is stable, but it misses local changes. Bottom up forecasts each piece, and adds them up, which captures local detail, but it's noisy. Global models train one boosting model across all of the series at once, sharing what they learn. And that's what usually wins in forecasting competitions. Reconciliation methods then force all of the levels to agree.
| Approach | Good for |
|---|---|
| Top-down | Stable totals |
| Bottom-up | Local detail |
| Global model | Many related series |
| Reconciliation | Making levels agree |
Summary
Forecast what's stable, and make sure the numbers agree. But a forecast is only the beginning. Next, how to turn one into a decision.
Key takeaways- Totals are easier than pieces
- Split using recent shares
- Levels must agree