Skip to main content

Cookies on Macro by Mark.We use essential cookies for sign-in, locale, and security. With your permission, we also use optional cookies for preferences, for analytics, and for advertising measurement with the Meta (Facebook) Pixel. Read our cookie policy.

Macro by MarkMacro by Mark
  • Home
Loading…
Loading…
← Models
MacroConceptsPolicyModels

Forecast ensemble Model

Combination of several base forecasters - simple averages, weighted blends, or stacking - to reduce single-model risk.

OverviewGraphMathReferences

Understand the mathematics

Follow the same equations and assumptions one section at a time or in a continuous reading.

Hover or focus a symbol defined in this model to find its exact matches. Select it to keep the highlight; Escape clears the selection.

Optimal Combination Weights and Variance Reduction

The Bates-Granger framework derives the combination weights that minimize the variance of the combined forecast error. The solution is the minimum-variance portfolio of forecast errors.

The result shows that the combination is always at least as good as the best individual forecast, and strictly better whenever forecast errors are imperfectly correlated.

ec,t=yt−y^c,t=yt−∑m=1Mwmy^m,t=∑m=1Mwmem,te_{c,t} = y_t - \hat{y}_{c,t} = y_t - \sum_{m=1}^M w_m \hat{y}_{m,t} = \sum_{m=1}^M w_m e_{m,t}ec,t​=yt​−y^​c,t​=yt​−m=1∑M​wm​y^​m,t​=m=1∑M​wm​em,t​
MMMwmw_mwm​

Combined forecast error is the weighted sum of individual forecast errors, where em,t=yt−y^m,te_{m,t} = y_t - \hat{y}_{m,t}em,t​=yt​−y^​m,t​.

Var(ec)=w′Σew,subject to ι′w=1,  w≥0\text{Var}(e_c) = w' \Sigma_e w, \quad \text{subject to } \iota' w = 1, \; w \geq 0Var(ec​)=w′Σe​w,subject to ι′w=1,w≥0
wwwΣe\Sigma_eΣe​ι\iotaι

Forecast-error variance of the combination. The optimization minimizes this subject to the weights summing to one.

w∗=Σe−1ιι′Σe−1ιw^* = \frac{\Sigma_e^{-1} \iota}{\iota' \Sigma_e^{-1} \iota}w∗=ι′Σe−1​ιΣe−1​ι​
w∗w^*w∗ι\iotaι

Optimal unconstrained weights (allowing negative weights). With the non-negativity constraint, the solution requires quadratic programming.

1

Minimize forecast-error variance subject to the constraint that weights sum to one. μ\muμ is the Lagrange multiplier.
Lagrangian: L=w′Σew−μ(ι′w−1)\text{Lagrangian: } \mathcal{L} = w' \Sigma_e w - \mu (\iota' w - 1)Lagrangian: L=w′Σe​w−μ(ι′w−1)
wwwΣe\Sigma_eΣe​ι\iotaι

2

First-order condition. The optimal weight vector is proportional to Σe−1ι\Sigma_e^{-1} \iotaΣe−1​ι.
∂L∂w=2Σew−μι=0  ⟹  w=μ2Σe−1ι\frac{\partial \mathcal{L}}{\partial w} = 2 \Sigma_e w - \mu \iota = 0 \implies w = \frac{\mu}{2} \Sigma_e^{-1} \iota∂w∂L​=2Σe​w−μι=0⟹w=2μ​Σe−1​ι
wwwΣe\Sigma_eΣe​ι\iotaι

3

