Egyptian Informatics Journal (Mar 2025)
The role of hybrid models in financial decision-making: Forecasting stock prices with advanced algorithms
Abstract
Stock price volatility is influenced by many factors, which are significant obstacles to achieving accurate stock price forecasting in the financial market. This study introduces a novel hybrid model to tackle the abovementioned issues by integrating various algorithms, including bidirectional long short-term memory and random forest. Additionally, it incorporates ensemble empirical mode decomposition, sample entropy clustering, and sea-horse optimizer as part of its methodology. Exponential moving average 30, relative strength index 14, simple moving average 30, moving average convergence divergence, on-balance-volume, and daily open price, high price, low price, close price, and trading volume of the S&P 500 index between 01/04/2013 and 12/29/2022 were utilized as the dataset. To reduce the complexity of the time series decomposition and clustering methods were employed. Then, the high sequences underwent processing using the optimized random forest algorithm, and the remaining sequences were subjected to processing utilizing optimized bidirectional long short-term memory. This approach allowed the model to generalize effectively across a variety of global indices, as demonstrated by its high prediction accuracy (coefficient of determination (R2) values exceeding 0.98 for the Dow Jones, CSI, Nikkei, and DAX indices). Additionally, robustness testing was conducted by introducing incremental noise levels to simulate real-market conditions, which demonstrated that the model remains highly accurate even at the highest noise level. In comparison to other methods, the proposed model demonstrated superior performance on the S&P 500, with an R2 of 0.99 and low error metrics. This model’s adaptability and reliability in diverse and volatile market conditions are emphasized by this robust framework, which renders it a potent financial forecasting tool.