IEEE Access (Jan 2021)

Impact of Hyperparameter Tuning on Machine Learning Models in Stock Price Forecasting

  • Kazi Ekramul Hoque,
  • Hamoud Aljamaan

DOI
https://doi.org/10.1109/ACCESS.2021.3134138
Journal volume & issue
Vol. 9
pp. 163815 – 163830

Abstract

Read online

Stock price forecasting has been reported as a challenging task in the scientific and financial communities due to stock prices’ nonlinear and dynamic nature. Machine learning models exhibit capabilities that allow them to handle nonlinear data and be candidate tools for stock price forecasting. In this study, an empirical evaluation of eight conventional machine learning models’ is conducted to forecast the stock price of eleven companies belonging to the Saudi Stock Exchange. Moreover, the optimal configuration of hyperparameters in each machine learning model is identified. Forecasting performance is evaluated by two well-known error metrics: Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE). Wilcoxson effect size is utilized to determine the impact of hyperparameter tuning by comparing tuned and un-tuned machine learning models’ forecasting performance. Empirical results indicate there are varying impacts of hyperparameter tuning of machine learning models in forecasting stock price. After tuning the hyperparameters, Support Vector Regression outperforms other forecasting models with a significant statistical difference. In contrast, Kernel Ridge Regression shows noteworthy forecasting performance without hyperparameter tuning with respect to other un-tuned forecasting models. However, Decision Tree and K-Nearest Neighbour are the poor-performing models which demonstrate inadequate forecasting performance even after hyperparameter tuning.

Keywords