Journal of Cybersecurity and Information Management JCIM 2690-6775 2769-7851 10.54216/JCIM https://www.americaspg.com/journals/show/3046 2019 2019 An Efficient Algorithm for Stock Market Prediction Using Attention Mechanism Department of Computer, College of Science for Women, University of Babylon, Babylon, Iraq Zena Zena Department of Computer, College of Science for Women, University of Babylon, Babylon, Iraq Ali Yakoob Al Al-Sultan 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. 2024 2024 352 366 10.54216/JCIM.140226 https://www.americaspg.com/articleinfo/2/show/3046