Abstract
This study develops a hybrid forecasting system that integrates sentiment analysis, deep learning (DL) and machine learning (ML) to improve the forecasting of stock market indices. We focus on three key indices: the FTSE 100 (United Kingdom), the DAX (Germany) and the S&P 500 (United States). Traditional quantitative market indicators are combined with sentiment indicators derived from financial news headlines collected from Yahoo Finance between January 2020 and June 2023. Sentiment is measured with the FinBERT model and aggregated daily to match the market data. Four hybrid models (LSTM + RF, BiLSTM + RF, CNN + RF and DNN + RF) are developed to combine the temporal sequence learning of deep learning with the non-linear modelling capacity of Random Forest, and their performance is compared with that of the stand-alone models (RF, LSTM, BiLSTM, CNN and DNN). Evaluation with the root mean squared error (RMSE), mean absolute error (MAE), coefficient of determination ( R^2 ) and directional accuracy (DirAcc) shows that the hybrid models perform best: LSTM + RF attains the lowest RMSE of 1.97 and a DirAcc of 0.94 for the DAX with sentiment, compared with an RMSE of 14.59 for the stand-alone LSTM. The hybrid models consistently show low errors, high explanatory power and strong directional accuracy. Sentiment improves performance, particularly for the DAX, but has a limited and model-dependent effect for the FTSE 100 and the S&P 500. Future research will target enhanced sentiment analysis and broader market applications.
