An Efficient Algorithm for Stock Market Prediction Using Attention Mechanism

 

Zena Kreem Minsoor1,*, Ali Yakoob Al-Sultan1

1Department of Computer, College of Science for Women, University of Babylon, Babylon, Iraq

Emails: scw734.zynh.kareem@student.uobablyon.edu.iq; ali.alsultan@uobabylon.edu.iq

 

Abstract

Forecasting the stock market is a significant challenge in the financial industry due to its time series' complicated, noisy, chaotic, dynamic, volatile, and non-parametric nature. Nevertheless, due to computer advancements, an intelligent model can assist investors and expert analysts mitigate the risk associated with their investments. In recent years, substantial research has been conducted on deep learning models. Many studies have investigated using these techniques to anticipate stock values by analyzing historical data and technical indications. However, since the goal is to create predictions for the financial market, validating the model using profitability indicators and model performance is crucial. This article incorporates the attention mechanism model, incorporating attention from both feature and time perspectives. Utilize artificial neural networks. This approach addresses issues in time series prediction. The issue is the varying degrees of influence that many input features have on the target sequence. To tackle this, the method utilizes a feature attention mechanism to obtain the weights of distinct input features. An enhanced feature association relationship is achieved, whereas the data before and following the sequence exhibit a significant time correlation. An attention technique is employed to address this issue, allowing for the acquisition of weights at various time intervals to enhance robustness and temporal dependence. The system is applied to the three global SMs (TESLA, S&P500, and NASDAQ) datasets, the best enhancement results are 99% in Acc, and the better results improvement to minimize error in MSE, MAPE, and RMSE are 0.004, 0.004 and 0.01 respectively.

Keywords: Stock market Prediction; Deep learning; Neural networks; Sentiment analysis; Reinforcement learning; Financial markets; Trading strategies