Financial time series are high noisy and highly volatile.In this paper,we propose a model incorporating the attention mechanism into a wavelet gated recurrent neural network(WT-attention-GRU)that predicts return rate sequences.By using principal component analysis(PCA),investor sentiment indicators are constructed to measure its impact on the market.Extreme Gradient Boosting algorithm is selected as the filtering and evaluation algorithm in the model.In order to improve the model's accuracy in predicting performance,wavelet reconstruction is used to denoise the input time series.Through the use of attention mechanisms,we can measure the impact of inputs on outputs,improve model interpretability,and further improve prediction accuracy.Finally,this article analyzes the Shanghai Stock Exchange 50 Index,the Shanghai and Shenzhen 300 Index,the Shenzhen Stock Exchange Component Index,and the Shanghai Composite Index for nearly ten-year history of trading day data.Compared with the benchmark model,WT-attention-GRU improves forecast accuracy.By learning input features simultaneously and weighting them,we demonstrate the dependence between input features and target variables,which makes the model more interpretable.