Integration of LSTM Networks in Random Forest Algorithms for Stock Market Trading Predictions

—

Integration of LSTM Networks in Random Forest Algorithms for Stock Market Trading Predictions

Juan C. King
Jose M. Amigo
Published on 11/20/2025
Equities
Stocks
Machine learning
Deep learning
Stock picking
Fundamental analysis
AI

This paper presents a hybrid algorithmic trading system that integrates Long Short-Term Memory (LSTM) networks with Random Forest algorithms to predict 10-day stock price direction. The authors combine two distinct data modalities: fundamental variables (e.g., profitability ratios, valuation multiples, leverage) processed by decision tree models (Random Forest and Gradient Boosting), and technical variables (e.g., moving averages, RSI, MACD) analyzed via LSTM networks. The hybrid model feeds LSTM predictions as additional inputs into Random Forest, enabling the fusion of temporal patterns with static fundamental data without information loss. Experiments on 482 international companies show that the hybrid approach significantly outperforms models using only fundamental or technical variables, with Random Forest achieving the best performance among decision trees. The authors also demonstrate that selecting technical models with high predictive accuracy further boosts hybrid model results. A simulated investment strategy based on the top 30 assets by AUC yields returns exceeding major indices (S&P 500, NASDAQ, Eurostoxx 50) over a three-week period. The work addresses a key gap in the literature by natively combining algorithms designed for sequential and static data, offering a more comprehensive market representation.

Highlights

  • 1Proposes a novel hybrid model integrating LSTM networks (for technical variables) with Random Forest (for fundamental variables) to predict 10-day stock price direction.
  • 2Demonstrates that combining fundamental and technical variables outperforms models using only one type of data, with Random Forest as the best-performing decision tree.
  • 3Introduces a method to boost hybrid model performance by selecting technical models with high prediction accuracy.
  • 4Validates the approach on 482 international companies with bimonthly fundamental data and daily price data, achieving superior AUC and accuracy compared to benchmarks.
  • 5Simulates a value-based investment strategy over three weeks, outperforming major indices (S&P 500, NASDAQ, Eurostoxx 50).

Methods

  • M
    Fundamental models: Random Forest and Gradient Boosting trained on 32 fundamental variables (profitability, valuation, leverage, market data).
  • M
    Technical models: Individual LSTM networks per asset trained on 11 technical indicators (trend, momentum, volatility).
  • M
    Hybrid model: LSTM outputs (technical predictions) are fed as additional features into Random Forest trained on fundamental variables.
  • M
    Performance evaluation using AUC, accuracy, recall, specificity, precision, F1-score, and overfitting metrics (Diff AUC, Diff ACC).

Results

  • R
    Hybrid model achieves higher AUC and accuracy than standalone fundamental or technical models across 482 stocks.
  • R
    Random Forest outperforms Gradient Boosting in fundamental and hybrid settings.
  • R
    Selecting technical models with high AUC further improves hybrid model performance.
  • R
    Simulated trading strategy based on top 30 assets by AUC yields returns exceeding S&P 500, NASDAQ, and Eurostoxx 50 over a 3-week period.
  • R
    The hybrid approach effectively captures both long-term fundamental trends and short-term technical patterns.
0/5

Analyze Paper

Generate insights from "Integration of LSTM Networks in Random Forest Algorithms for...".

Suggested Actions