Social Media Sentiment for Predicting Stock Market Returns and Supporting Investment Decision Making
Keywords:
Investment decision making, Machine learning, Social media sentiment, Stock market prediction, Stock returnsAbstract
Social media is one of the key channels for real-time data that captures investor views, expectations and perceptions. This study was to see if social media sentiment could enhance the way we predict stock market returns and make investment decisions. This involved a quantitative longitudinal study with 726 observations made from January 2022 to December 2024. Hang Seng Technology returns, market returns, sentiment indicators, overnight sentiment, social media attention measures, exchange rate changes and interbank rate changes were analysed. Descriptive statistics and correlation analysis were carried out, and later machine learning models were created using linear regression, Random Forest and Gradient Boosting. Performance of models was evaluated based on mean absolute error, root mean squared error, coefficient of determination and the directional accuracy. The contemporaneous sentiment was moderately positively related to Hang Seng Technology returns while the overnight sentiment was weakly, but not significantly, related. There was no consistent improvement in performance when using sentiment-enhanced models over market-only models. Linear regression had the best directional accuracy, and Random Forest had a marginal decrease in prediction error once sentiment variables were introduced. However, feature-importance analysis revealed sentiment measures brought valuable information in addition to the overall market factors. Overall, the social media sentiment seemed more useful as a secondary market indicator, rather than as a standalone forecasting signal. It therefore has most value in combination with traditional financial data in a wider framework of investment decision support systems.
