Abstract
Stock market prediction presents considerable challenges for investors, financial institutions, and policymakers operating in complex market environments characterized by noise, non-stationarity, and behavioral dynamics. Traditional forecasting methods often fail to capture the intricate patterns and cross-sectional dependencies inherent in financial markets. This paper presents an integrated framework combining a node transformer architecture with BERT-based sentiment analysis for stock price forecasting. The proposed model represents the stock market as a graph structure where individual stocks form nodes and edges capture relationships including sectoral affiliations, correlated price movements, and supply chain connections. A fine-tuned BERT model extracts sentiment from social media posts and combines it with quantitative market features through attention-based fusion. The node transformer processes historical market data while capturing both temporal evolution and cross-sectional dependencies among stocks. Experiments on 20 S&P 500 stocks spanning January 1982 to March 2025 demonstrate that the integrated model achieves a mean absolute percentage error (MAPE) of 0.80% for one-day-ahead predictions, compared to 1.20% for ARIMA and 1.00% for LSTM. Sentiment analysis reduces prediction error by 10% overall and 25% during earnings announcements, while graph-based modeling contributes an additional 15% improvement by capturing inter-stock dependencies. Directional accuracy reaches 65% for one-day forecasts. Statistical validation through paired t-tests confirms these improvements (p < 0.05 for all comparisons). The model maintains MAPE below 1.5% during high-volatility periods where baseline models exceed 2%.
Abstract (translated)
股票市场的预测对于投资者、金融机构和政策制定者来说在复杂市场环境中面临着巨大的挑战,这些环境充满了噪音、非平稳性和行为动态。传统预测方法往往无法捕捉到金融市场中固有的复杂模式和跨截面依赖性。本文提出了一种结合节点变压器架构与基于BERT的情感分析的综合框架,用于股票价格预测。 该模型将股票市场表示为图结构,在这种结构中,单个股票形成节点,边则代表包括行业关联、相关的价格变动以及供应链连接在内的关系。经过微调的BERT模型从社交媒体帖子中提取情感,并通过基于注意力机制的方法将其与定量市场特征相结合。节点变压器处理历史市场数据,同时捕捉股票之间的时序演变和跨截面依赖性。 在针对20只标普500成分股进行的实验中(涵盖1982年1月至2025年3月期间的数据),综合模型在一日前预测中的平均绝对百分比误差(MAPE)为0.80%,相比之下,ARIMA模型和LSTM模型分别为1.20%和1.00%。情感分析整体上减少了预测误差的10%,在财报发布期间减少幅度高达25%,而基于图的方法通过捕捉股票间的依赖关系贡献了额外15%的改进。方向准确性达到了65%的一日预报水平。配对t检验的统计验证证实了这些改进(所有比较中的p值均小于0.05)。在高波动性期间,模型维持MAPE低于1.5%,而基准模型则超过2%。 这一研究证明,在复杂且充满不确定性的金融市场中,综合使用先进的机器学习技术和基于图的方法可以显著提高预测准确性。
URL
https://arxiv.org/abs/2603.05917