Hybrid lstm and xgboost improve multi-horizon stock return forecasts
A Hybrid LSTM-XGBoost Framework for Multi-Horizon Stock Return Prediction Across Diversified Equity Portfolios
Artificial Intelligence
Summary
Predicting stock returns is difficult because financial data is complex and often noisy. The authors combined two types of machine learning models: one that learns patterns over time (LSTM) and one that makes strong predictions from many features (XGBoost). This hybrid approach was tested on 14 different stocks over multiple time frames and showed better accuracy than using either model alone in many cases. They also made a simple scoring system to help rank stocks for investment decisions.
What this means in practice
- •For quantitative trading teams: Develop multi-horizon return models combining sequence learning and gradient boosting to enhance short- and long-term stock predictions across sectors.
- •For financial software engineers: Integrate hybrid LSTM-XGBoost pipelines to improve automated scoring and ranking of stock portfolios with multi-timescale predictive accuracy.
Authors
Seif ElDein Mostafa, Yahia Ahmed, Farah Datwish, Marwa Solayman
Abstract
Accurate prediction of equity returns remains a major challenge in computational finance due to the non-stationary, nonlinear, and low signal-to-noise ratio nature of financial time series. This paper proposes a hybrid two-stage architecture that combines a long short-term memory (LSTM) network with an XGBoost gradient-boosted regressor for multi-horizon stock return prediction across a diversified panel of 14 U.S. equities spanning six industry sectors. The LSTM component, comprising two stacked layers with 64 hidden units, processes 60-day sliding windows of five sequential market features to produce 64-dimensional temporal embeddings that encode learned sequential market dynamics. These embeddings are concatenated with 14 hand-crafted technical indicators to form a 78-dimensional hybrid feature vector, which is subsequently passed to an XGBoost regressor tuned via 3-fold cross-validation grid search. The framework is trained on a multi-stock pooled corpus using strict chronological splits and per-stock MinMaxScaling to prevent look-ahead bias, and evaluated across four prediction horizons of 30, 90, 252, and 365 trading days. Experimental results demonstrate that the hybrid model achieves a test RMSE of 0.0949 on the 30-day horizon, roughly one-third that of the standalone LSTM baseline, while marginally matching or surpassing the XGBoost-Only baseline across the majority of stocks. Directional accuracy rises with horizon length, reaching 97.6% at 365 days; we show, however, that this largely tracks the high base rate of positive long-horizon returns in the sample, and we therefore benchmark directional accuracy against a naive always-positive predictor and treat the above-base-rate gap at short horizons as the more informative signal. A composite investment scoring framework derived from multi-horizon predictions is further proposed to support portfolio ranking and decision support.