When using technical methods to establish LSTM stock prediction model, the traditional methods often lead to poor generalization and poor prediction effect due to many input data variables, overlapping of data information and great influence of outliers on training and other factors. In view of such problems, this paper proposes to use principal component analysis to reduce the dimension of basic data, and then combine the stock related technical indicators KDJ and MACD as input data, and make prediction after adjustment according to the stock characteristic model. The experimental results show that the PCA-S-LSTM model can not only reduce the average error of prediction, but also greatly reduce the running time and improve the stability of prediction. It can predict the closing price of Ping An Bank more accurately and has application value