25 — Practice & Tooling

Forecast Ensembles#

Practice✓ Mathematical
◆ The PatternCombining models for better accuracy

No single model wins everywhere. Ensemble forecasting combines diverse models — ARIMA, ETS, neural nets — for more robust predictions. The simplest approach (equal-weight average) is surprisingly hard to beat. More sophisticated methods include inverse-error weighting and stacking with a meta-learner.

// Interactive — ensemble vs individual forecasts
MethodApproachWhen
Simple AverageMean of all forecastsDefault baseline — often the best
Weighted AverageWeight by inverse validation errorWhen model quality varies
StackingTrain meta-model on forecastsWhen interaction effects exist
MedianMedian of all forecastsWhen outlier models are present
# Python — forecast ensemble
import numpy as np

# Simple average ensemble
forecasts = [arima_pred, ets_pred, lstm_pred]
ensemble = np.mean(forecasts, axis=0)

# Inverse-error weighted
errors = [mae_arima, mae_ets, mae_lstm]
weights = [1/e for e in errors]
w_sum = sum(weights)
ensemble_w = sum(f*w/w_sum for f,w in zip(forecasts, weights))
Pattern bridge: Forecast ensembling is the time-series version of ensemble methods from statistics. In markets, portfolio diversification applies exactly the same principle — combining uncorrelated assets (models) reduces risk (error).
← Previous
Anomaly Detection
Open in the full reader, with the topic sidebar →