On a given trading day, a stock-factor panel describes both how stocks differ across factors and how each factor varies across stocks. Most stock Transformers model relationships among stocks or across time. We introduce FToken, which also models relationships among factors. Its factor branch encodes all stocks' values for one factor as a token, applies self-attention across factors, and maps the result back to one return forecast per stock. A second branch applies attention across stocks in the same panel. A gate combines their forecasts using trailing factor covariance and market volatility. We evaluate both branches on NASDAQ, NYSE, and S&P 500 with the benchmarks' five price features and with 158 factors computed from the same data. On the 158-factor NASDAQ panel, averaging the two forecasts yields an information coefficient (IC) of 0.0421, compared with 0.0392 for the strongest external baseline. The gate raises IC to 0.0443 and gives the highest annualized excess return after costs. The equal-weight ensemble has the higher portfolio information ratio. Both combinations also improve on the strongest external baseline in mean IC on the other two 158-factor panels. On the five-feature NYSE panel, the differences are within the variation across seeds. ```
Figures & tables
Figure 1. FToken reads a daily panel along two axes. The highlighted row gives stock i ’s factor profile. The highlighted column gives factor j ’s values across stocks. After attention, the factor branch decodes its tokens back into stock order. Trailing covariance and volatility determine the weights on the two forecasts. Parallel paths read a stock-by-factor matrix by row and by column. Stock tokens attend to stocks and yield stock-level forecasts. Factor tokens attend to factors, then a dense decoder and a readout yield a forecast for each stock. Independently, factor covariance concentration, effective rank and index volatility feed a softmax gate. The final forecast is the weighted sum of the two forecasts.
NASDAQ
S&P 500
Method
IC
ICIR
RankIC
RankICIR
IC
ICIR
RankIC
RankICIR
Linear
0.0298
0.2173
0.0341
0.2363
0.0243
0.1756
0.0281
0.1958
MLP
0.0301 ±0.0019
0.2215 ±0.0136
0.0352 ±0.0020
0.2759 ±0.0141
0.0259 ±0.0019
0.1911 ±0.0136
0.0304 ±0.0020
0.2343 ±0.0139
LightGBM
0.0371
0.3010
0.0359
0.2929
0.0327
0.2586
0.0318
0.2629
ALSTM
0.0322 ±0.0030
0.2550 ±0.0223
0.0401 ±0.0024
0.3236 ±0.0192
0.0281 ±0.0020
0.2079 ±0.0139
0.0349 ±0.0022
0.2741 ±0.0171
Transformer
0.0264 ±0.0025
0.1965 ±0.0188
0.0355 ±0.0027
0.2716 ±0.0194
0.0262 ±0.0044
0.1901 ±0.0322
0.0322 ±0.0041
0.2478 ±0.0297
Table 1. Predictive performance on the 158-factor NASDAQ and S&P 500 panels ( Section 4.2 ). We evaluate all methods under the same protocol. Entries give means and standard deviations over ten seeds for stochastic methods. Linear and LightGBM are deterministic. Shading marks the three highest values in each column.
NASDAQ
S&P 500
Method
Ann. Ret.
IR
MDD
Turnover
Ann. Ret.
IR
MDD
Turnover
LightGBM
0.0685
1.09
-0.0747
0.188
0.0512
0.74
-0.0789
0.184
ALSTM
0.0398 ±0.0232
0.68 ±0.43
-0.0805 ±0.0161
0.174 ±0.005
0.0261 ±0.0198
0.45 ±0.37
-0.0725 ±0.0145
0.188 ±0.006
GAT
0.0596 ±0.0118
0.82 ±0.18
-0.0824 ±0.0165
0.175 ±0.010
0.0468 ±0.0115
0.62 ±0.16
-0.0852 ±0.0170
0.182 ±0.011
DoubleEnsemble
0.0608 ±0.0204
1.00 ±0.36
-0.0869 ±0.0174
0.186 ±0.005
0.0524 ±0.0132
1.04 ±0.28
-0.0557 ±0.0111
0.176 ±0.007
StockMixer
0.0471 ±0.0225
0.92 ±0.47
-0.0751 ±0.0150
0.173 ±0.006
0.0348 ±0.0258
0.53 ±0.42
-0.0890 ±0.0178
0.187 ±0.011
Table 2. Portfolio performance after costs on the 158-factor NASDAQ and S&P 500 panels under the top- K dropout rule ( Section 4.4 ). Ann. Ret. denotes annualized excess return. Shading marks the three highest returns and information ratios and the three drawdowns closest to zero. Entries give means and standard deviations over ten seeds for stochastic methods. LightGBM is deterministic. The five external baselines have the highest NASDAQ ICs in Table 1 among the external methods.
Method
IC
ICIR
P@10
SR
LSTM
0.031
0.348
0.516
0.87
ALSTM
0.034
0.365
0.520
0.96
GAT
0.036
0.381
0.527
1.19
STHAN-SR
0.040
0.443
0.541
1.38
ESTIMATE
0.038
0.439
0.542
1.33
StockMixer
0.042
0.487
0.543
1.42
Table 3. Results on NASDAQ under the native five-feature protocol ( Section 4.2 ). P@10 denotes precision at ten and SR the Sharpe ratio. Shading marks the three highest seed means in each column. Table 7 gives results for all three universes.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Setting
Final value
Data sources
Feng et al. repo (NASDAQ, NYSE); StockMixer repo (S&P 500)
Table 4. Shared model, data, and portfolio settings, fixed before test evaluation.
Variant
IC
ICIR
Ann. Ret.
Params.
Stock-axis member
0.0334 ±0.0020
0.2718 ±0.0166
0.0545 ±0.0180
1.00 ×
Stock-axis capacity control
0.0338 ±0.0020
0.2582 ±0.0159
0.0549 ±0.0162
1.94 ×
Factor-token MLP
0.0287 ±0.0029
0.2180 ±0.0209
0.0288 ±0.0218
1.72 ×
FToken member
0.0311 ±0.0018
0.2360 ±0.0137
0.0415 ±0.0155
1.93 ×
FToken + stock-query readout
0.0305 ±0.0014
0.2489 ±0.0115
0.0438 ±0.0119
1.48 ×
Equal-weight dual-axis
0.0421 ±0.0014
0.3608 ±0.0116
0.0754 ±0.0113
2.93 ×
Appendix
Table 5. Ablations on the 158-factor NASDAQ panel using the same ten seeds for each variant. Shading marks the three highest values of IC, ICIR, and annualized excess return. Params. gives the trainable parameter count relative to the stock branch.
Variant
Resid. ρ
κ
Δ IC
Oracle gap
Two stock seeds + equal weight
0.823
0.208
0.0018
–
Stock + factor-token MLP
0.688
0.342
0.0043
–
Stock + FToken
0.541
0.476
0.0087
–
Equal-weight dual-axis
–
–
0.0087
0.0055
Static validation-optimal
–
–
0.0092
0.0050
Trailing-performance gate
–
–
0.0068
0.0074
Appendix
Table 6. Complementarity and routing on the 158-factor NASDAQ test panel, averaged over ten seeds. For each forecast pair, the upper rows report residual correlation, subspace distance, and the equal-weight IC gain over the stronger member. In the lower rows, Δ IC is the gain over the stock branch, and the oracle gap is the difference from the hindsight oracle’s IC. The oracle uses realized errors. The shuffled gate uses a pre-specified permutation of regime observations.
NASDAQ
NYSE
S&P 500
Method
IC
ICIR
P@10
SR
IC
ICIR
P@10
SR
IC
ICIR
P@10
SR
LSTM
0.031
0.348
0.516
0.87
0.023
0.249
0.509
0.84
0.030
0.181
0.529
1.28
ALSTM
0.034
0.365
0.520
0.96
0.024
0.271
0.516
0.79
0.028
0.177
0.530
1.25
GAT
0.036
0.381
0.527
1.19
0.026
0.288
0.523
1.03
0.033
0.188
0.539
1.44
STHAN-SR
0.040
0.443
0.541
1.38
0.028
0.339
0.538
1.19
0.036
0.221
0.547
1.49
ESTIMATE
0.038
0.439
0.542
1.33
0.030
0.331
0.533
1.08
0.034
0.236
0.551
1.51
Appendix
Table 7. Results under the native five-feature protocol on all three universes, extending Table 3 . We rerun all methods on the same public data using the benchmarks’ evaluator. Shading marks the three highest seed means in each column.
Method
IC
RankIC
Ann. Ret.
IR
LightGBM
0.0262
0.0249
0.0316
0.56
ALSTM
0.0231 ±0.0013
0.0303
0.0230 ±0.0109
0.38
Transformer
0.0192 ±0.0029
0.0281
0.0099 ±0.0229
0.14
DoubleEnsemble
0.0281 ±0.0017
0.0269
0.0342 ±0.0150
0.60
StockMixer
0.0244 ±0.0022
0.0308
0.0236 ±0.0164
0.41
Stock-axis member
0.0243 ±0.0026
0.0312
0.0239 ±0.0246
0.45
Appendix
Table 8. Predictive and portfolio results on the 158-factor NYSE panel under the protocol of Tables 1 and 2 . For stochastic models, IC and annualized excess return include the standard deviation over ten seeds. RankIC and IR are seed means. Shading marks the three highest ICs and annualized excess returns. The five baselines represent tree, recurrent, attention, boosted ensemble, and MLP models.
Quantitative finance uses mathematical models, statistics, and machine learning to value assets, measure risk, and guide trading and portfolio decisions.
MASTER's inter-stock multi-head attention -- the module responsible for modeling cross-sectional stock relationships -- accounts for 42.5% of model parameters and 25% of predictive value. We systematically decompose this module and uncover a surprising structure: the learned attention is near-uniform (perplexity 278/300), yet forcing exact uniformity eliminates all cross-sectional discrimination. Spectral analysis resolves this paradox: the deviation from uniformity is low-rank (effective rank ~65, top-10 modes capture 96.5% of energy), explaining why sparse approximations consistently fail while Nystrom low-rank attention (m=32 landmarks) matches full O(N^2) attention at O(mN) cost -- certified equivalent via TOST at both N=300 (5 seeds, Rank IC p=0.003) and N=800 (10 seeds, Rank IC p=0.034). Additional findings include: (i) attention anti-correlates with return similarity (Spearman rho = -0.614; on the industry-labeled subset, -0.645 unconditionally and -0.627 after controlling for industry, beta, and volatility), suggesting complementarity-seeking rather than correlation mining; (ii) all graph-based alternatives degrade performance, with hard masking worse than complete module removal; and (iii) at N ~ 3,500 with adapted architectures, no cross-stock module (GCN, Nystrom, or MASTER-style pipeline) significantly outperforms a per-stock LSTM baseline (n=4 seeds), indicating that the benefits observed at smaller scales do not trivially transfer. These results establish that the inter-stock attention's value resides in a compressible, dynamic, near-global redistribution that rewards low-rank approximation but resists sparsification.
Predicting cross-sectional stock returns is challenging due to low signal-to-noise ratios and evolving market regimes. Classical factor models offer interpretability but limited flexibility, while deep learning models achieve strong performance yet often underutilize financial priors. We address this gap with PRISM-VQ (PRior-Informed Stock Model with Vector Quantization), a dynamic factor framework that integrates expert prior factors, vector-quantized discrete latent factors learned from cross-sectional structure, and a structure-conditioned Mixture-of-Experts to generate time-varying factor loadings. Vector quantization acts as an information bottleneck that suppresses noise while capturing robust market structure, with discrete codes serving both as latent factors and as routing signals for temporal expert specialization. Experiments on CSI 300 and S&P 500 show consistent improvements in cross-sectional return prediction and portfolio performance over strong baselines while preserving interpretability. Our code is available at https://github.com/finxlab/PRISM-VQ.
Financial prediction typically relies on task-specific regression, ranking, or policy heads, separating the language model from the numerical object ultimately evaluated. We investigate whether a causal language model can instead represent forecasts and decisions directly through constrained token generation. FinATOM introduces a unified, head-free interface for three-step stock-return forecasting and dynamic five-ETF allocation. The forecasting model autoregressively emits volatility-standardized return tokens and is trained with ordinal and ranking supervision followed by a one-epoch token-level policy stage. The allocation model generates normalized long-only weights; supervised fine-tuning imitates a causal mean--variance anchor, and DAPO-augmented GRPO optimizes realized 21-day Sharpe subject to anchor consistency. In 2023--2025 ETF tests, the allocation policy improves pooled gross Sharpe from 1.428 to 1.529 and net Sharpe under a 5-bp transaction-cost model from 1.394 to 1.494. The multimodal allocation input attains the highest three-period mean Sharpe of 1.540, with its clearest advantage in 2025. On FinTexTS, the SFT and policy strategies achieve 73.52%/2.68 and 73.72%/2.69 cumulative-return/Sharpe, respectively. These results support the feasibility of direct language-model token generation for financial numerical prediction and decision-making, while motivating broader tests across assets, regimes, and random seeds.