Quantitative analysts building equity return models often treat stacking and bagging as interchangeable. They are not. Understanding what each method actually does changes how you evaluate their outputs.
Bagging Reduces Variance, Not Bias
Bagging, the technique behind random forest, creates multiple models on bootstrapped data samples and averages their predictions. It works well when your base model is unstable, meaning small changes in training data produce large swings in predictions. For equity return prediction, where signal-to-noise ratios are low, variance reduction is genuinely useful.
Stacking Learns How to Combine Models
Stacking trains a meta-model on the predictions of several base models. The meta-model learns which base model to trust more under which conditions. In backtests on monthly equity returns, stacked ensembles combining a gradient boosting model with a regularised linear model have shown more consistent out-of-sample performance than either model alone, particularly during regime changes.
- Bagging is simpler to implement and less prone to data leakage during cross-validation.
- Stacking requires careful time-series cross-validation to prevent the meta-model from learning on future data.
- Stacking adds another layer of hyperparameter decisions, which increases the risk of overfitting to historical data.
- Bagging provides more interpretable feature importance scores across the ensemble.
The Honest Assessment
Stacking offers a performance ceiling that bagging cannot reach, but it demands more rigorous validation. For teams without robust backtesting infrastructure, bagging is the safer starting point. For teams that already have disciplined walk-forward validation pipelines, stacking is worth the added complexity.