| Today,with the rapid development of machine learning deep learning,neural network has been widely used in big data processing.It has achieved great success in processing time series data such as voice,video image and natural language.Therefore,many scholars try to apply deep learning neural network method to financial time series data to construct data-driven stock index prediction model.Among them,the classic long short term memory networks(LSTM)has been favored by scholars for its excellent sequence modeling ability.However,LSTM also has the defects of less modeling features and weak representation ability.Therefore,in recent years,some scholars try to combine the convolutional neural networks(CNN)with LSTM,but the effect is often limited.Through empirical comparative analysis,this paper finds that the poor effect of CNN combined with LSTM in the past is caused by the single scale of data feature extracted by CNN.In view of this discovery,this paper draws on the concept module based on multi-scale feature convolution proposed by Szegedy in 《Going deeper with convolution》.On this basis,some improvements are made according to the practical problems in this paper,and the multiscale feature convolution neural network(MCNN)is combined with LSTM.The empirical results show that the network structure based on multi-scale features is obviously better than that of single scale network structure.In addition,in the past two years,attention has attracted the attention of many scholars in the field of deep learning,and various modules based on attention have also proved the effectiveness of attention.In the past,the attention module proposed by scholars in the field of CNN is mostly used in two-dimensional data(image)or three-dimensional data(video).This paper proposes two simple and very effective attention modules for one-dimensional financial time series data: attention channel module and attention time step module,which can make the model more directional.Combined with MCNN and LSTM,this paper constructs the attention MCNN LSTM model based on multi-scale characteristics,and applies it to the prediction of Shanghai stock index.The empirical results show that the model has better fitting ability and generalization ability.Among the six evaluation indexes,five indexes are the best,and one index is the second best.At the same time,by comparing the model without attention module,the four indicators are significantly improved.Among them,in the MSE evaluation index,the attention module improves the performance of the model by 12.80%,which proves the effectiveness of the two attention modules proposed in this paper. |