[论文解读] Stock price prediction using BERT and GAN
本文提出S-GAN,一种集成模型,将finBERT用于金融新闻的情感分析,并结合使用GRU作为生成器、1D-CNN作为判别器的生成对抗网络(GAN),以预测苹果公司(Apple Inc.)的股价。通过将情感得分作为潜在噪声,该模型相比原始GAN将均方根误差(RMSE)降低了35%,并在5日、15日和30日预测周期内优于LSTM、GRU和ARIMA模型。
The stock market has been a popular topic of interest in the recent past. The growth in the inflation rate has compelled people to invest in the stock and commodity markets and other areas rather than saving. Further, the ability of Deep Learning models to make predictions on the time series data has been proven time and again. Technical analysis on the stock market with the help of technical indicators has been the most common practice among traders and investors. One more aspect is the sentiment analysis - the emotion of the investors that shows the willingness to invest. A variety of techniques have been used by people around the globe involving basic Machine Learning and Neural Networks. Ranging from the basic linear regression to the advanced neural networks people have experimented with all possible techniques to predict the stock market. It's evident from recent events how news and headlines affect the stock markets and cryptocurrencies. This paper proposes an ensemble of state-of-the-art methods for predicting stock prices. Firstly sentiment analysis of the news and the headlines for the company Apple Inc, listed on the NASDAQ is performed using a version of BERT, which is a pre-trained transformer model by Google for Natural Language Processing (NLP). Afterward, a Generative Adversarial Network (GAN) predicts the stock price for Apple Inc using the technical indicators, stock indexes of various countries, some commodities, and historical prices along with the sentiment scores. Comparison is done with baseline models like - Long Short Term Memory (LSTM), Gated Recurrent Units (GRU), vanilla GAN, and Auto-Regressive Integrated Moving Average (ARIMA) model.
研究动机与目标
- 通过整合金融新闻中的情感分析与深度学习模型,提升股价预测性能。
- 解决传统时间序列模型(如ARIMA)和RNN在捕捉复杂市场动态方面的局限性。
- 探索情感作为潜在向量在基于GAN的股价预测中的影响,以提升收敛速度与预测准确性。
- 开发一种适用于日内交易决策的实用型短期预测模型。
- 展示情感信息增强的GAN在多周期股价预测中相对于传统模型的优越性。
提出的方法
- 使用微调后的BERT模型(finBERT)从与苹果公司相关的新闻标题和文章中提取情感得分。
- 将技术指标(如7日均线、21日均线、RSI、MACD、布林带、指数移动平均线、对数动量)以及全球市场指数作为输入特征。
- 采用生成对抗网络(GAN)架构,其中生成器基于GRU,判别器基于1D-CNN,用于生成未来股价。
- 生成器使用情感得分作为潜在噪声向量,而非随机高斯噪声,从而实现更快的收敛速度与更优的性能。
- 使用Adam优化器进行模型训练,学习率为0.00016,批量大小为128,训练165个周期,最小化均方误差(MSE)。
- 通过在测试数据上计算5日、15日和30日预测周期的RMSE,对模型性能进行评估,并与LSTM、GRU、原始GAN和ARIMA模型进行比较。
实验结果
研究问题
- RQ1能否通过金融新闻中提取的情感得分提升基于GAN的股价预测模型性能?
- RQ2在GAN生成器中使用情感作为潜在向量,与使用随机噪声相比,在收敛速度和预测准确性方面有何差异?
- RQ3与传统模型相比,技术指标与情感分析的融合在多周期股价预测中的增强效果如何?
- RQ4所提出的S-GAN模型是否在短期预测周期内优于LSTM、GRU和ARIMA等成熟模型?
- RQ5基于日终收盘价和情感信息,该模型能否有效应用于实时或日内交易决策?
主要发现
- S-GAN模型在测试集上的RMSE为1.827,相比原始GAN的RMSE 2.369降低了35%。
- 在5日预测周期中,S-GAN的RMSE为0.0122,优于ARIMA(0.121)、LSTM(0.0196)、GRU(0.01975)和原始GAN(0.0158)。
- 在15日预测周期中,S-GAN的RMSE为0.0366,显著低于ARIMA(0.3658)、LSTM(0.0585)、GRU(0.05925)和原始GAN(0.0474)。
- 在30日预测周期中,S-GAN的RMSE为0.0732,比Zhang et al.(2019)报告的类似模型(无情感信息)的RMSE低50%。
- 由于情感得分作为潜在输入,模型表现出早期收敛,表明情感为市场方向提供了有意义的先验信息。
- S-GAN模型成功捕捉了市场趋势,并生成了逼真的价格序列,这通过对抗训练过程中判别器能够有效区分真实数据与生成数据得到验证。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。