Academic Journal of Computing & Information Science, 2023, 6(10); doi: 10.25236/AJCIS.2023.061012.
North China University of Water Resources and Electric Power, Zhengzhou, 450046, China
Creating a trading strategy and selecting the ideal time to purchase or sell stocks depends in large part on stock price expectations. This paper provides a CNN-based stock price time series forecasting method, which proves the optimality of the model by comparing the accuracy of different models, which provides a possible direction for the exploration of stock price forecasting. This paper first introduces the working principle of CNN, LSTM, and Conv1D, and then experiments are carried out by establishing a model, and finally the relevant conclusions are obtained. The experimental results show that the Trainscore RMSE, Train MAE, Testscore RMSE, Test MAE, and MAE of CNN has a smaller size. Thus, in comparison to the LSTM and Conv1D-LSTM, CNN is the model with the best efficiency and greatest accuracy in forecasting, which is more suitable for investors to predict future stock prices than LSTM and Conv1D-LSTM.
CNN, LSTM, Stock price prediction
Linlu Mao. Analysis of Forecasting Stock Prices Using CNN Model. Academic Journal of Computing & Information Science (2023), Vol. 6, Issue 10: 79-84. https://doi.org/10.25236/AJCIS.2023.061012.
 Ozbayoglu A. M., Gudelek M. U., Sezer O. B., ” Deep learning for financial applications: A survey, ” Applied Soft Computing, 93 (2020), Article 106384
 Jin Z., Yang Y. & Liu Y. Stock closing price prediction based on sentiment analysis and LSTM. Neural Comput & Applic 32, 9713–9729 (2020). https://doi. org/10. 1007/s00521-019-04504-2
 Jaimin Shah, Darsh Vaidya, Manan Shah,” A comprehensive review on multiple hybrid deep learning approaches for stock prediction,” Intel. Syst. Appl., 16 (2022), pp. 1-14, 10. 1016/j. iswa. 2022. 200111
 Jing N., Wu Z., Wang H. ”A hybrid model integrating deep learning with investor sentiment analysis for stock price prediction, ” Expert Syst. Appl., 178 (2021), Article 115019
 A. Moghar, M. Hamiche,” Stock market prediction using LSTM recurrent neural network,” Procedia Comput. Sci., 170 (2020), pp. 1168-1173, 10. 1016/j. procs. 2020. 03. 049
 Yi Sun, Qingsong Sun, Shan Zhu. Prediction of Shanghai Stock Index Based on Investor Sentiment and CNN-LSTM Model. Journal of Systems Science and Information. 2022, 10(6): 620-632 https://doi. org/10. 21078/JSSI-2022-620-13
 Keren He, Qian Jiang. Research on stock prediction algorithm based on CNN and LSTM. Academic Journal of Computing & Information Science (2022), Vol. 5, Issue 12: 98-106. https://doi. org/10. 25236/ AJCIS. 2022. 051215.
 B. Zhao, H. Lu, S. Chen, J. Liu and D. Wu, "Convolutional neural networks for time series classification, " in Journal of Systems Engineering and Electronics, vol. 28, no. 1, pp. 162-169, Feb. 2017, doi: 10. 21629/JSEE. 2017. 01. 18.
 Tong Wang, Panji Wang, Menghan Yu, Compare CNN and LSTM Model to Forecast the Stock Price. Financial Engineering and Risk Management (2022) Vol. 5: 44-52. DOI: http://dx. doi. org/10. 23977/ ferm. 2022. 050607
 O. B. Sezer, A. M. Ozbayoglu, ” Algorithmic financial trading with deep convolutional neural networks: Time series to image conversion approach, ” Applied Soft Computing, 70 (2018), pp. 525-538