计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (7): 274-281.DOI: 10.3778/j.issn.1002-8331.2305-0059

• 工程与应用 • 上一篇    下一篇

融合投资者情绪的S_AM_BiLSTM股价预测模型

袁婧,潘甦,谢浩,徐文鹏   

  1. 1.南京邮电大学 物联网学院,南京 210003
    2.南京邮电大学 通信与信息工程学院,南京 210003
  • 出版日期:2024-04-01 发布日期:2024-04-01

Stock Price Prediction Integrating Investor Sentiment Based on S_AM_BiLSTM Model

YUAN Jing, PAN Su, XIE Hao, XU Wenpeng   

  1. 1.School of Internet of Things , Nanjing University of Posts and Telecommunications , Nanjing 210003, China
    2.School of Communication and Information Engineering, Nanjing University of Posts and Telecommunications, Nanjing 210003, China
  • Online:2024-04-01 Published:2024-04-01

摘要: 股票价格预测一直是金融领域的研究热点之一。然而,股票价格的形成机制是相当复杂的,各种因素都可能会导致股票价格的变化。为此,提出了一种基于深度学习方法并融合多源数据和投资者情绪的股票价格预测混合模型(S_AM_BiLSTM)。利用文本卷积神经网络(TextCNN)对从股票论坛中提取的投资者评论进行情绪分析,并计算情绪指数。将情绪指数(sentiment)、技术指标和股票历史交易数据作为股价预测模型的特征集,采用双向长短时记忆神经网络(BiLSTM)对股票的收盘价进行预测,并在此基础上加入注意力机制(attention mechanism),提高预测精度。为了证明模型的有效性和适用性,随机选取4个重点行业的股票进行实证研究。实验结果表明,与其他单一模型和不含情绪因子的模型相比,所提出的混合模型的效果更优越。

关键词: 深度学习, 双向长短期记忆网络(BiLSTM), 文本卷积神经网络(TextCNN), 股价预测, 情绪分析

Abstract: Stock price forecasting has always been one of the research hotspots in the financial field. However, the formation mechanism of stock price is quite complex, and various factors may lead to the change of stock price. Therefore, this paper proposes a hybrid model of stock price forecasting based on deep learning method and integrating multi-source data and investor sentiment (S_AM_BiLSTM). First, it uses the TextCNN to analyze the sentiment of investor comments extracted from stock forums, and calculates the emotional factors. Then, taking emotional factors, technical indicators and stock historical trading data as the feature set of stock price prediction, the bi-directional long short-term memory neural network is used to predict the stock closing price, and on this basis, attention mechanism is added to improve the prediction accuracy. In order to prove the validity and applicability of the model, it randomly selects four key industries for empirical research. The experimental results show that the proposed hybrid model is more effective than other single models and models without emotional factors.

Key words: deep learning, bi-directional long short-term memory (BiLSTM), TextCNN, stock price prediction, sentiment analysis