| For a long time,the prediction of stock market returns and its interpretation have been the focus of research.The stable operation of the stock market can promote the development of the economic system.From a macro perspective,the stock market reflects the operation of the macro economy.If the volatility of the stock market can be predicted in advance,the regulatory authorities can make corresponding policy adjustments in a timely manner to promote market stability,thereby mitigating or avoiding systemic financial risks.From a micro level,the improvement of the forecasting accuracy and explanatory power of the stock market can help investors to choose appropriate investment strategies and effectively improve their personal return on assets.This paper focuses on the impact of macroeconomic factors and investor sentiment index on the forecast of stock market return,and conducts an in-depth analysis of the influencing factors of stock market return forecast and the interpretability of the attention mechanism,mainly including three issues.The first issue is choosing the right way to build investor sentiment.This article uses web crawler technology to obtain the text posts of the Shanghai Stock Exchange 50 Index stock bar of Oriental Fortune Online,and obtains the sentiment of investors on the Shanghai Stock Exchange 50 Index by analyzing the sentiment words of each post.Finally,by measuring the difference between daily positive and negative emotions and the ratio of all investor sentiments to obtain the investor sentiment index of this article.The second problem is how to choose suitable input features for stock market return forecasting.In this paper,from the feature pool of basic stock market transaction information and technical indicators,macroeconomic characteristics and investor sentiment characteristics,the stock market characteristics including basic stock market transaction data and technical indicators based on linear transformation of basic transaction data are selected,a total of 27 dimensions.The 7-dimensional macroeconomic characteristics and the constructed 1-dimensional investor sentiment index are selected as the initial features;the Light GBM algorithm is used for feature screening to obtain 9-dimensional variables with non-zero importance.These 9-dimensional variables include three variables: stock market characteristics,macroeconomic characteristics and investor sentiment characteristics,which verify the impact of the macroeconomic variables and investor sentiment proposed in this paper on the forecast of market returns.The third issue is the interpretability study of the market return forecast model of the Shanghai Stock Exchange 50 Index.In this paper,the features are reconstructed into high-frequency components,low-frequency components and trend terms through the fully integrated empirical mode decomposition of adaptive noise(CEEMDAN).According to the different fluctuation frequencies,choose to use long short-term memory neural network(LSTM)to predict high-frequency components with strong volatility and high complexity,and use gated recurrent neural network(GRU)with fewer parameters to predict sequences that are simpler and more volatile weak low frequency components;at the same time,this paper introduces an Attention mechanism,The weight of each feature is given by the attention mechanism to determine the importance of the feature,which improves the interpretability of the model while improving the prediction ability of LSTM/GRU;the results of the attention mechanism show that the deviation rate and the rise and fall are high-frequency components respectively and low-frequency components are the most important features.Therefore,in actual investment,short-term investors should focus on the deviation rate,and long-term investors should focus on the fluctuation rate indicators.In addition,investor sentiment indicators will have a relatively high impact on long-term and short-term forecasts.Compared with long-term investment,macroeconomic indicators are more important in short-term investment.Finally,this paper uses LSTM,GRU,Attention-LSTM and Attention-GRU as benchmark models to verify the superiority of the model proposed in this paper.According to three According to the results of various loss functions,the prediction performance of the Attention-LSTM-GRU model proposed in this paper is the best. |