Main Article Content
The use of machine learning (ML) in financial forecasting has become increasingly popular in recent years, as it has the potential to provide more accurate and reliable predictions than traditional statistical models. In this paper, we present a case study of ML-based stock price prediction, using historical data from the S&P 500 index. We compare the performance of two popular ML algorithms, support vector regression (SVR) and random forest (RF), in predicting stock prices over a period of one year. Our results show that both models were able to outperform the traditional autoregressive integrated moving average (ARIMA) model in terms of accuracy and error metrics. However, the SVR model was found to be more accurate in predicting short-term trends, while the RF model was better at capturing long-term patterns in the data. We also found that feature selection and preprocessing techniques, such as principal component analysis (PCA) and normalization, played important roles in improving the performance of the models. This study demonstrates the potential of ML in financial forecasting and highlights the importance of selecting the appropriate model and preprocessing techniques for optimal results.