Abstract:
The Colombo Stock Exchange (CSE) is a major financial market in Sri Lanka that plays a
crucial role in the country’s economy by facilitating the trading of equities and other
securities. This study aims to forecast stock price movements in CSE using machine learning classification models. Traditional methods of stock analysis, such as fundamental and technical analyses, often fail to accurately predict stock prices because of their inability to capture intricate patterns within the data. To address these limitations, this study employs machine-learning techniques to predict the direction of stock price movements (i.e., whether the price will increase or decrease) rather than the exact stock price itself. This approach enhances the accuracy of trend predictions and assists investors in making informed decisions. This study focuses on five prominent companies listed on the Colombo Stock Exchange. The primary objective was to evaluate the accuracy of four classification algorithms—Logistic Regression, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Random Forest—in predicting daily stock price movements based on historical stock prices and exchange rates. The methodology involves collecting historical stock data and relevant economic indicators, followed by pre-processing and feature engineering to prepare the data for model training. The models were assessed based on accuracy, precision, recall, and the F1 score to determine the most effective algorithm in the context of the Colombo Stock Exchange. The findings indicate that Random Forest performs more accurately than the other algorithms. Accordingly, this study shows the potential of machine learning models to enhance investment decision-making processes, reduce reliance on intermediaries, and
manage investment risks more effectively. These results are expected to benefit investors,
financial institutions, and researchers interested in advancing stock price prediction
methodologies.