🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz

What is hierarchical time series forecasting?

Hierarchical time series forecasting is a method for predicting values in datasets structured as hierarchical trees, where aggregated totals must align with their disaggregated components. For example, a retail company might track sales at the national level, which splits into regional sales, then into individual store totals. Each level of the hierarchy (national, regional, store) must produce forecasts that are mathematically consistent—summing store-level predictions should match regional forecasts, and summing regional forecasts should match the national total. This structure ensures decision-makers at all levels work with coherent numbers.

The challenge lies in balancing accuracy across hierarchy levels. Traditional forecasting methods applied independently to each level often create inconsistencies. For instance, if a store’s sales are forecasted separately from its region’s total, their sums might not align. Three common strategies address this: bottom-up, top-down, and middle-out. Bottom-up forecasting aggregates lower-level predictions (e.g., summing store forecasts to get regional totals). Top-down starts with the highest level (e.g., national sales) and allocates it to lower levels using historical proportions. Middle-out combines both, forecasting a middle layer (e.g., regions) and reconciling upward and downward. More advanced methods use optimization techniques to adjust forecasts for coherence or employ machine learning models that explicitly model hierarchical relationships.

Implementing hierarchical forecasting requires tools that handle structure and reconciliation. Libraries like scikit-hts in Python or hts in R provide built-in methods for aggregation and reconciliation. For example, a developer might use a bottom-up approach with ARIMA models for store-level data, then sum them to regional and national totals. Alternatively, reconciliation algorithms like Minimum Trace (MinT) optimize forecasts to minimize errors while enforcing coherence. When integrating with business systems, it’s critical to validate that hierarchy constraints (e.g., parent-child summation rules) are maintained during updates. Testing accuracy at each level—using metrics like MAE or RMSE—helps identify where the model underperforms and needs tuning. Hierarchical forecasting is particularly useful in supply chain, energy demand prediction, and financial budgeting, where data naturally organizes into tiers and alignment matters for operational decisions.

Like the article? Spread the word