摘要
Stock price prediction is a typical complex time series prediction problem characterized by dynamics,nonlinearity,and complexity.This paper introduces a generative adversarial network model that incorporates an attention mechanism(GAN-LSTM-Attention)to improve the accuracy of stock price prediction.Firstly,the generator of this model combines the Long and Short-Term Memory Network(LSTM),the Attention Mechanism and,the Fully-Connected Layer,focusing on generating the predicted stock price.The discriminator combines the Convolutional Neural Network(CNN)and the Fully-Connected Layer to discriminate between real stock prices and generated stock prices.Secondly,to evaluate the practical application ability and generalization ability of the GAN-LSTM-Attention model,four representative stocks in the United States of America(USA)stock market,namely,Standard&Poor’s 500 Index stock,Apple Incorporatedstock,AdvancedMicroDevices Incorporatedstock,and Google Incorporated stock were selected for prediction experiments,and the prediction performance was comprehensively evaluated by using the three evaluation metrics,namely,mean absolute error(MAE),root mean square error(RMSE),and coefficient of determination(R2).Finally,the specific effects of the attention mechanism,convolutional layer,and fully-connected layer on the prediction performance of the model are systematically analyzed through ablation study.The results of experiment show that the GAN-LSTM-Attention model exhibits excellent performance and robustness in stock price prediction.
基金
funded by the project supported by the Natural Science Foundation of Heilongjiang Provincial(Grant Number LH2023F033)
the Science and Technology Innovation Talent Project of Harbin(Grant Number 2022CXRCCG006).