Deep Learning Approach for Stock Price Prediction: Comparing Single and Hybrid Models

Document Type : Research Paper

Authors

1 Assistant Professor, Department of Financial Management, Faculty of Management and Accounting, Farabi Campus of University of Tehran, Qom, Iran.

2 M.Sc., Department of Financial Management, Faculty of Management and Accounting, Farabi Campus of University of Tehran, Qom, Iran.

Abstract

This study utilizes deep-learning models for stock price prediction, focusing on data from five companies listed on the Tehran Stock Exchange over the period 2001 to 2022. Five models are employed, including two hybrid models and three single models. The hybrid CNN-LSTM model serves as the primary model, with its predictive accuracy compared against the other four models. Results indicate that the CNN-LSTM model demonstrates superior performance relative to the others, although the CNN-GRU hybrid model also yields satisfactory results. Interestingly, among the single models, the CNN model surpasses both the LSTM and GRU models, defying initial expectations. The accuracy of the models is notably impacted by factors such as volatility, which increases uncertainty. This research, which exclusively relies on technical indicators, suggests that achieving optimal results hinges not only on selecting the right neural network but also on determining the appropriate number of layers in each model. Overall, the CNN-LSTM model delivers the best performance across four of the five stocks, with the CNN-GRU model slightly outperforming it for one stock. Among the single models, the CNN model consistently outperforms the others.

Keywords

Main Subjects


[1] Oussar, Y., & Dreyfus, G. (2000). Initialization by selection for wavelet network training. Neurocomputing, 34 (1): 131-143.
[2] Chong, E., Han, Ch., & Park F. (2017). Deep learning networks for stock market analysis and prediction: Methodology, data representations, and case studies. Expert Systems With Applications, (83): 187-205.
[3] Lee, M. C. (2009). Using support vector machine with a hybrid feature selection method to the stock trend prediction. Expert Systems with Applications, 36 (8): 10896-10904.
[4] Vanaga, R., & Sloka, B. (2020). Financial and capital market commission financing: Aspects and challenges. Journal of Logistics, 7 (1): 17-30.
[5] Sousa, J., Montevechi, J., & Miranda, R. (2019). Economic lot-size using machine learning, parallelism, metaheuristic, and simulation. Journal of Logistics, Informatics, and Service Science, 18 (2): 205-216.
[6] Zhang, L., & Kim, H. (2020). The influence of financial service characteristics on use intention through customer satisfaction with mobile fintech. Journal of System and Management Sciences, 10 (2): 82-94.
[7] Noorbakhsh, A., Soltani, R., & Asadi Mafi, M. (2021). “Supply Chain and Predictability of Return”. Advances in Industrial Engineering, 55(4), 323-333. doi: 10.22059/aie.2021.330003.1803
[8] Cao, Jian & Li, Zhi & Li, Jian, (2019). “Financial time series forecasting model based on CEEMDAN and LSTM,” Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 519(C), pages 127-139.
[9] Hiransha M, Gopalakrishnan E.A., Vijay Krishna Menon, Soman K.P. (2018), “NSE Stock Market Prediction Using Deep-Learning Models”, Procedia Computer Science, Volume 132, Pages 1351-1362.
[10] K. Khare, O. Darekar, P. Gupta and V. Z. Attar, (2017), "Short term stock price prediction using deep learning," 2nd IEEE International Conference on Recent Trends in Electronics, Information & Communication Technology (RTEICT), Bangalore, India, 2017, pp. 482-486, doi: 10.1109/RTEICT.2017.8256643.
[11] C. -Y. Lee and V. -W. Soo, (2017). “Predict Stock Price with Financial News Based on Recurrent Convolutional Neural Networks”, Conference on Technologies and Applications of Artificial Intelligence (TAAI), Taipei, Taiwan, 2017, pp. 160-165, doi: 10.1109/TAAI.2017.27.
[12] Peter T. Yamak, Li Yujian, and Pius K. Gadosey, (2020). “A Comparison between ARIMA, LSTM, and GRU for Time Series Forecasting”, In Proceedings of the 2019 2nd International Conference on Algorithms, Computing and Artificial Intelligence (ACAI '19). Association for Computing Machinery, New York, NY, USA, 49–55.
[13] Mehtab, S., Sen, J., Dutta, A. (2021). “Stock Price Prediction Using Machine Learning and LSTM-Based Deep Learning Models. In: Thampi, S.M., Piramuthu, S., Li, KC., Berretti, S., Wozniak, M., Singh, D. (eds) Machine Learning and Metaheuristics Algorithms, and Applications”. SoMMA 2020. Communications in Computer and Information Science, vol 1366. Springer, Singapore. https://doi.org/10.1007/978-981-16-0419-5_8.
[14] Jing, Nan & Wu, Zhao & Wang, Hefei. (2021). A Hybrid Model Integrating Deep Learning with Investor Sentiment Analysis for Stock Price Prediction. Expert Systems with Applications. 178. 115019. 10.1016/j.eswa.2021.115019.
[15] Shen, J., Shafiq, M.O. Short-term stock market price trend prediction using a comprehensive deep learning system. J Big Data 7, 66 (2020). https://doi.org/10.1186/s40537-020-00333-6.
[16] Sepp Hochreiter, Jürgen Schmidhuber; Long Short-Term Memory. Neural Comput 1997; 9 (8): 1735–1780. doi: https://doi.org/10.1162/neco.1997.9.8.1735.
[17] Rawat, Waseem & Wang, Zenghui. (2017). Deep Convolutional Neural Networks for Image Classification: A Comprehensive Review. Neural Computation. 29. 1-98. 10.1162/NECO_a_00990.
[18] Chung, J., Gulcehre, C., Cho, K., & Bengio, Y. (2014). Empirical evaluation of gated recurrent neural networks on sequence modeling. In NIPS 2014 Workshop on Deep Learning, December 2014.