This research investigates the integration of Twitter sentiment analysis with machine learning models, specifically Long Short-Term Memory (LSTM), Facebook Prophet, and Neural Prophet, to enhance the accuracy of stock market predictions. While these models are accurate in capturing long-term trends and seasonality, they often fail when exploring the short-term volatility in stock prices. By using real-time social media sentiments, we aim to improve short-term prediction accuracy. Sentiment data from Twitter, extracted and classified using NLP techniques, was integrated with the models to predict stock prices for Apple Inc. (AAPL), Paramount Global (PARA), and BP plc (BP) over the period 2016-2024. The study compares the performance of the models using Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE). Results show that Neural Prophet stood the best in terms of its accuracy and efficiency in stock predictions when compared to LSTM and Facebook Prophet, reducing RMSE by 25% and MAE by 20%. While the integration of sentiment analysis improved prediction accuracy, limitations remain in predicting the scale of sudden market changes. The findings highlight the potential of sentiment analysis in stock prediction but also call for further model enhancements to fully address short-term market volatility.
Read full abstract