Research Article

Stock price forecasting by supervised learning methods

Jinzhong Lu*
University of Warwick

* Corresponding author: [email protected]

Abstract

Predicting stock prices has already long been a popular but challenging topic due to unavoidable uncertainties in various factors. With continuous exploration and development of machine learning algorithms over the years, they have become more and more popular in forecasting stock value changes. This paper aiming to predict future stock prices using returns from the past by applying three different supervised learning methods to the seemingly unpredictable dataset, namely Long Short-Term Memory (LSTM), Linear regression and Fully connected Neural Networks (FNN). R-squared and MSE were used as statistical indicators of the performance of each model. The calculated R-squared values for linear regression, LSTM and FNN were 0.876975, 0.898741 and 0.929504 respectively. In addition, the MSE of the corresponding models were 5.7786893, 0.0007542 and 0.0005237. As a conclusion, FNN performed the best in the sense that it put out the highest R-squared and lowest MSE value. As a result, FNN may take priority to the other manners in future predictions.

Keywords: Supervised Learning Methods; LSTM; Linear Regression; FNN
Published: March 25, 2024
DOI: 10.54254/2755-2721/50/20241508
Volume: ACE Vol.50
pp. 206-212
Download PDF

References

  1. Chaudhary, A., Gupta, A., Pahariya, D., & Singh, S. K. (2023). Stock Price Prediction of Tesla & Apple using LSTM. In ITM Web of Conferences (Vol. 56, p. 02006). EDP Sciences.
  2. Yu, P., & Yan, X. (2019). Stock price prediction based on deep neural networks. Neural Computing and Applications, 32(6), 1609–1628.
  3. Ariyo, A. A., Adewumi, A. O., & Ayo, C. K. (2014, March). Stock price prediction using the ARIMA model. In 2014 UKSim-AMSS 16th international conference on computer modelling and simulation (pp. 106-112). IEEE.
  4. Lu, W., Li, J., Wang, J., & Qin, L. (2020). A CNN-BiLSTM-AM method for stock price prediction. Neural Computing and Applications, 33(10), 4741–4753.
  5. Vijh, M., Chandola, D., Tikkiwal, V. A., & Kumar, A. (2020). Stock Closing Price Prediction using Machine Learning Techniques. Procedia Computer Science, 167, 599–606.
  6. Ghosh, A., Bose, S., Maji, G., Debnath, N. C., & Sen, S. (2019). Stock price prediction using LSTM on Indian share market. EPiC Series in Computing.
  7. Lin, X., Yang, Z., & Song, Y. (2009). Short-term stock price prediction based on echo state networks. Expert Systems With Applications, 36(3), 7313–7317.
  8. Maulud, D., & Abdulazeez, A. M. (2020). A Review on Linear Regression Comprehensive in Machine Learning. Journal of Applied Science and Technology Trends, 1(4), 140–147.
  9. Jain, A., Mao, J., & Mohiuddin, K. (1996b). Artificial neural networks: a tutorial. IEEE Computer, 29(3), 31–44.
  10. Li, Q., Zhai, Z., Li, Q., Wu, L., Bao, L., & Sun, H. (2023b). Improved Bathymetry in the South China Sea from Multisource Gravity Field Elements Using Fully Connected Neural Network. Journal of Marine Science and Engineering, 11(7), 1345.
  11. Renaud, O., & Victoria-Feser, M.-P. (2010, October 29). A Robust Coefficient of Determination for Regression. Social Science Research Network.