Substituting the constraint pins down the Lagrange multiplier and yields the closed-form optimal weights.
ι′w=1  ⟹  μ2=1ι′Σe−1ι  ⟹  w∗=Σe−1ιι′Σe−1ι\iota' w = 1 \implies \frac{\mu}{2} = \frac{1}{\iota' \Sigma_e^{-1} \iota} \implies w^* = \frac{\Sigma_e^{-1} \iota}{\iota' \Sigma_e^{-1} \iota}ι′w=1⟹2μ​=ι′Σe−1​ι1​⟹w∗=ι′Σe−1​ιΣe−1​ι​
ι\iotaιwwww∗w^*w∗

4

The optimal combination variance is bounded by the variance of the best individual model. Equality holds only when the best model encompasses the others: Cov(ebest,ek)=σbest2\text{Cov}(e_{\text{best}}, e_k) = \sigma_{\text{best}}^2Cov(ebest​,ek​)=σbest2​ for all kkk, so no reweighting can improve on it. Zero correlation is not the equality case - an uncorrelated model strictly helps, because giving it a small positive weight always lowers the combined variance.
Var(ec∗)=1ι′Σe−1ι≤min⁡mσm2\text{Var}(e_c^*) = \frac{1}{\iota' \Sigma_e^{-1} \iota} \leq \min_m \sigma_m^2Var(ec∗​)=ι′Σe−1​ι1​≤mmin​σm2​
ι\iotaι

5

Closed form for M=2M = 2M=2. When ρ<min⁡(σ1/σ2,σ2/σ1)\rho < \min(\sigma_1/\sigma_2, \sigma_2/\sigma_1)ρ<min(σ1​/σ2​,σ2​/σ1​), both weights are positive. When ρ=0\rho = 0ρ=0 and σ1=σ2\sigma_1 = \sigma_2σ1​=σ2​, both weights are 0.5 (equal weighting is optimal).
Two-model case: w1∗=σ22−ρσ1σ2σ12+σ22−2ρσ1σ2\text{Two-model case: } w_1^* = \frac{\sigma_2^2 - \rho \sigma_1 \sigma_2}{\sigma_1^2 + \sigma_2^2 - 2\rho \sigma_1 \sigma_2}Two-model case: w1∗​=σ12​+σ22​−2ρσ1​σ2​σ22​−ρσ1​σ2​​

6

Under symmetric conditions (equal-weight combination of equal-variance, equicorrelated errors), the ratio is decreasing in MMM (more models help) and increasing in ρ\rhoρ (correlated errors reduce benefit). At ρ=0\rho = 0ρ=0 it equals 1/M1/M1/M, so variance is σ2/M\sigma^2 / Mσ2/M; as M→∞M \to \inftyM→∞ it approaches the floor ρ\rhoρ.
Diversification ratio: DR=Var(ec)σ2=1+(M−1)ρM=ρ+1−ρM(equal σm, equicorrelation)\text{Diversification ratio: } \text{DR} = \frac{\text{Var}(e_c)}{\sigma^2} = \frac{1 + (M-1)\rho}{M} = \rho + \frac{1-\rho}{M} \quad (\text{equal } \sigma_m, \text{ equicorrelation})Diversification ratio: DR=σ2Var(ec​)​=M1+(M−1)ρ​=ρ+M1−ρ​(equal σm​, equicorrelation)
DR\text{DR}DRMMM

The combination puzzle

In practice, equal weights (wm=1/Mw_m = 1/Mwm​=1/M) often beat the estimated optimal weights. Smith and Wallis (2009) showed that the estimation error in Σ^e\hat{\Sigma}_eΣ^e​ can be large enough to offset the theoretical advantage of optimal weights, especially when MMM is large and T0T_0T0​ (the holdout for estimation) is small. The equal-weight combination is the "1/N portfolio" of forecasting.

Notations

em,t=yt−y^m,te_{m,t} = y_t - \hat{y}_{m,t}em,t​=yt​−y^​m,t​

Model forecast error

Σe\Sigma_eΣe​

Forecast-error covariance matrix

w∗w^*w∗

Optimal combination weights

ι\iotaι

Vector of ones

DR\text{DR}DR

Diversification ratio

About these symbols

Model forecast error: forecast error of model mmm at time ttt

Forecast-error covariance matrix: M×MM \times MM×M forecast-error covariance matrix

Optimal combination weights: optimal combination weights

Vector of ones: M×1M \times 1M×1 vector of ones

Diversification ratio: diversification ratio

    Transition checks

    Forecast origin
    y^T+h∣T=ET[yT+h],h=1,2,…\widehat{y}_{T+h|T}=\mathbb{E}_T[y_{T+h}],\qquad h=1,2,\ldotsy​T+h∣T​=ET​[yT+h​],h=1,2,…

    Conditioning on information at T separates the sample from the projection. The forecast can be smooth even when later realized data will not be.

    The bridge point is shared so the eye can see the handoff. After that point, the red line is a model forecast, not observed history.

    Do not score the forecast segment as realized data or read it as a policy promise.

    Uncertainty propagation
    Var⁡T(yT+h)=σ2∑j=0h−1ψj2\operatorname{Var}_T(y_{T+h})=\sigma^2\sum_{j=0}^{h-1}\psi_j^2VarT​(yT+h​)=σ2j=0∑h−1​ψj2​

    Each future innovation contributes through its impulse weight ψj\psi_jψj​. Unless the future is degenerate, longer horizons carry more conditional variance.

    The band widens when shocks accumulate through the model recursion.

    Do not treat the band edge as an alternative deterministic scenario.

    Variable timing

    Observed history

    yt∈ITy_t\in\mathcal{I}_Tyt​∈IT​

    The history segment is realized data available at the forecast origin.

    Conditional mean

    y^T+h∣T=E[yT+h∣IT]\widehat{y}_{T+h|T}=\mathbb{E}[y_{T+h}\mid\mathcal{I}_T]y​T+h∣T​=E[yT+h​∣IT​]

    The forecast path is a conditional expectation, so it can be smooth while future realizations remain volatile.

    Prediction band

    σh2=Var⁡(yT+h∣IT)\sigma_h^2=\operatorname{Var}(y_{T+h}\mid\mathcal{I}_T)σh2​=Var(yT+h​∣IT​)

    Band width is horizon-specific uncertainty, not a second deterministic transition.

    Keep going

    Read next

    Continue with a related concept, model, or example.

    Theory model

    IS-LM Model

    a well-connected theoretical model two steps from here

    New angle: theoretical model →
    Macro by Mark
    Help
    Privacy PolicyTerms of UseEthics and Compliance

    © 2026 Mark Jayson Nation LLC