计算机工程与应用2025,Vol.61Issue(4):358-367,10.DOI:10.3778/j.issn.1002-8331.2405-0064
基于情绪词典和BERT-BiLSTM的股指预测研究
Research on Stock Index Prediction Based on Sentiment Lexicon and BERT-BiLSTM
摘要
Abstract
The uncertainty and complexity of the stock market make stock prediction as a challenging task.Given the potential value of financial texts in stock prediction,this paper adopts the lexicon-based method and BERT-BiLSTM(bidirectional encoder representations from transformers-bidirectional long short-term memory)model to extract emotional features from online financial news,and constructs a stock index prediction model that integrates emotional features and stock trading features.The experiment compares the predictive ability of the model before and after integrating these emo-tional features,and explores the differences in predictive ability between different models and different time periods.The experimental results indicate that sentiment features extracted by using the lexicon-based method and deep learning tech-niques can enhance the accuracy of stock index predictions for various models.Moreover,the LSTM model performs better than other experimental models in stock index prediction both before and after integrating sentiment features.Further analysis of different time spans shows that the stock index prediction model is more effective in forecasting stock index movements over shorter time spans.To validate the practical value of the stock index prediction model,backtesting is conducted on the HS300 index under bull,bear,and volatile market conditions.This combines the LSTM model with the deep Q-network(DQN)principle and compares the backtesting results with traditional moving average strategies and those incorporating the DQN reinforcement learning algorithm.The backtesting results demonstrate that compared to a single traditional trading strategy,the stock index prediction model that integrates traditional trading strategies and deep learning methods ensures positive Sharpe ratios and cumulative returns in both bull and bear markets,as well as in volatile markets,and effectively controls maximum drawdown,demonstrating stronger market adaptability and profitability.关键词
财经新闻情感特征/股指预测/BiLSTM模型/DQN强化学习Key words
financial news sentiment features/stock index prediction/BiLSTM model/DQN reinforcement learning分类
信息技术与安全科学引用本文复制引用
张少军,苏长利..基于情绪词典和BERT-BiLSTM的股指预测研究[J].计算机工程与应用,2025,61(4):358-367,10.基金项目
国家社会科学基金(21BJY238). (21BJY238)