Journal of Allied Research in Management and Entrepreneurship (JARME)

NEURAL FINANCE: A COMPREHENSIVE EXPLORATION OF STOCK PRICE PREDICTION USING CNN AND LSTM

Authors

  • Wei Zhang Financial Mathmatics, Xi'an Jiaotong-Liverpool University, 111 Ren’ai Road, Suzhou, China

Abstract

This experiment explores the effectiveness of combining Convolutional Neural Networks (CNNs) and Long Short-Term Memory (LSTM) in forecasting stock prices, addressing the challenging nature of stock market prediction. Conventional methods often struggle to capture the intricate patterns within financial market data, but deep learning techniques, such as CNNs, offer promising opportunities for improved accuracy.

The study employs historical stock price data for Microsoft Corporation (MSFT) from January 1, 2013, to May 18, 2018, sourced from the Quandl API. Data preprocessing involves standardizing high, low, open, and close prices and creating input sequences representing six days of stock price data to capture temporal dependencies.

The CNN architecture incorporates 1D convolutional layers, max pooling, dropout regularization, and a final dense layer for prediction. Training employs the mean squared error (MSE) loss function and the Adam optimizer. The dataset is divided into 80% for training and 20% for testing.

By optimizing CNNs for stock chart images using techniques like residual learning and a bottleneck architecture, this research seeks to reveal hidden patterns within the data, ultimately contributing to the enhancement of stock price prediction accuracy.

Keywords:

Stock price prediction, Convolutional Neural Networks (CNNs), Long Short-Term Memory (LSTM), deep learning, financial time series

Published

2023-12-13

Issue

Section

Articles

How to Cite

Zhang , W. (2023). NEURAL FINANCE: A COMPREHENSIVE EXPLORATION OF STOCK PRICE PREDICTION USING CNN AND LSTM. Journal of Allied Research in Management and Entrepreneurship (JARME), 14(12), 1–9. Retrieved from https://zapjournals.com/Journals/index.php/jarme/article/view/1657

References

Cowles A. Can Stock Market Forecasters Forecast? Econom. 1933; 1:309.

K. -S. Moon and H. Kim, “Performance of deep learning in prediction of stock market volatility,” Economic Computation And Economic Cybernetics Studies And Research, vol. 53, no. 2, pp. 77–92, 2019. [3] He K, Zhang X, Ren S, Sun J. Deep Residual Learning for Image Recognition. In: 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) [Internet]. 2016. p. 770–8. http://ieeexplore. ieee. org/document/7780459/

Nicholas Refenes, A., Zapranis, A., & Francis, G. (1994). Stock performance modeling using neural networks: A comparative study with regression models. Neural Networks, 7(2), 375–388. https://doi. org/10. 1016/0893-6080(94)90030-2

M. O. Afolabi and O. Olude, "Predicting Stock Prices Using a Hybrid Kohonen Self Organizing Map (SOM)," 2007 40th Annual Hawaii International Conference on System Sciences (HICSS'07), Waikoloa, HI, USA, 2007, pp. 48-48, doi: 10. 1109/HICSS. 2007. 441.

Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270(2), 654-669.

Wu, J. M., Li, Z., Srivastava, G., Tasi, M., & Lin, J. C. (2020). A graph‐based convolutional neural network stock price prediction with leading indicators. Software: Practice and Experience, 51(3), 628– 644. https://doi. org/10. 1002/spe. 2915

Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural computation, 9(8), 17351780.

Sherstinsky, A. (2020). Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) network. Physica D: Nonlinear Phenomena, 404, 132306. https://doi. org/ 10. 1016/j. physd. 2019. 132306.

Chauhan, S., & Vig, L. (2015). Anomaly detection in ECG time signals via deep long short-term memory networks. In 2015 IEEE International Conference on Data Science and Advanced Analytics (DSAA) (pp. 1-7). IEEE. doi: 10. 1109/DSAA. 2015. 7344872.

Graves, A. (2013). Generating sequences with recurrent neural networks. arXiv preprint arXiv: 1308. 0850.

Muthukumar, P., & Zhong, J. (2021, February 1). A Stochastic Time Series Model for Predicting Financial Trends using NLP. https://doi. org/10. 48550/arXiv. 2102. 01290

Akita, R., Yoshihara, A., Matsubara, T., & Uehara, K. (2016). Deep learning for stock prediction using numerical and textual information. 2016 IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS), 1-6.

Bhardwaj, K. (2021, June 3). Convolutional Neural Network(CNN/ConvNet) in Stock Price Movement Prediction. https://doi. org/10. 48550/arXiv. 2106. 01920

Xu, B., Zhang, D., Zhang, S., Li, H., & Lin, H. (2018). Stock Market Trend Prediction Using Recurrent Convolutional Neural Networks. Natural Language Processing and Chinese Computing, 166– 177. https://doi. org/10. 1007/978-3-319-99501-4_14