Source-linked AI summary
MASTER: Market-Guided Stock Transformer for Stock Price Forecasting
Tong Li, Zhaoyang Liu, Yanyan Shen, Xue Wang, Haokun Chen, Sen Huang
TL;DR
Stock forecasting is difficult because prices reflect multiple factors, and existing correlation methods miss momentary cross-time relationships and changing feature effectiveness. MASTER combines market-guided feature selection with alternating intra-stock and inter-stock aggregation. Experiments report improvements over baselines on ranking and portfolio-based metrics.
Problem
Existing stock-correlation methods generally blur time-specific details, limiting their modeling of momentary cross-time correlations, while feature effectiveness also varies with market conditions.
Source: Introduction · pp. 1–2Method
MASTER uses market information to select features and alternates intra-stock temporal aggregation with inter-stock aggregation to model stock correlations.
Source: Introduction · p. 2, Overview · p. 2Results
13% average improvements on ranking metrics and 47% on portfolio-based metrics compared with all baselines are reported for the Chinese-market stock universes.
Source: Conclusion · p. 7Takeaways & Limitations
Attention-map visualizations reveal momentary and cross-time stock correlations, offering a more granular perspective for studying stock correlation.
Source: Conclusion · p. 7
Abstract
from arXiv · showhide
Stock price forecasting has remained an extremely challenging problem for many decades due to the high volatility of the stock market. Recent efforts have been devoted to modeling complex stock correlations toward joint stock price forecasting. Existing works share a common neural architecture that learns temporal patterns from individual stock series and then mixes up temporal representations to establish stock correlations. However, they only consider time-aligned stock correlations stemming from all the input stock features, which suffer from two limitations. First, stock correlations often occur momentarily and in a cross-time manner. Second, the feature effectiveness is dynamic with market variation, which affects both the stock sequential patterns and their correlations. To address the limitations, this paper introduces MASTER, a MArkert-Guided Stock TransformER, which models the momentary and cross-time stock correlation and leverages market information for automatic feature selection. MASTER elegantly tackles the complex stock correlation by alternatively engaging in intra-stock and inter-stock information aggregation. Experiments show the superiority of MASTER compared with previous works and visualize the captured realistic stock correlation to provide valuable insights.
Introduction
Stock forecasting must account for volatile prices shaped by multiple factors and stock relationships that shift across time and market conditions. MASTER combines market-guided feature selection with alternating temporal and stock information aggregation; experiments report stronger performance than baselines.
Introduction
- MASTER targets momentary and cross-time stock correlations and uses market information for feature selection; experiments report superiority over baselines.The paper also reports that attention-map visualizations reveal real-time stock-correlation dynamics.Source: Introduction · p. 2
Overview
- MASTER uses five stages: market-guided gating, intra-stock aggregation, inter-stock aggregation, temporal aggregation, and prediction.Intra-stock local embeddings relay signals to other stocks; a stock's latest temporal embedding queries its history to form a comprehensive embedding.Source: Overview · p. 2
Market-Guided Gating
- A market-status vector rescales feature dimensions so the model can emphasize or diminish their information before later modules.The status vector combines market-index price and trading-volume information; learned feature weights reflect features' forecasting contribution.Source: Market Status Representation · p. 2, §1 · p. 3, Gating Mechanism · p. 3
Intra-Stock Aggregation
- Intra-stock aggregation lets each time step gather information from other times while retaining a sequence of local embeddings and temporal details.Those local embeddings carry signals from the stock's history into subsequent modules.Source: Intra-Stock Aggregation · pp. 3–4
Inter-Stock Aggregation
- At each time step, attention learns asymmetric, dynamic correlations between stocks and aggregates their local embeddings.Earlier information from another stock can reach a target through that stock's intra-stock aggregation followed by same-time inter-stock aggregation.Source: Inter-Stock Aggregation · p. 4
Temporal Aggregation
- Temporal aggregation uses each stock's latest temporal embedding to attend over its historical temporal embeddings and form a comprehensive stock embedding.The resulting embedding summarizes the series of time-specific stock embeddings.Source: Temporal Aggregation · p. 4
Prediction and Training
- A predictor maps each comprehensive stock embedding to a label, and training jointly optimizes stocks in a batch for a prediction date using MSE loss.Each epoch contains batches corresponding to different training-set prediction dates.Source: Prediction and Training · p. 4
Discussions
- With M ≫ τ, MASTER has time complexity O(N2M^2τD^2), reducing computation by about τ times versus attention over the full M × τ field.The comparison is against directly operating on the M × τ attention field with N attention heads.Source: Complexity Analysis · pp. 4–5
Experiments
Experiments compare MASTER with forecasting baselines, test its architecture and hyperparameters, and visualize stock correlations. MASTER leads on most reported metrics, while the attention maps show momentary and cross-time correlations.
Experiments
- Experiments use CSI300 and CSI800, comparing forecasting baselines with ranking and top-30 portfolio metrics across specified train, validation, and test periods.The test data covers Q3 2020 to Q4 2022.Source: Datasets · p. 5, Baselines · p. 5, Evaluation · p. 5
Overall Performance (RQ1)
- MASTER achieves the best results on 6/8 ranking metrics and outperforms all benchmarks on portfolio metrics, with average improvements of 13% and 47%, respectively, over the second-best results.The comparison is reported in Table 1; portfolio metrics use a strategy selecting the top 30 stocks.Source: Overall Performance (RQ1) · pp. 5–6, Table 1 · p. 6
Stock Transformer Architecture (RQ2)
- On CSI300, experiments support the tailored architecture’s alternating intra-stock and inter-stock aggregation; comparisons vary the attention field and sequential encoder.The alternatives include removing gating, substituting a bidirectional LSTM, aggregating all tokens directly, and clustering tokens.Source: Stock Transformer Architecture (RQ2) · p. 6, Table 2 · p. 6
Ablation Study (RQ3)
- Most studied (N1, N2) settings perform better than baselines, while differences among combinations are small relative to within-setting variance.The reported CSI800 results are similar to those on CSI300.Source: Ablation Study (RQ3) · p. 6, Figure 3 · p. 7
- The best-performing β is smaller on CSI800 than on the easier CSI300 dataset, where most features are effective and feature selection can be relaxed.A smaller β strengthens feature selection; a larger β weakens its effect.Source: Ablation Study (RQ3) · pp. 6–7, Figure 4 · p. 7
Visualization of Attention Maps (RQ4)
- Attention maps show scattered, sparse inter-stock correlations and cross-time patterns whose highlighted blocks are not centered on the diagonal.The mined correlation patterns change slowly across forecast dates when the windows cover the same absolute time scope.Source: Visualization of Attention Maps (RQ4) · p. 7, Figure 5 · p. 7, Figure 6 · p. 7
Conclusion
MASTER models stock correlations and guides feature selection with market information. On two Chinese-market stock universes, it outperforms all baselines on ranking and portfolio-based metrics; attention maps reveal momentary and cross-time correlations.
Conclusion
- 13% average improvements on ranking metrics and 47% on portfolio-based metrics versus all baselines were reported across two Chinese-market stock universes.Source: Conclusion · p. 7
- MASTER models realistic stock correlations and guides feature selection with market information.Source: Conclusion · p. 7
- Attention-map visualizations reveal momentary and cross-time stock correlations.Source: Conclusion · p. 7
- The authors describe MASTER as offering a more granular perspective on stock correlation and suggest exploring higher-quality correlations and other uses of market information.Source: Conclusion · p. 7
Related papers
This paper cites
Cited by
- Evolve on the Host, Predict on the Edge: Deploying Online Neuroevolutionary Architecture Search for Cross-sectional Stock Return Prediction2026
- Forecast Accuracy Is Not Trading Profit: Evolving Small Recurrent Networks for Stock Return Prediction2026
- Nyström Attention Matches Full Attention for Cross-Sectional Stock Prediction2026