Research Article

Stock Price Forecasting Using Long Short-Term Memory Networks: A Comprehensive Analysis of Financial Time-Series Data

Bofan Zhang*
College of Art and Science, New York University, NY, USA

* Corresponding author: [email protected]

Abstract

In this study, we employ Long Short-Term Memory (LSTM) networks to predict stock prices using historical data from Tesla Inc. spanning 10 years. The research emphasizes the importance of LSTM's capability to model complex temporal dependencies in financial time-series data, outperforming traditional statistical methods. Various feature combinations and time steps are tested, identifying a 30-day window as the optimal setup. Key evaluation metrics, including Mean Squared Error (MSE), training loss, and validation loss, are utilized to assess model performance. The results show that LSTM networks are particularly effective for short-term stock price predictions, while longer-term forecasts experience decreasing accuracy. This work contributes to the growing body of knowledge on deep learning applications in financial markets, offering practical insights for investors and financial institutions

Keywords: Stock Price Prediction; Long Short-Term Memory (LSTM); Deep Learning; Financial Time-Series; Time-Series Forecasting
Published: January 15, 2025
DOI: 10.54254/2753-8818/2025.20352
Volume: TNS Vol.87
pp. 196-207
Download PDF

References

  1. Selvin, S., Vinayakumar, R., Gopalakrishnan, E. A., Menon, V. K., & Soman, K. P. (2017, September). Stock price prediction using LSTM, RNN and CNN-sliding window model. In 2017 international conference on advances in computing, communications and informatics (icacci) (pp. 1643-1647). IEEE.
  2. Sunny, M. A. I., Maswood, M. M. S., & Alharbi, A. G. (2020, October). Deep learning-based stock price prediction using LSTM and bi-directional LSTM model. In 2020 2nd novel intelligent and leading emerging sciences conference (NILES) (pp. 87-92). IEEE.
  3. Jeenanunta, C., Chaysiri, R., & Thong, L. (2018, May). Stock price prediction with long short-term memory recurrent neural network. In 2018 International Conference on Embedded Systems and Intelligent Technology & International Conference on Information and Communication Technology for Embedded Systems (ICESIT-ICICTES) (pp. 1-7). IEEE.
  4. Srivastava, P., & Mishra, P. K. (2021, October). Stock market prediction using RNN LSTM. In 2021 2nd Global Conference for Advancement in Technology (GCAT) (pp. 1-5). IEEE.
  5. Wang, Y., Liu, Y., Wang, M., & Liu, R. (2018, October). LSTM model optimization on stock price forecasting. In 2018 17th international symposium on distributed computing and applications for business engineering and science (dcabes) (pp. 173-177). IEEE.
  6. Patel, J., Patel, M., & Darji, M. (2018). Stock price prediction using RNN and LSTM. Journal of Emerging Technologies and Innovative Research, 5(11), 1069-1079.
  7. Zhang, X., Gu, N., Chang, J., & Ye, H. (2021). Predicting stock price movement using a DBN-RNN. Applied Artificial Intelligence, 35(12), 876-892.
  8. Zhao, J., Zeng, D., Liang, S., Kang, H., & Liu, Q. (2021). Prediction model for stock price trend based on recurrent neural network. Journal of Ambient Intelligence and Humanized Computing, 12, 745-753.