ALSTM model is proposed to predict the closing price of the Shanghai Composite Index on the next trading day. The ALSTM model prevents model overfitting by improving the forgetting gate of the classical LSTM, introducing a 1-arctan function, and discarding weak data features. This paper uses the daily trading data of the Shanghai Composite Index from January 2, 1991, to July 16, 2021, as the dataset, and uses the RNN, CNN, GRU, and LSTM models as the comparison model of ALSTM to predict the closing price of the Shanghai Composite Index on the next trading day. The experimental results show that the ALSTM model has the best prediction performance compared to other comparison models, where the MAE of the ALSTM model is 28.52, MSE is 2065.25, RMSE is 45.45, and R 2 is 0.9811.