Research Article

Stock price prediction based on the long short-term memory network

Suqin Zhang*
Green River College

* Corresponding author: [email protected]

Abstract

Stock analysis is a challenging task that involves modelling complex and nonlinear dynamics of stock prices and volumes. Long Short-Term Memory (LSTM) is a type of recurrent neural network that can capture long-term dependencies and temporal patterns in time series data. In this paper, a stock analysis method based on LSTM is proposed that can predict future stock prices and transactions using historical data. Yfinance is used to obtain stock data of four technology companies (i.e. Apple, Google, Microsoft, and Amazon) and apply LSTM to extract features and forecast trends. Various techniques are also used such as moving average, correlation analysis, and risk assessment to evaluate the performance and risk of different stocks. When compare the method in this paper with other neural network models such as RNN and GRU, the result show that LSTM achieves better accuracy and stability in stock prediction. This paper demonstrates the effectiveness and applicability of LSTM method through experiments on real-world data sets.

Keywords: machine learning; stock price prediction; LSTM
Published: October 23, 2023
DOI: 10.54254/2755-2721/18/20230958
Volume: ACE Vol.18
pp. 28-32
Download PDF

References

  1. Yu Y Si X Hu C et al. 2019 A review of recurrent neural networks: LSTM cells and network architectures Neural computation 31(7): 1235-1270
  2. Staudemeyer R C Morris E R 2019 Understanding LSTM--a tutorial into long short-term memory recurrent neural networks arXiv preprint arXiv:1909.09586
  3. Smagulova K James A P 2019 A survey on LSTM memristive neural network architectures and applications The European Physical Journal Special Topics 228(10): 2313-2324
  4. Yin W Kann K Yu M 2017 et al. Comparative study of CNN and RNN for natural language processing arXiv preprint arXiv:1702.01923
  5. Bordino I Kourtellis N Laptev N et al. 2014 Stock trade volume prediction with yahoo finance user browsing behavior 2014 IEEE 30th International Conference on Data Engineering pp 1168-1173
  6. Lawrence A Ryans J Sun E et al. 2018 Earnings announcement promotions: A Yahoo Finance field experiment Journal of Accounting and Economics 66(2-3) 399-414
  7. Xu S Y Berkely C U 2014 Stock price forecasting using information from Yahoo finance and Google trend UC Brekley
  8. Ketkar N Ketkar N 2017 Introduction to keras Deep learning with python: a hands-on introduction 97-111
  9. Qiu Y Yang Y Lin Z et al. 2020 Improved denoising autoencoder for maritime image denoising and semantic segmentation of USV China Communications 17(3): 46-57
  10. Kayalibay B Jensen G van der Smagt P 2017 CNN-based segmentation of medical imaging data arXiv preprint arXiv:1701.03056