Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (13): 185-194.DOI: 10.3778/j.issn.1002-8331.2112-0005

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Research on Stock Prediction Based on Generative Adversarial Networks

YAN Dongmei, LI Bin   

  1. School of Science and Engineering, Tianjin University of Finance and Economics, Tianjin 300222, China
  • Online:2022-07-01 Published:2022-07-01

基于生成式对抗神经网络的股票预测研究

严冬梅,李斌   

  1. 天津财经大学 理工学院,天津 300222

Abstract: Aiming at the nonlinear and non-stationary characteristics of stock price, this paper proposes a generative adversarial neural network model(SAR-GAN) combining self-attention mechanism and residual network. The generator of the model is composed of LSTM layer, self-attention mechanism layer and residual layer, which is used to generate the price of the predicted stock. Discriminator is used to distinguish the generated stock price from the real stock price. In order to verify the good generalization of the model, the Shanghai composite index and the leading stocks of hot industries in different stock markets are selected for prediction experiments. The experimental results show that compared with LSTM, GRU, CNN-LSTM and CNN-GRU models, the SAR-GAN model can reduce the prediction error in different degrees.

Key words: stock forecasting, generative adversarial networks(GAN), self-attention mechanism

摘要: 针对股票价格具有非线性、非平稳的特点,提出一种结合自注意力机制和残差网络的生成式对抗神经网络模型(SAR-GAN)。该模型的生成器(generator)由长短期记忆网络(LSTM)层、自注意力机制层、残差层等构建而成,用于生成所预测股票的价格;判别器(discriminator)用于鉴别生成的股票价格与真实的股票价格。为验证模型良好的泛化性,选取上证指数及不同股票市场的热点行业龙头股票进行预测实验。实验结果表明,与LSTM、GRU、CNN-LSTM、CNN-GRU等模型相比,SAR-GAN模型能不同程度地减少预测误差。

关键词: 股票预测, 生成式对抗神经网络, 自注意力机制