Forecasting stock prices using long short-term memory involving attention approach: An application of stock exchange industry

M Muhammad Idrees M Maqbool Hussain Sial N Najam Ul Hassan

Abstract

The Stability of the economy is always a great challenge across the world, especially in under developed countries. Many researchers have contributed to forecasting the Stock Market and controlling the situation to ensure economic stability over the past several decades. For this purpose, many researchers have built various models and gained benefits. This journey continues to date and will persist for the betterment of the stock market. This study is also a part of this journey, where four learning-based models are tailored for stock price prediction. Daily business data from the Karachi Stock Exchange (100 Index), covering from February 22, 2008 to February 23, 2021, is used for training and testing these models. This paper presenting four deep learning models with different architectures, namely the Artificial Neural Network model, the Recurrent Neural Network with Attention model, the Long Short-Term Memory Network with Attention model, and the Gated Recurrent Unit with Attention model. The Long Short-Term Memory with attention model was found to be the top-performing technique for accurately predicting stock exchange prices. During the Training, Validation and Testing Sessions, we observed the R-Squared values of the proposed model to be 0.9996, 0.9980 and 0.9921, respectively, making it the best-performing model among those mentioned above.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 20, Issue 3
Published March 18, 2025
Pages e0319679
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (3)

M

Muhammad Idrees

M

Maqbool Hussain Sial

N

Najam Ul Hassan