Journal of Human, Earth, and Future (Dec 2022)

Tesla Stock Close Price Prediction Using KNNR, DTR, SVR, and RFR

  • . Edward,
  • . Suharjito

DOI
https://doi.org/10.28991/HEF-2022-03-04-01
Journal volume & issue
Vol. 3, no. 4
pp. 403 – 422

Abstract

Read online

The growth of every nation's economy depends heavily on the stock market. Because of their strong predictive powers, "K-Nearest Neighbor Regression (KNNR), Random Forest Regression (RFR), Decision Tree Regression (DTR), and Support Vector Regression (SVR)" is commonly used. From the previous study, it shows that the chosen state-of-the-art of previous studies is by Shah et al. (2021) using Bi-LSTM. But the state-of-the-art model shows a high Mean Squared Error (MSE) value that is 5% for predict Tesla Stock. Therefore, we propose the SVR, KNNR, DTR, and RFR model hope error value can be reduced. However, those models have difficulties finding suitable parameters for prediction. Due to that, we proposed the best parameters that were commonly used in studies which is SVR with RBF kernel, C = [1; 10; 100], gamma = [0, 1; 0, 2], epsilon = 0,1, KNNR with K = [1, 3, 5, 7, 9], and DTR with a criterion = [‘squared_error’;’friedman_mse’], RFR with 0 < n_estimators < 100 is picked to enhance the predictive capabilities of each proposed model. To prove this, a comparison is made with each proposed model, and choose the best proposed model then compared to the state-of-the-art of the previous study, which is Bi-LSTM. The dataset used was the Tesla Stock historical data from yahoo finance. The result showed RFR with n_estimators = 87 is superior to its comparison with results of 0.005452 RMSE, 0.000029 MSE, and 0.999296 R2 and compared to Bi-LSTM have about 0.11773 RMSE, 0.01386 MSE, and 0.791263 R2. Based on this study, it can be concluded that RFR with n_estimators = 87 has superior predictive capabilities performance compared with other models and the state-of-the-art of previous studies. Doi: 10.28991/HEF-2022-03-04-01 Full Text: PDF

Keywords