Abstract:
Stock price prediction is a key area of research aimed at understanding the intricate factors that drive stock market dynamics. This study addresses a significant gap in sentiment analysis research by focusing on developing markets like Sri Lanka, which are often overlooked compared to developed markets. The research investigates the role of social media sentiment in predicting stock prices, using 3,820 Facebook posts related to LOLC and its subsidiaries collected from January 2021 to August 2023.The study highlights the SVM model as the most effective sentiment classifier, achieving 74% accuracy and an average of 77% in 10-fold cross-validation, with the highest fold reaching 82% accuracy. SVM outperformed traditional machine learning classifiers as well as VADER and FinBERT sentiment analysis models. This level of performance exceeds similar sentiment polarity studies conducted in developing markets. Incorporating sentiment scores significantly improved stock price prediction accuracy. The LSTM model, which integrated a 5-day lagged sentiment score, achieved the lowest RMSE and MAE values for LOLC and LOFC stocks. These findings emphasize the importance of sentiment as a feature in financial forecasting, particularly in volatile and less-researched markets. The study demonstrates the potential of sentiment analysis to enhance stock price prediction and provide actionable insights for investors. By offering a practical model tailored to the Sri Lankan stock market, it highlights how integrating sentiment and stock data can support decision-making and improve investment outcomes, with implications for other developing markets facing similar challenges.