Comparative Analysis of ML models for Stock Price Prediction

Read full text
Authors: Yaolong Xiang
Cited by: 0

Abstract

Due to the unstable and non-stationary nature of financial market volatility, accurately predicting stock prices remains a challenging task. This study employs historical prices and technical indicators as features, comparing five machine learning models: linear regression, k-nearest neighbors, support vector regression, eXtreme Gradient Boosting, and random forests. The performance of these models is assessed based on mean squared error, R² score, and prediction accuracy within 1% and 2% thresholds. Experiment results show that eXtreme Gradient Boosting performed overall with the best accuracy under significant event impact and with a short-term dataset (approximately 2 years). The experiment also takes window rolling to make every model perform more stably. This study discusses the performance of the five models mentioned and uses the designed models to run through the same condition of the dataset to compare their differences. The limitations of the current work are taken into consideration, and directions for future research are identified.

Fields of Study & Subjects

Stock Market Forecasting Methods Financial Markets and Investment Strategies Forecasting Techniques and Applications

Publication details

Journal / source
Academic Journal of Science and Technology
Volume
19
Issue
2
Pages
384–394
Publication date
29 January 2026