Abstract:Aiming at the problems of timeliness and simplification of prediction functions in stock prediction models, this paper proposes a Bi-directional LSTM stock prediction model based on Long Short-Term Memory (LSTM) neural network, which combines self-attention mechanism and temporal convolution network (TCN). The learning unit and prediction unit in the BiLSTM-SA-TCN model can effectively learn important stock data, capture long-term dependency information, and output the predicted closing price of the next day's stock. The experimental results show that the prediction error RMSE of the BiLSTM-SA-TCN model is the smallest, the MAE is the smallest, and the fitting degree R2 is the best on multiple stock data sets. In the comparative experiments of different models, the BiLSTM-SA-TCN model has a higher generalization ability and a higher training efficiency.