Enhancing Stock Price Forecasting with K-Means Clustering and Machine Learning: A Case Study on the Amman Stock Exchange
摘要
Forecasting stock prices is a complex task, but integrating additional insights can improve accuracy. In this study, K-Means clustering was used to identify daily trends in stock price movements, which were then incorporated into the forecasting process. This approach resulted in a 2% improvement in prediction accuracy, measured using Mean Squared Error (MSE). Three machine learning models—Random Forest (RF), XGBoost, and Linear Regression were evaluated, with XGBoost achieving the best performance. The data was sourced from the banking and services sector of the Amman Stock Exchange. These findings demonstrate how unsupervised learning can enhance traditional forecasting techniques, providing valuable insights for traders and analysts.