[论文解读] Using Twitter Attribute Information to Predict Stock Prices
本研究开发了一种基于LSTM的深度学习模型,整合了历史股价、技术指标以及Twitter属性(如情感得分、转发数、点赞数、关注者数量和认证状态),以预测股价。当结合技术分析与Twitter数据时,该模型将均方误差(MSE)降低了11%;仅添加Twitter属性时,MSE亦降低了3%,表明这些社交媒体特征对股价走势预测具有增量价值。
Being able to predict stock prices might be the unspoken wish of stock investors. Although stock prices are complicated to predict, there are many theories about what affects their movements, including interest rates, news and social media. With the help of Machine Learning, complex patterns in data can be identified beyond the human intellect. In this thesis, a Machine Learning model for time series forecasting is created and tested to predict stock prices. The model is based on a neural network with several layers of LSTM and fully connected layers. It is trained with historical stock values, technical indicators and Twitter attribute information retrieved, extracted and calculated from posts on the social media platform Twitter. These attributes are sentiment score, favourites, followers, retweets and if an account is verified. To collect data from Twitter, Twitter's API is used. Sentiment analysis is conducted with VADER. The results show that by adding more Twitter attributes, the MSE between the predicted prices and the actual prices improved by 3%. With technical analysis taken into account, MSE decreases from 0.1617 to 0.1437, which is an improvement of around 11%. The restrictions of this study include that the selected stock has to be publicly listed on the stock market and popular on Twitter and among individual investors. Besides, the stock markets' opening hours differ from Twitter, which constantly available. It may therefore introduce noises in the model.
研究动机与目标
- 探究Twitter属性信息是否能在传统技术指标之外提升股价预测的准确性。
- 开发并评估一种整合金融时间序列数据与社交媒体情感及互动指标的深度学习模型。
- 评估Twitter属性(如情感、转发数和关注者数量)对股价预测性能的增量贡献。
- 考察数据采集限制(如API速率限制及市场与社交媒体时间错配)对模型鲁棒性的影响。
- 探索利用公开的Twitter数据与历史股价数据进行算法交易应用的可行性。
提出的方法
- 采用多层长短期记忆(LSTM)单元堆叠的深度神经网络架构,后接全连接层,用于时间序列预测。
- 模型在历史股价、技术指标(如SMA5、布林带)以及通过Twitter API提取的工程化Twitter属性组合数据上进行训练。
- 使用VADER(情感感知词典与情绪推理器)分析Twitter情感,同时从微博元数据中提取互动指标,如转发数、点赞数、关注者数量和认证状态。
- 数据预处理包括归一化处理及对不平衡或缺失数据的处理,重点在于保持时间顺序以避免时间序列预测中的数据泄露。
- 通过按时间顺序划分的测试集,使用均方误差(MSE)对模型进行评估,以确保时间有效性。
- 本研究对比了不同模型的预测性能:基线模型(仅使用股价数据)、加入技术指标的模型,以及加入Twitter属性的模型。
实验结果
研究问题
- RQ1当与技术指标结合时,Twitter属性(如情感、转发数和关注者数量)在多大程度上提升了股价预测的准确性?
- RQ2社交媒体数据的引入如何影响模型在市场波动环境下的泛化能力与鲁棒性?
- RQ3Twitter属性与技术指标在降低股价预测误差方面的相对贡献如何?
- RQ4数据采集限制(如API速率限制及市场活动与社交媒体活动的时间错配)如何影响模型性能?
- RQ5当使用金融数据与社交媒体数据的混合数据集进行训练时,深度学习模型能否有效学习股价变动中的非线性模式?
主要发现
- 引入技术指标使均方误差(MSE)从0.1617降至0.1437,预测准确率提升11%。
- 仅添加Twitter属性即使预测准确率提升3%(以MSE降低衡量),表明其在市场波动期间具有增量价值。
- 当同时结合技术指标与Twitter属性时,模型表现最佳,表明两类信息源具有互补性。
- 尽管模型表现成功,但Twitter属性的贡献仍弱于技术指标,表明基本面与技术因素仍是主导预测因子。
- 研究过程中遭遇数据采集挑战,包括API速率限制、临时封禁以及因计算资源限制导致的数据缺失,影响了数据完整性。
- 预处理方法(尤其是使用scikit-learn进行的归一化)可能因过度缩放Twitter情感得分,无意中削弱了其影响,可能掩盖了其真实预测能力。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。