In this paper, we propose a conditional asset pricing transformer (CAP-T) that captures nonlinear interactions among firms through attention to forecast excess returns. In the first stage, a transformer estimates conditional expected returns, and kernel-weighted principal component analysis of its residuals estimates the local factor loading space. Projecting the conditional mean onto this space separates factor risk compensation from conditional mispricing. Then, in the second stage, separate transformers learn these two components, whose predictions are combined to forecast returns. As a result, the proposed framework decomposes returns into conditional mispricing, factor risk compensation, a centered factor component, and an unpredictable innovation. We establish approximation and generalization bounds and characterize how first-stage prediction errors propagate through local factor estimation and component learning, providing statistical guaranties for conditional mispricing, factor loadings, and factor risk premia. Finally, simulations and empirical studies demonstrate the predictive and interpretive benefits of the proposed method.
Figures & tables
RMSE ( ×103 )
R2 (%)
Model
Layers
Returns
Mispricing
Risk
Labels
dproj
Total
In sample
CAP-T (ReLU)
1
35.9126
1.0044
1.9866
1.6872
0.0973
5.8683
2
35.8735
0.9328
2.4123
1.7793
0.1019
6.0729
3
35.8493
0.8918
2.7917
1.7758
0.1014
6.1993
CAP-T (Softmax)
1
35.9200
0.9995
1.9133
1.7012
0.0983
5.8291
Table 1: Recovery and prediction with five factors
Figure 1: Tracking and recovery of the loading space. In the left three columns, lines show ϕj,t=(180/π)arccos{σj(U∗⊤Ut)} and hollow diamonds show mean estimated counterparts, where U∗ is the true basis at the first date of each row. The right three columns show (180/π)θj,t ; smaller values indicate better recovery. The upper and lower rows show the estimation and out-of-sample periods.
Minimum R2 (%)
Maximum R2 (%)
Model
Layers
M
Total
Risk
Mispricing
Total
Risk
Mispricing
CAP-T (ReLU)
1–3
1
1.5215
0.9622
0.7784
1.6309
1.2820
1.1289
3
1.5438
0.9651
0.8034
1.6611
1.2839
1.1618
6
1.5680
0.9689
0.8176
1.6815
1.2964
1.1866
CAP-T (Softmax)
1–3
1
1.5756
0.9685
0.7899
1.6710
1.3017
1.1399
3
1.6001
1.0093
0.8256
1.6942
1.3123
1.1791
Table 2: Predictive performance across updating schedules
Number of factors, K
Model
Layers
1
2
3
4
5
6
7
Panel A. Total return forecast
CAP-T (ReLU)
1
1.6815
1.6240
1.6142
1.6316
1.6284
1.6334
1.6400
2
1.6034
1.5933
1.5821
1.5680
1.5693
1.5775
1.5916
3
1.6434
1.6576
1.6411
1.6408
1.6289
1.6235
1.6215
CAP-T (Softmax)
1
1.6785
1.6865
1.6421
1.6345
1.6297
1.6202
1.6140
Table 3: Predictive accuracy by attention mechanism, depth, and factor dimension
Number of factors, K
Model
Layers
1
2
3
4
5
6
7
CAP-T (ReLU)
1
1.1382
1.1245
1.1101
1.1094
1.1122
1.1089
1.1091
2
1.0756
1.0829
1.0759
1.0865
1.0817
1.0847
1.0807
3
1.1117
1.1284
1.1322
1.1372
1.1364
1.1402
1.1361
CAP-T (Softmax)
1
1.1146
1.1241
1.1128
1.1139
1.1094
1.1087
1.0978
2
1.0861
1.1014
1.0981
1.1039
1.1070
1.1026
1.0930
Table 4: Forecast-based mean–variance portfolios: net Sharpe ratios
Number of factors, K
Model
Layers
1
2
3
4
5
6
7
CAP-T (ReLU)
1
0.7457
0.7890
0.8300
0.7951
0.8538
0.8268
0.8041
2
0.7122
0.7528
0.8289
0.8316
0.8361
0.8534
0.8362
3
0.7925
0.8211
0.8022
0.8339
0.8483
0.8576
0.8710
CAP-T (Softmax)
1
0.7721
0.8169
0.8279
0.8551
0.8518
0.8375
0.8184
2
0.7570
0.7469
0.7478
0.7381
0.7244
0.7425
0.7272
Table 5: Top-decile conditional-alpha portfolios: net Sharpe ratios
Model
Layers
SR
AR
Vol.
MDD
TO
Cost
CR
(%)
(%)
(%)
(%)
(%)
Panel A. Forecast-based mean–variance portfolios
CAP-T (ReLU)
1
1.112
12.344
11.099
18.338
3.314
0.663
268.254
2
1.082
12.188
11.264
18.804
3.036
0.607
261.628
3
1.136
12.391
10.904
17.154
2.812
0.562
271.111
CAP-T (Softmax)
1
1.109
12.598
11.356
18.377
4.204
0.841
277.672
Table 6: Financial performance with five factors
Figure 2: Cross-firm attention networks and their economic profiles
First stage
Risk
Alpha
Documented links
128
124
102
Characteristic similarity
142
157
134
Unresolved
132
128
137
Total pairs
402
409
373
Share with supporting evidence (%)
67.2
68.7
63.3
Table 7: Economic interpretation of firm associations
Firm pair
Documentary evidence
Network
Boeing / Curtiss-Wright
Boeing is a principal customer of Curtiss-Wright’s commercial-aircraft business. [1]
F
Boeing / Lockheed Martin
Partners in the United Launch Alliance joint venture. [1]
F
HP / Xerox
Xerox is a named competitor in HP’s printing business. [1]
F
Harris / Northrop Grumman
Northrop Grumman is among Harris’s principal competitors. [1]
F
Disney / Wells Fargo
Wells Fargo Bank serves as an indenture trustee for Disney. [1]
F
GE / Raytheon Technologies
GE and Pratt & Whitney participate in an engine and aftermarket joint venture. [1]
R
Table 8: Selected firm associations and documentary evidence
Figure 3: Leading characteristics of total return prediction and its components
Figure 4: Economic composition of characteristic importance
Figure 5: Tests of zero mean alpha and residuals
Figure 6: Cross-sectional alpha structure in out-of-sample forecasts
Quantitative finance uses mathematical models, statistics, and machine learning to value assets, measure risk, and guide trading and portfolio decisions.
We study trajectory forecasting under squared loss for time series with weak conditional structure, using highly expressive prediction models. Building on the classical characterization of squared-loss risk minimization, we emphasize regimes in which the conditional expectation of future trajectories is effectively degenerate, leading to trivial Bayes-optimal predictors (flat for prices and zero for returns in standard financial settings). In this regime, increased model expressivity does not improve predictive accuracy but instead introduces spurious trajectory fluctuations around the optimal predictor. These fluctuations arise from the reuse of noise and result in increased prediction variance without any reduction in bias. This provides a process-level explanation for the degradation of Transformerbased forecasts on financial time series. We complement these theoretical results with numerical experiments on high-frequency EUR/USD exchange rate data, analyzing the distribution of trajectory-level forecasting errors. The results show that Transformer-based models yield larger errors than a simple linear benchmark on a large majority of forecasting windows, consistent with the variance-driven mechanism identified by the theory.
Pierre Andreoletti
IDP · Institut Denis Poisson, UMR C.N.R.S. 7013, France.
Adaptive Financial Transformer (AFT) is proposed for stock return prediction under non-stationary financial markets. The model incorporates a Market Regime Encoder, an Adaptive Gate Network, and an Adaptive Financial Context module to dynamically bias self-attention based on semantic relationships between financial indicators. Unlike conventional Transformer architectures that treat all input features uniformly, the proposed approach groups 95 engineered financial features into 11 semantic categories and adapts attention according to latent market regimes. The study also identifies and corrects sequence alignment and backtesting issues that can inflate reported trading performance, and introduces a financially-aware composite objective that jointly optimizes prediction error, directional accuracy, and non-overlapping Sharpe ratio. Extensive experiments compare the proposed architecture against classical machine learning models, recurrent neural networks, and Transformer baselines using chronological evaluation, five random seeds, ablation studies, hyperparameter optimization, explainability analysis, and multi-stock validation. Results demonstrate competitive predictive performance while reducing model complexity by 15.2% and improving parameter efficiency through feature selection, providing an interpretable Transformer architecture for financial time-series forecasting.
Dishan Sarkar
Department of Artificial Intelligence and Machine Learning Birla Institute of Technology, Mesra Ranchi, India
We propose the conditional moment kernel (CMK), a joint model of the conditional mean and covariance matrix of asset returns given their characteristics. A single kernel function of the characteristics gives the means and second moments of all returns. The implied covariance matrices are positive semidefinite for any number and composition of assets, so the model applies directly to unbalanced panels. Its estimation is a convex program whose size does not depend on the number of assets. A floor at the scale of the idiosyncratic noise keeps the estimated systematic covariance away from zero where the data cannot resolve it, and a trace penalty selects the number of factors. A closed form, the CMK estimator, approximates the solution. For fixed features and hyper-parameters, we prove identification, consistency and finite-sample bounds. In out-of-sample tests on US stocks from 1972 to 2021, the CMK estimator fits the conditional moments significantly better than instrumented principal component analysis (IPCA) with the same characteristics. Almost all of the gain is in the covariance matrix, and nonlinear functions of the characteristics add to it. The implied unconditionally mean--variance efficient portfolios earn annualized Sharpe ratios of 4.0 to 5.1 before costs, close to those of IPCA and declining over time.
Damir Filipovic, Paul Schneider
École Polytechnique Fédérale de Lausanne and Swiss Finance Institute · Università della Svizzera italiana and Swiss Finance Institute