Abstract & Overview
The fluctuations, noise, and information load of the stock market necessitate efficient forecasting methods. The nonlinear and non-stationary nature of time-series data generated from the stock market makes predicting index prices complicated. In this dynamic market, intelligent forecasters develop analytical tools and predictive models that enable investors and traders to make informed decisions and reduce financial risks. Stock market data is categorized as a time series because it is generated regularly. Long Short-Term Memory (LSTM) networks are particularly effective for time-series forecasting. In this study, the trend of the Tehran Stock Exchange index and the Shapna stock has been predicted using an LSTM network. For data classification, the researchers compared the price of each day and the previous day. If the price increases or remains relatively stable compared to the last day, it is assigned to a class (1); if the price decreases, it is assigned to a class (-1). The DTW algorithm is used to compare the predicted results with actual values. By employing two-class classification and tuning the parameters of the LSTM network, model accuracy improved. Additionally, removing sections of the price chart affected by market excitement, considered outliers, played a key role in enhancing the prediction accuracy of the model