Reconcile forecasts across product and regional totals
In this article (5 sections)
Organizations often forecast the same demand at several levels: SKU by region, region totals, product totals and a company total. Models fitted independently at each level rarely add up. A planner then receives incompatible numbers—for example, region forecasts sum to 103, product forecasts sum to 107, and the company forecast is 110.
Forecast reconciliation transforms a set of forecasts so aggregation constraints hold. It creates arithmetic coherence. It does not guarantee improved accuracy or settle which local model captured demand best.
A two-by-two hierarchy
The local lab starts with bottom-level point forecasts:
| Product A | Product B | Region total | |
|---|---|---|---|
| Region 1 | 40 | 30 | 70 |
| Region 2 | 20 | 10 | 30 |
| Product total | 60 | 40 | 100 |
The independent direct forecasts are regions [75, 28], products [62, 45] and total 110. Their sums disagree. Bottom-up reconciliation accepts the four leaf forecasts and derives coherent totals of 70, 30, 60, 40 and 100.
from timeseries_cases import reconciliation_case
result = reconciliation_case()
bottom = result["bottom_up"]
assert bottom["total"] == sum(bottom["regions"])
assert bottom["total"] == sum(bottom["products"])
assert result["proportional_sum"] == 110.0
print(result["direct_region_sum"], result["direct_product_sum"], bottom["total"])This prints 103.0 107.0 100.0, exposing the original conflict.
Two simple choices
Bottom-up preserves leaf forecasts and aggregates them. It works when lower-level histories are reliable, but sparse or noisy leaves can weaken the totals.
The lab also scales every leaf by 110 / 100 to respect the independent top forecast. Reconciled leaves become [[44, 33], [22, 11]] and sum to 110. This proportional rule preserves leaf shares, but it discards the independently forecast region and product margins.
More advanced reconciliation uses forecast-error covariance to combine information across levels. That requires stable covariance estimates and a clearly defined summing matrix. Evaluate unreconciled and reconciled forecasts on held-out origins at every level that matters.
Protect the hierarchy contract
Version the product-region mapping at each forecast origin. Reorganizations, new items and region transfers can otherwise compare incompatible totals. Decide how “other” and discontinued items appear. Keep units consistent; revenue and units do not belong in one additive hierarchy.
Reconcile intervals or scenarios coherently as well as point forecasts. Independently generated lower and upper bounds can violate totals even when point forecasts add up. Document which level drives planning overrides and rerun reconciliation after approved overrides.
The Data Science course connects this matrix logic with forecasting, error evaluation and business handover.
Exercise
Add a third region and an “all products” total. Build the summing matrix, verify every reconciled vector, and compare bottom-up with top-scaled results on rolling origins. Report accuracy at leaf, regional and total levels.
Continue learning
This article is part of the Forecasting and time-series analysis sequence. Use the neighbouring tasks when you need the prerequisite or the next application.
- Review the prerequisite or neighbouring task in Intermittent demand: why ordinary averages disappoint.
- Continue with Detect data leakage in holiday and promotion features.
Reference: Forecasting: Principles and Practice on hierarchical reconciliation.
Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.
This article is part of our Data Science programme — 6 months. From data foundations to machine learning, deep learning and deployment.
Explore Data Science