Manuscript Offprint
arXiv:2611.04116Decomposing Rank Reversals under Temporal Nonstationarity: Alignment, Aggressiveness, and Instability
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Under temporal nonstationarity, model performance rankings reverse across training horizons due to heterogeneous sensitivities to memory. While existing literature addresses adaptive lookbacks, effective model complexity, and empirical forecast evaluation in isolation, no unified framework explains the structural mechanics driving these rank reversals. We bridge this gap by deriving a model-agnostic decomposition of out-of-sample into target alignment, miscalibrated aggressiveness, and predictive instability. Within this framework, we mathematically characterize complexity phase boundaries, establish closed-form optimal-memory equations for ridge regression under local drift, and extend these guarantees to complex model architectures via surrogate bounds. We validate these theoretical dynamics by benchmarking 14 linear, tree-based, and neural architectures across large-scale financial panels. In doing so, our framework demonstrates that empirical model rank reversals are driven by predictable surges in miscalibrated aggressiveness, providing a rigorous mechanistic diagnosis of generalization under temporal shift.
1 INTRODUCTION
Reliable forecasting under temporal nonstationarity requires balancing the estimation variance of restricted training windows against the bias induced by obsolete historical data (Dahlhaus, 1997; Pesaran and Timmermann, 2007; Giraitis et al., 2013). This trade-off is exceptionally severe in return prediction, where predictive signals are notoriously weak and transient (Welch and Goyal, 2008; Campbell and Thompson, 2008; Smith and Timmermann, 2021). While extensive literature addresses adaptive memory selection, sys-
tematically explaining why the relative performance of models reverses across different training horizons requires formally linking theoretical dynamics with empirical phenomena. To establish this mechanistic link, we address two fundamental questions: (1) Which specific forecast components drive the performance differential between models at a fixed memory? and (2) Can we mathematically predict, directly from the underlying statistical dynamics, the critical memory threshold at which performance rankings reverse?
Although the literature addresses facets of this problem, existing approaches remain disconnected. In non-stationary settings, dynamic-regret analyses balance adaptation against data efficiency via sliding windows and forgetting factors, typically assuming known variation budgets (Cheung et al., 2019; Zhao et al., 2020; Yuan and Lamperski, 2020; Yang et al., 2016; Zhao and Zhang, 2021; Baby and Wang, 2023). The constraint is recently relaxed by adaptive-lookback estimators (Huang and Wang, 2023; Han et al., 2024; Baby et al., 2025). Concurrently, statistical learning theory links generalization bounds to effective complexity (Caponnetto and De Vito, 2007; Hsu et al., 2012; Dobriban and Wager, 2018; Bousquet and Elisseeff, 2002). Finally, empirical forecast evaluation provides diagnostics for bias and calibration (Mincer and Zarnowitz, 1969; Theil, 1966; Gneiting and Resin, 2023; Waghmare and Ziegel, 2026), alongside statistical tests for predictive ability (Diebold and Mariano, 1995; Giacomini and White, 2006; White, 2000; Hansen, 2005; Hansen et al., 2011; Hewamalage et al., 2021). However, these paradigms operate in isolation. Regret and stability bounds do not predict when high-capacity models will surpass simpler baselines under shifting histories, while empirical diagnostics quantify performance gaps without isolating their structural drivers. Consequently, no existing framework systematically links training memory and model complexity to explain the rank reversals observed in nonstationary environments.
In this work, we close that gap in three steps. First, we derive a model-agnostic decomposition of out-of-sample that isolates target alignment from penalties for miscalibrated aggressiveness (excess forecast magnitude) and predictive instability (variance across replicates). Second, we analytically characterize how the training horizon governs each component, establishing a complexity phase boundary and a closed-form optimal-memory equation for ridge regression under local drift, with extensions to nonlinear architectures via surrogate transfer bounds. Third, we validate these theoretical mechanics through controlled simulations and extensive empirical evaluation, benchmarking 14 linear, tree-based, and neural specifications across both macroeconomic industry portfolios (Fama and French, 1997) and a large-scale, out-of-domain equity panel (Zhang et al., 2026).
In summary, our primary contributions are:
-
A mechanistic theory of rank reversals. We provide a unified theoretical framework that mathematically links training memory and model capacity to out-of-sample generalization, formally proving why and when high-capacity models lose their predictive advantage under distribution shift.
-
Empirical diagnosis of performance reversals. Across large-scale financial panels, we demonstrate that when high-capacity models underperform simpler baselines, it is driven by predictable surges in miscalibrated aggressiveness.
Effective complexity and forecast instability. Generalization under finite data depends on effective complexity and algorithmic stability. While spectral dimension and signal strength govern ridge prediction risk (Caponnetto and De Vito, 2007; Hsu et al., 2012; Dobriban and Wager, 2018), regularization also controls sensitivity, rendering raw parameter counts inadequate (Hsu et al., 2012; Bousquet and Elisseeff, 2002).
Standard risk bounds, however, do not translate this sensitivity into the realized out-of-sample cost induced by variation across forecast replicates. Our finite-sample identity bridges this gap by isolating predictive instability as an explicit additive penalty, proving that replicate ensembling eliminates it entirely.
Local change and estimation memory. Time-varying regressions show that recent data capture drift while longer histories reduce variance (Dahlhaus, 1997; Vogt, 2012), framing window selection as an old-data bias versus sampling error tradeoff (Pesaran and Timmermann, 2007; Giraitis et al., 2013). Forecasting under instability also calls for comparisons that allow relative model performance to change over time (Giacomini and Rossi, 2015, 2016). Although these frameworks formalize the bias-variance tension, standard heuristics overlook how regularization structurally filters temporal drift across predictor directions to shift the optimal memory horizon. Under a local-drift specification, we derive an exact optimal-memory equation that couples spectral effective dimension, filtered drift, and the bias-drift cross-term.
Calibration, scale, and combination. Classical diagnostics isolate bias and scale, while modern scoring rules separate calibration, discrimination, and uncertainty (Mincer and Zarnowitz, 1969; Theil, 1966; Gneiting and Resin, 2023; Waghmare and Ziegel, 2026). Forecast combinations similarly handle structural breaks across predictor sets (Diebold and Pauly, 1987; Elliott and Timmermann, 2004; Chen and Maung, 2020). Nevertheless, existing frameworks do not jointly isolate the impacts of weak target alignment, miscalibrated magnitude, and predictive instability on out-of-sample . Our score identity achieves this tripartite separation analytically, quantifying the oracle gain available solely through scaling forecast aggressiveness.
Comparing and ranking forecasts. Accuracy tests evaluate unconditional loss differences or map predictive ability to information sets (Diebold and Mariano, 1995; Giacomini and White, 2006). To counter data-snooping biases, specialized tests and confidence sets correct for multiple comparisons (White, 2000; Hansen, 2005; Hansen et al., 2011), while rank-stability analyses reveal sensitivity to evaluation design (Hewamalage et al., 2021). While these frameworks rigorously quantify statistical uncertainty, they are diagnostic rather than explanatory: they detect performance gaps without isolating the driving forecast properties. We augment dependence-aware comparisons with our attribution identity—decomposing gaps into alignment, aggressiveness, and instability—to mechanically explain memory-induced rank reversals.
Return prediction and model comparisons. Eq-uity premium forecasts routinely fail to outperform historical means, though shrinkage reduces prediction error (Welch and Goyal, 2008; Campbell and Thompson, 2008). While nonlinear interactions isolate weak signals (Goktas et al., 2026; Capponi et al., 2025), structural breaks degrade accuracy (Gu et al., 2020; Smith and Timmermann, 2021). Broad benchmarks corroborate this predictability limit, showing that transaction costs and market states fundamentally reorder rankings (Bejarano et al., 2025; Saly-Kaufmann et al., 2026; Zhang et al., 2026). Because benchmarks often confate model selection with disparate tuning budgets, it remains unresolved whether training history alone can invert rankings under strictly matched information sets. By modulating memory across linear, tree-based, and neural models, we demonstrate that history alone reverses rankings, tracing these shifts directly to target alignment, aggressiveness, and instability.
3 FORECAST COMPONENTS AND COMPLEXITY
To formalize how training history shapes prediction, we introduce a model-agnostic decomposition of out-of-sample to mathematically isolate the drivers of rank reversal (Sections 3.1 and 3.2), and establish a complexity phase boundary that yields an exact optimal-memory equation for ridge regression under local drift (Section 3.3) alongside explicit transfer bounds for nonlinear architectures (Section 3.4). Throughout this section, we quantify training history via the memory h, defined as the number of most recent observations used to train a model. Full derivations and proofs for all theoretical results are in Appendix A.
A

B
Figure 1: Theoretical leading-order dynamics with normalized parameters. (A) The complex class achieves lower risk when its history-independent advantage exceeds the complexity cost ; bands denote remainder bounds. (B) Variance decays and the drift penalty grows with memory , creating an interior risk minimum at .
3.1 Forecast-score decomposition
Let represent the true outcomes on a common evaluation sample, assuming a non-zero magnitude . Suppose a forecasting procedure is fitted times—varying only the random seeds or training data splits—to produce replicate forecasts. Let denote the -th replicate, with an ensemble mean .
We evaluate performance using the out-of-sample relative to a naive zero prediction. The average score across all replicates is . To isolate what drives this performance, we characterize the geometry of the forecasts through three components: target alignment , forecast aggressiveness , and predictive instability , defined as
Conceptually, alignment a measures direction (the cosine similarity between the target and the mean forecast), aggressiveness g measures relative scale (the overall magnitude of the mean forecast compared to the target), and instability u measures variance (the squared dispersion of the individual replicates around their mean, normalized by the target energy ).
Replicate-ensemble gain. Expanding the squared error and noting that replicate deviations sum to zero yields an exact decomposition:
If , we set by convention. With this convention, the identity holds in all cases. Performance thus separates into a positive alignment reward , penalized by aggressiveness and instability costs. The ensemble mean achieves a score of , exceeding the average replicate score by . Ensembling thus eliminates the instability penalty while preserving the alignment and aggressiveness terms.
Proposition 1 (optimal common scalar). Rescaling forecasts by a factor yields a mean score , where and . On any closed interval , the unique maximizer is the projection of onto ,
In essence, this calculates the maximum potential score improvement if the overall magnitude of the predictions is perfectly corrected. Unconstrained scaling maximizes the score at .
For individual replicates, . For the ensemble mean, .
3.2 Complexity phase boundary
Rank reversal. Suppose we train two models, and , using the most recent observations and evaluate them on the same target, . For each model , we can break down its average prediction score, , into three intuitive components defined in (1): alignment , aggressiveness , and instability .
Using the identity from (2), we can calculate the exact performance gap, , between the two models:
Model A outperforms model B at memory h whenever this gap is positive ( ). A rank reversal occurs exactly when the performance gap changes sign, meaning .
Complexity phase boundary. Let be a simple model class and a more complex class. Let denote the excess loss of class at memory , that is, the expected squared error against the current conditional mean. We assume this loss expands as
with a known remainder bound . Here, is the optimal approximation error, and is a static, memory-independent bias. The terms , , and capture the core memory tradeoff: estimation variance (which decays with ) versus linear and quadratic drift penalties (which grow as older data is included).
Setting isolates the history-independent advantage of the complex class. Defining the coefficient differences , , and yields its history-dependent cost, (Fig. 1A).
Proposition 2 (phase boundary). The complex class has strictly lower loss at memory if its history-independent advantage overcomes the complexity cost and remainder bounds, meaning . Conversely, the simple class performs better if .
Setting aside the remainders, suppose the complex class incurs higher variance ( ) and quadratic drift ( ) penalties. The cost function is then strictly convex (U-shaped), reaching a unique minimum at a memory that solves . If , the complex class never performs better. If , it outperforms the simple class within an optimal memory window bounded by the two positive roots of .
When linear drift differences vanish ( ), this memory scales as with minimum cost . Because varying the training memory dynamically shifts this variance-drift tradeoff, parameter count alone does not determine the prevailing model. In summary, the complex class only performs better within a specific window of training memory where its baseline advantage outweighs the escalating penalties of variance and data drift. (Detailed proofs and degenerate cases are in Propositions A.2 and A.3 of Appendix A.2).
3.3 Exact prediction risk and optimal memory for ridge regression
We first bound the prediction risk of ridge regression under coefficient drift. Consider a forecast date and a training history of observations for , with predictors . We model nonstationarity as a local linear drift: , where the historical coefficients evolve as . Here, represents the current target coefficient, the constant per-period drift, the nonlinear drift remainder, and the observation noise.
Define the sample second-moment matrix , the ridge inverse for penalty , the ridge filter , and the mean temporal lag . We measure prediction differences using the local design norm \|v\|_S_h^2 = v^\top S_h v. Conditioning on the realized training design , we assume the score vector satisfies . Here is the error variance and is a dependence factor, the assumption does not require to have a strict conditional mean of zero.
The conditional risk \mathcal{E}_t^X(h) = \mathrm{E}[\|\widehat{\beta} - \beta_t\|_S_h^2 \mid X_h] of the ridge estimator partitions into four interpretable components:
and a remainder that captures coefficient curvature, time-imbalance in the design, and the conditional mean of z.
Applying an exact bias-variance identity, the risk satisfies the following bound for any (Proposition A.4 in Appendix A.3.1):
Crucially, this bound is direction-aware. The variance decays as via the spectral dimension , while the drift penalty grows as via . Because the temporal drift enters exclusively through the filter , ridge regression naturally attenuates drift in low-variance predictor directions.
To isolate the exact memory dependence, assume the local second-moment matrix remains constant across candidate histories , the remainder term vanishes , and the conditional score variance scales inversely with memory as for a constant . Define the stable ridge filter , the effective spectral dimension , and the inner product . The conditional risk then reduces to four fundamental components: the regularization bias , the filtered drift energy , the bias-drift cross-term , and the variance scale :
Equation (7) matches the form of Equation (5) with , , and (Fig. 1B).
Proposition 3 (optimal memory for ridge regression). Assume strictly positive variance and drift energy ( and ), and extend Equation (7) to real h > 0. The continuous risk function possesses a unique positive minimizer , which solves the optimality condition:
When the bias-drift cross-term vanishes ( ), the solution satisfies , converging asymptotically to the cube-root rule for large training windows. Nonzero cross-terms structurally shift the optimal window: a negative lengthens the ideal memory, whereas a positive shortens the ideal memory. (Detailed proofs appear in Appendices A.3.1 and A.3.2).
3.4 Surrogate approximations and transfer bounds for trees and neural networks
Because architectures like boosted trees, RNNs, LSTMs, and Transformers are highly nonlinear in the underlying parameters, analyzing the exact memory dynamics requires an intermediate linear surrogate. We construct the theoretical surrogate by freezing the
feature map prior to fitting the final readout layer (Propositions A.6 and A.8 in Appendix A.4.1). For tree-based models, the frozen map corresponds to a fixed tree topology; for neural networks, the frozen map represents the encoder producing the final hidden state or the pooled token state. Applying a ridge regression readout to the fixed features ensures the surrogate risk follows the exact complexity expansion in Equation (5), governed by the variance component and the quadratic drift component .
To quantify the performance gap between the theoretical surrogate and the actual model at memory , let denote the surrogate forecast and denote the fully trained forecast. Define and as the respective prediction risks against the current conditional mean. Finally, let represent the mean squared distance between the trained forecast and the surrogate forecast , measured under the evaluation norm.
Proposition 4 (transfer bounds). The prediction risks of the fully trained model and the linear surrogate differ by at most . Consequently, the trained complex class achieves strictly lower risk than the trained simple class if the history-independent advantage exceeds the combined complexity cost and remainder bounds: . Conversely, the simple class achieves lower risk if .
Furthermore, assuming a uniform transfer error bound over an interval of candidate histories, and strictly positive surrogate coefficients , the optimal memory for the trained risk lies within a distance of from the surrogate optimum. The surrogate optimum solves , where represents the linear drift coefficient from Equation (5) (Proposition A.11 and Corollary A.16 in Appendix A.4.3).
Because the transfer error enters additively and scales linearly with the perturbation (for small ), the phase boundary and optimal memory expressions preserve the fundamental scaling dynamics of ridge regression: a decay for estimation variance and an growth for quadratic drift (Fig. 1). The various nonlinear architectures differ only in how the perturbation bound scales:
Boosted trees. For greedy trees built on a finite threshold grid with a strictly positive split margin , the transfer error scales as , where (Proposition A.12). The selection penalty decays exponentially as history length increases, shifting the optimal memory toward longer windows.
• RNN. Provided the recurrent weights maintain an operator norm , the perturbation scales linearly with the movement of the network weights and readout. The sequence scaling factor remains bounded, independent of the context length (Proposition A.13).
-
LSTM. For Long Short-Term Memory networks, the perturbation scales linearly with the movement of the gating mechanisms and the readout. The sequence scaling factor expands to , governed by the Lipschitz constant of the cell state update. The scaling factor remains bounded for , but grows exponentially with context length if (Proposition A.14).
-
Transformer. For a single attention block, the perturbation scales linearly with the movement of the attention logits, value matrices, output map, and readout. The scaling factor relies on and exhibits no explicit dependence on the context length (Proposition A.15).
For exact-greedy trees, the transfer bound does not decay with history length (Complete conditions and proofs appear in Appendix A.4.3).
4 EXPERIMENTS
4.1 Controlled simulation
Design. We generate eight Gaussian covariates, , with variances for spectral decay (Appendix B.1, covariates). The response combines a linear signal, a nonlinear interaction ( times the standardized product ), and Gaussian noise, with interaction strength and (Appendix B.1, signal). To simulate nonstationarity, the first coefficient of an observation aged periods shifts by (gradual drift), for (abrupt break), or (zero drift); test targets use unshifted current coefficients (Appendix B.1, drift). We compare linear ridge on the 8 base covariates against quadratic ridge on 44 expanded features (including ), testing penalties and memories (Appendix B.1, models). Each factorial condition uses 24 independent worlds, each containing 16 test targets and three training histories (Appendix B.1, replicates). We score out-of-sample against the zero forecast, analyzing the performance gap with paired 95% intervals across worlds (Appendix B.1, score and contrasts).
Results. Across 360 comparisons, the quadratic model outperforms the linear baseline in 0 of 120 cases at , 46 at , and 78 at (Appendix B.2, Figs. 7, 8, and 9). Under gradual drift (), is positive for all memories at SNR 2; at SNR 0.25, it remains negative for and

Figure 2: Out-of-sample performance gap (quadratic minus linear) across training memories under gradual drift (, ). Error bars denote paired 95% intervals.
turns positive only at , corroborating the phase boundary of Section 3.2 (Fig. 2; Appendix B.2, Fig. 8). In a balanced linear design, optimal memory falls from 128 to 32 as drift rises from 0.002 to 0.016; the log-log slope tightly matches the predicted from Section 3.3 (Appendix B.2, Fig. 4). At equal raw drift, linear ridge () drops from 0.57 () to () if the drifting coordinate variance is 1, but rises from 0.60 to 0.67 if the variance is 0.004, confirming ridge attenuates drift in low-variance directions (Appendix B.2, Fig. 5).
4.2 Empirical dynamics of forecast components
Design. Following established protocols (Capponi et al., 2025), we forecast daily excess returns for 17 U.S. industry portfolios (Fama and French, 1997). The dataset spans September 1987 to November 2016, dedicating January 1990 onwards strictly to out-of-sample evaluation. The daily information set comprises 129 predictors partitioned into four structural categories: (1) 94 feature-based portfolios capturing firm-level attributes such as price trends, liquidity, and volatility (Gu et al., 2020); (2) three standard market factors (Fama and French, 1993); (3) 15 monthly structural series, including macroeconomic hidden states extracted from 178 underlying economic indicators (Chen et al., 2024); and (4) the previous day's 17 target returns to capture autoregressive dynamics.
Six tabular models, fixed- and tuned-penalty ridge, random forest, XGBoost, small MLP, and medium MLP, process single-day predictors. Seven temporal models ingest the trailing days: fixed- and tuned-penalty ridge, random forest, XGBoost, MLPs, an RNN, an LSTM, and a Transformer (Appendix C.1, Model specifications). Each model trains on a rolling 16-month, rolling 64-month, or expanding historical window, with hyperparameters tuned on immediately preceding data (Appendix C.1, Hyperparameter selection). We evaluate six random-seed replicates per configuration, scoring out-of-sample against the zero forecast and decomposing performance gaps via identity (2) (Appendix C.1, Replicate statistics).
A

B
C
D
Figure 3: Empirical dynamics of forecast components. Model classes are color-coded: tabular (teal), 20-day temporal (blue), and 60-day temporal (brown). (A) Restricted training memory systematically exacerbates predictive instability u. (B) Stronger ridge regularization effectively attenuates the aggressiveness penalty g. (C) Ex-post scalar calibration preserves target alignment, failing to resolve fundamental performance gaps between models. (D) Elevated ambient noise systematically diminishes the out-of-sample advantage of short training memory.
Results. Evaluated by mean out-of-sample , random forest performance degrades from 0.3549 under a 16-month memory to 0.2953 under an expanding history, whereas tuned ridge regression improves from 0.3515 to 0.3602 (Table 1). The complex tree-based model performs better at short memories where its static approximation advantage dominates, but the simpler ridge model performs better as history expands and variance-drift penalties shift, consistent with results in Section 3.2. A parallel reversal emerges among the 60-day temporal architectures: flattened XGBoost achieves the highest mean at 16 and 64 months (0.2812 and 0.3223), but the small Transformer strictly overtakes it under expanding history (0.3195). Finally, quantifying the empirical magnitude of predictive instability, replicate ensembling recovers substantial performance costs, boosting the 16-month random forest to 0.3705 and the expanding-history Transformer to 0.3342 (Table 1; full results in Appendix Table 8).
As predicted by the variance term (Eq. (7)), restricted memory exacerbates instability: u is strictly larger at 16 than 64 months in 18 of 20 architecture-
context pairs (Fig. 3A; Appendix Table 8). Ridge systematically attenuates forecast magnitude and variance (Section 3.3). Compared to a penalty of 1, tuned ridge (penalty 100 or 10,000) lowers aggressiveness g in 78 of 81 year-window pairs and instability u in all 81 (Fig. 3B). Because scalar transformations preserve target alignment (Section 3.1), calibration cannot resolve fundamental disparities. A historically fitted [0,1] scalar shifts the 20-day XGBoost-Transformer gap by at most 0.005 (Fig. 3C).
Optimal memory expands with noise and contracts with filtered drift (Eq. (8)). Empirically, elevated noise (recent ridge-fit squared error) lowers the 16-month advantage by 0.012 per standard deviation (95% interval ; Fig. 3D).
4.3 Generalization to independent data
Design. To evaluate firm-level prediction, we extend our framework to daily CRSP equity data spanning 2018–2024, forecasting next-day total returns using the stock universe and 24 feature representations established by (Zhang et al., 2026). We refit all models monthly from January 2021 through December 2024 across three training memories: a rolling 252-day window, a rolling 756-day window, and an expanding historical window. Three tabular models (ridge, XGBoost, and an MLP) process single-day predictors, while six temporal architectures ingest historical contexts of the trailing 20 or 60 days. Hyperparameters remain strictly fixed across evaluations, yielding two paired-seed replicates per architecture-context pair.
Results. On the independent CRSP stock-return panel, XGBoost strictly dominates the fixed architectures across all nine context-memory combinations (Table 2). In a separate 2022–2024 evaluation, applying an ex-post scalar calibration (fitted over the preceding 12 months) collapses nine XGBoost-neural performance gaps from the 0.20–1.03 range to under 0.00015. Because this convergence is achieved almost entirely by attenuating forecast magnitudes toward zero, it confirms that the initial performance disparities stemmed from miscalibrated aggressiveness rather than fundamental differences in target alignment.
5 CONCLUSION
This paper investigates the fundamental mechanisms governing the heterogeneous sensitivity of predictive architectures to training memory under distribution shift. To this end, we derive a model-agnostic decomposition of out-of-sample that partitions predictive performance into target alignment, an aggressiveness penalty, and finite-sample predictive instability. Building upon this identity, we formally characterize the complexity phase boundary—delineating
Table 1: Memory-induced rank reversals and the empirical recovery of predictive instability. Expanding the training horizon (16m to Exp.) systematically inverts model rankings, favoring heavily regularized or temporally structured architectures over static, complex baselines at longer histories. Additionally, replicate ensembling strictly improves upon mean predictive performance, quantifying the exact out-of-sample cost of finite-sample instability. Shading identifies the optimal architecture within the tabular and 60-day temporal branches; RMSE is reported in percentage points of daily excess returns.
| Tabular | Temporal, 60-day context | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ridge, α=1 | Tuned ridge | Random forest | XGBoost | Small MLP | Medium MLP | Flattened ridge | Flattened XGBoost | Fixed flattened MLP | Tuned flattened MLP | Vanilla RNN | LSTM | Small Transformer | |
| Mean ↑ | |||||||||||||
| 16m | -0.0909 | 0.3515 | 0.3549 | 0.3316 | 0.2869 | 0.2786 | 0.0772 | 0.2812 | -0.8216 | -0.2223 | 0.2776 | 0.1913 | 0.2712 |
| 64m | 0.3256 | 0.3668 | 0.3374 | 0.3419 | 0.3231 | 0.3189 | 0.1078 | 0.3223 | -0.0124 | 0.0002 | 0.2989 | 0.2472 | 0.2969 |
| Exp. | 0.3386 | 0.3602 | 0.2953 | 0.3232 | 0.3301 | 0.3270 | -0.2835 | 0.3148 | 0.0881 | 0.1158 | 0.3169 | 0.2885 | 0.3195 |
| Ensemble ↑ | |||||||||||||
| 16m | 0.0706 | 0.3671 | 0.3705 | 0.3621 | 0.3096 | 0.3018 | 0.1092 | 0.3161 | -0.3891 | -0.0970 | 0.3123 | 0.2153 | 0.3191 |
| 64m | 0.3481 | 0.3767 | 0.3494 | 0.3619 | 0.3414 | 0.3383 | 0.1654 | 0.3402 | 0.0765 | 0.0804 | 0.3167 | 0.2661 | 0.3160 |
| Exp. | 0.3477 | 0.3644 | 0.3079 | 0.3392 | 0.3423 | 0.3425 | -0.0295 | 0.3253 | 0.1690 | 0.1822 | 0.3276 | 0.3042 | 0.3342 |
| Mean RMSE (pp) ↓ | |||||||||||||
| 16m | 1.4675 | 1.1315 | 1.1286 | 1.1487 | 1.1865 | 1.1934 | 1.3498 | 1.1913 | 1.8962 | 1.5534 | 1.1942 | 1.2636 | 1.1995 |
| 64m | 1.1539 | 1.1181 | 1.1438 | 1.1399 | 1.1560 | 1.1596 | 1.3272 | 1.1567 | 1.4137 | 1.4049 | 1.1765 | 1.2191 | 1.1782 |
| Exp. | 1.1427 | 1.1239 | 1.1795 | 1.1559 | 1.1500 | 1.1527 | 1.5918 | 1.1631 | 1.3418 | 1.3212 | 1.1613 | 1.1851 | 1.1591 |
| Ensemble RMSE (pp) ↓ | |||||||||||||
| 16m | 1.3546 | 1.1178 | 1.1148 | 1.1222 | 1.1675 | 1.1741 | 1.3262 | 1.1620 | 1.6560 | 1.4716 | 1.1652 | 1.2446 | 1.1594 |
| 64m | 1.1345 | 1.1093 | 1.1334 | 1.1224 | 1.1403 | 1.1430 | 1.2836 | 1.1413 | 1.3503 | 1.3474 | 1.1615 | 1.2037 | 1.1621 |
| Exp. | 1.1348 | 1.1202 | 1.1690 | 1.1422 | 1.1395 | 1.1394 | 1.4256 | 1.1541 | 1.2808 | 1.2707 | 1.1522 | 1.1720 | 1.1465 |
| Context | 252d | 756d | Exp. |
|---|---|---|---|
| Tabular | -0.00189 | -0.00145 | -0.00129 |
| Temporal 20d | -0.00198 | -0.00132 | -0.00076 |
| Temporal 60d | -0.00199 | -0.00135 | -0.00096 |
Table 2: Mean pooled out-of-sample against a zero-return baseline (January 2021–December 2024).
the memory regimes where high-capacity models overcome simpler baselines—and establish a closed-form optimal memory equation for ridge regression under local drift. Controlled simulations rigorously validate both the predicted phase boundaries and the derived asymptotic scaling of optimal memory with respect to drift velocity. Crucially, in empirical financial forecasting, our framework mechanically explains rank reversals across lookback windows. The identity isolates these inversions to shifting tensions between alignment and aggressiveness, while confirming that replicate ensembling cleanly recovers the precise theoretical penalty of predictive instability. While prior literature has traditionally treated the estimation–drift tradeoff, model benchmarking, and adaptive memory selection as disparate domains, our primary contribution is structural: by unifying these fields through a single deterministic identity, we trace any macroscopic shift in model ranking directly to a quantified, mechanistic forecast property.
Computational and economic implications. Aggressively restricting the training window is an in-
adequate heuristic for nonstationarity; when ambient noise dominates filtered drift, heavily regularized linear models with expanding histories can match high-capacity learners at a fraction of the cost. Our decomposition therefore serves as a practical diagnostic, allowing practitioners to evaluate the three forecast components before funding expensive architecture searches. Conversely, while replicate ensembling eliminates the instability penalty, it scales training costs linearly. Ultimately, the framework quantifies the exact marginal predictive return of each additional unit of compute.
Limitations and future work. While our closed-form derivations apply exactly to ridge regression under local drift, theoretical guarantees for high-capacity architectures currently rely on surrogate transfer bounds. Additionally, because memory is parameterized strictly via uniform truncation windows, the framework does not address exponentially weighted or adaptive histories. Future research could generalize the theory to accommodate dynamic forgetting factors, leveraging the proposed three-component decomposition for online, adaptive memory selection. Further natural extensions include tightening the nonlinear transfer bounds, integrating compute-aware evaluation metrics, and validating these complexity phase boundaries across diverse forecasting horizons and alternative asset classes.
AI USE STATEMENT
During the preparation of this work, the authors used OpenAI ChatGPT-6 Sol, Claude Sonnet 5.5, and Google Gemini-3.1 Pro to conduct literature searches, generate baseline code configurations, develop proofs and derivations, create visualizations, generate initial drafts of writing, improve grammatical clarity, check for technical consistency, and verify the correctness of mathematical derivations. Following the use of these tools, the authors thoroughly reviewed, edited, and verified all generated output. The authors take full responsibility for the technical correctness, integrity, and originality of the final manuscript content.
REFERENCES
Baby, D., Tang, Y., Nguyen, H. D., Wang, Y.-X., and Pyati, R. (2025). Adaptive estimation and learning under temporal distribution shift. arXiv:2505.15803.
Baby, D. and Wang, Y.-X. (2023). Second order path variationalals in non-stationary online learning. In Proceedings of the 26th International Conference on Artificial Intelligence and Statistics, volume 206 of Proceedings of Machine Learning Research, pages 9024–9075.
Bejarano, J., Desai, V., Keshava, K., Kumar, A., Wang, Z., Xu, V. H., and Xu, Y. (2025). An open benchmark for evaluating time series forecasting methods across financial markets. Working paper.
Bousquet, O. and Elisseeff, A. (2002). Stability and generalization. Journal of Machine Learning Research, 2:499–526.
Campbell, J. Y. and Thompson, S. B. (2008). Predicting excess stock returns out of sample: Can anything beat the historical average? Review of Financial Studies, 21(4):1509–1531.
Caponnetto, A. and De Vito, E. (2007). Optimal rates for the regularized least-squares algorithm. Foundations of Computational Mathematics, 7:331–368.
Capponi, A., Huang, C., Sidaoui, J. A., Wang, K., and Zou, J. (2025). The nonstationarity-complexity tradeoff in return prediction. arXiv:2512.23596.
Chen, B. and Maung, K. (2020). Time-varying forecast combination for high-dimensional data. arXiv:2010.10435.
Chen, L., Pelger, M., and Zhu, J. (2024). Deep learning in asset pricing. Management Science, 70:714–750.
Chen, M., Li, X., and Zhao, T. (2020). On generalization bounds of a family of recurrent neural networks. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics,
volume 108 of Proceedings of Machine Learning Research, pages 1233–1243.
Chen, T. and Guestrin, C. (2016). XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 785–794.
Cheung, W. C., Simchi-Levi, D., and Zhu, R. (2019). Learning to optimize under non-stationarity. In Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics.
Cortes, C., Mohri, M., and Storcheus, D. (2019). Regularized gradient boosting. In Advances in Neural Information Processing Systems, volume 32.
Dahlhaus, R. (1997). Fitting time series models to nonstationary processes. Annals of Statistics, 25(1):1–37.
Diebold, F. X. and Mariano, R. S. (1995). Comparing predictive accuracy. Journal of Business & Economic Statistics, 13(3):253–263.
Diebold, F. X. and Pauly, P. (1987). Structural change and the combination of forecasts. Journal of Forecasting, 6(1):21–40.
Dobriban, E. and Wager, S. (2018). High-dimensional asymptotics of prediction: Ridge regression and classification. Annals of Statistics, 46(1):247–279.
Elliott, G. and Timmermann, A. (2004). Optimal forecast combinations under general loss functions and forecast error distributions. Journal of Econometrics, 122(1):47–79.
Fama, E. F. and French, K. R. (1993). Common risk factors in the returns on stocks and bonds. Journal of Financial Economics, 33(1):3–56.
Fama, E. F. and French, K. R. (1997). Industry costs of equity. Journal of Financial Economics, 43(2):153–193.
Giacomini, R. and Rossi, B. (2015). Forecasting in nonstationary environments: What works and what doesn't in reduced-form and structural models. Annual Review of Economics, 7:207–229.
Giacomini, R. and Rossi, B. (2016). Model comparisons in unstable environments. International Economic Review, 57(2):369–392.
Giacomini, R. and White, H. (2006). Tests of conditional predictive ability. Econometrica, 74(6):1545–1578.
Giraitis, L., Kapetanios, G., and Price, S. (2013). Adaptive forecasting in the presence of recent and ongoing structural change. Journal of Econometrics, 177(2):153–170.
Gneiting, T. and Resin, J. (2023). Regression diagnostics meets forecast evaluation: Conditional calibration, reliability diagrams, and coefficient of determination. Electronic Journal of Statistics, 17(2):3226–3286.
Goktas, D., Riaño-Briceño, G., Abdullah, A., et al. (2026). TempusBench: An evaluation framework for time-series forecasting. arXiv:2604.11529.
Gu, S., Kelly, B., and Xiu, D. (2020). Empirical asset pricing via machine learning. Review of Financial Studies, 33(5):2223–2273.
Han, E., Huang, C., and Wang, K. (2024). Model assessment and selection under temporal distribution shift. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 17374–17392.
Hansen, P. R. (2005). A test for superior predictive ability. Journal of Business & Economic Statistics, 23(4):365–380.
Hansen, P. R., Lunde, A., and Nason, J. M. (2011). The model confidence set. Econometrica, 79(2):453–497.
Hewamalage, H., Montero-Manso, P., Bergmeir, C., and Hyndman, R. J. (2021). A look at the evaluation setup of the M5 forecasting competition. arXiv:2108.03588.
Hsu, D., Kakade, S. M., and Zhang, T. (2012). Random design analysis of ridge regression. In Proceedings of the 25th Annual Conference on Learning Theory, volume 23 of Proceedings of Machine Learning Research, pages 9.1–9.24.
Huang, C. and Wang, K. (2023). A stability principle for learning under non-stationarity. arXiv:2310.18304.
Mincer, J. A. and Zarnowitz, V. (1969). The evaluation of economic forecasts. In Economic Forecasts and Expectations: Analysis of Forecasting Behavior and Performance. National Bureau of Economic Research.
Pesaran, M. H. and Timmermann, A. (2007). Selection of estimation window in the presence of breaks. Journal of Econometrics, 137(1):134–161.
Saly-Kaufmann, A., Wood, K., Peter-Calliess, J., and Zohren, S. (2026). Deep learning for financial time series: A large-scale benchmark of risk-adjusted performance. arXiv:2603.01820.
Smith, S. C. and Timmermann, A. (2021). Break risk. Review of Financial Studies, 34(4):2045–2100.
Stambaugh, R. F. (1999). Predictive regressions. Journal of Financial Economics, 54(3):375–421.
Theil, H. (1966). Applied Economic Forecasting. North-Holland.
Trauger, J. and Tewari, A. (2024). Sequence length independent norm-based generalization bounds for transformers. In Proceedings of the 27th International Conference on Artificial Intelligence and Statistics, volume 238 of Proceedings of Machine Learning Research, pages 1405–1413.
Vogt, M. (2012). Nonparametric regression for locally stationary time series. Annals of Statistics, 40(5):2601–2633.
Waghmare, K. and Ziegel, J. (2026). Proper scoring rules for estimation and forecast evaluation. Annual Review of Statistics and Its Application, 13:271–296.
Welch, I. and Goyal, A. (2008). A comprehensive look at the empirical performance of equity premium prediction. Review of Financial Studies, 21(4):1455–1508.
White, H. (2000). A reality check for data snooping. Econometrica, 68(5):1097–1126.
Yang, T., Zhang, L., Jin, R., and Yi, J. (2016). Tracking slowly moving clairvoyant: Optimal dynamic regret of online learning with true and noisy gradient. In Proceedings of the 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pages 449–457.
Yuan, J. and Lamperski, A. (2020). Trading-off static and dynamic regret in online least-squares and beyond. Proceedings of the AAAI Conference on Artificial Intelligence, 34(4):6712–6719.
Zhang, A., Cheng, Y., and Leung, K. (2026). Benchmarking deep time series models for equity portfolios. arXiv:2606.09420.
Zhao, P. and Zhang, L. (2021). Improved analysis for dynamic regret of strongly convex and smooth functions. In Proceedings of the 3rd Conference on Learning for Dynamics and Control, volume 144 of Proceedings of Machine Learning Research, pages 48–59.
Zhao, P., Zhang, L., Jiang, Y., and Zhou, Z.-H. (2020). A simple approach for non-stationary linear bandits. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, volume 108 of Proceedings of Machine Learning Research, pages 746–755.
Decomposing Rank Reversals under Temporal Nonstationarity: Alignment, Aggressiveness, and Instability
A THEORETICAL RESULTS AND PROOFS
This appendix gives the derivations behind Section 3. It has four subsections. Each subsection expands the subsection of Section 3 with the same number, in the same order and with the same logic. We restate the claims of Section 3, add the definitions and assumptions that it omits, and prove every claim. We also include further results that Section 3 does not state.
In Section A.1, we expand Section 3.1. We prove Proposition 1 of Section 3.1 in Proposition A.1, together with the constrained scaling rules that Section 3.1 omits. These results hold in every finite sample. They need no stationarity assumption and no linear-model assumption.
In Section A.2, we expand Section 3.2. We prove Proposition 2 of Section 3.2 in Propositions A.2 and A.3. The phase boundary needs the risk expansion (5).
In Section A.3, we expand Section 3.3. We bound the risk of ridge regression under coefficient drift and serial dependence, which proves (6) (Proposition A.4). We then solve for the memory that minimizes an exactly solvable version of this risk, which proves Proposition 3 of Section 3.3 (Corollary A.5). Each result states the conditions that it needs.
In Section A.4, we expand Section 3.4. We extend the ridge bound to the surrogate, that is, to frozen feature maps (Proposition A.6) and to boosted trees with fixed splits (Proposition A.8). We derive an exact coordinate-wise phase boundary for the surrogate (Proposition A.9). We then bound the gap between the surrogate and the trained model. This proves Proposition 4 of Section 3.4 (Proposition A.11 and Corollary A.16), and it gives the conditions for boosted trees, RNNs, LSTMs, and Transformers (Propositions A.12–A.15).
Throughout, and are the Euclidean norm and inner product. For symmetric matrices, means that is positive semidefinite. We write E and Var for expectation and variance, tr for the trace, and R for the real line. The index is the forecast date, and the memory is the number of most recent observations that train a model. We number the results of this appendix A.1, A.2, and so on. We cite the results of Section 3 by their number in that section.
A.1 Forecast-score decomposition, ensembling, and scalar calibration
Proposition A.1 (optimal common scalar). Assume . Then . Let be any nonempty closed interval, bounded or unbounded. On , the score has the unique maximizer
where is the projection onto the interval. The interval sets the calibration rule. Signed scaling uses and gives . Sign-preserving scaling uses and gives . Shrinkage-only scaling uses and gives . For unconstrained scaling, the maximum score and the gain over are
If , every forecast is zero. Then the score is zero for every , and the optimizer is not identified.
Proof. Expanding the squared error gives . For , completing the square gives . This is a concave parabola with vertex . Hence its maximizer on a closed interval is the projection of the vertex onto that interval. At the score is . Subtracting it from gives (10). We now apply this result to three cases. First, consider a single nonzero replicate . Define and . Then and , so the unconstrained optimum is
. It follows that the optimal scale shrinks the forecast if and expands it if . Second, consider the average replicate score under one common scale. Here and , which gives
Third, consider the ensemble mean with . Here and . Hence , and the maximum score is . The gap between the two maxima is
This gap is the loss that instability causes even after optimal rescaling.
The optima above are in-sample oracle diagnostics, because and use the evaluation outcomes. A deployable scaling must use only information that is available before each forecast date.
A.2 Rank reversal and the complexity phase boundary
We now give the details of the phase boundary in Section 3.2. Let be a simple model class and a more complex class. Let be the set of predictors that class can fit. We call the classes nested if . Let be the excess loss of class at memory . This is the expected squared error of the fitted forecast against the current conditional mean, so the irreducible noise drops out. We assume the leading expansions
for . These are the expansions (5) of Section 3.2. The terms have the following meaning. The oracle approximation error is the smallest error that a predictor in can attain against the current conditional mean. The term is a bias that does not depend on the history. The term scales with the noise variance and the effective dimension. The terms and are the coefficients of the linear and quadratic drift terms after filtering. Regularization and model type can change both and , and may be negative. The remainder has the known bound . We show in Section A.3.2 that the ridge risk has this form with explicit coefficients. In the nested case, implies . It does not order the other terms. Set
The complex class gains in the history-independent loss. It pays in the history-dependent terms.
We prove Proposition 2 of Section 3.2 in two parts. We first state the conditions under which each class wins (Proposition A.2). The remainder bounds in these conditions form the band of the illustration (Fig. 1A). We then analyze the leading approximation (Proposition A.3).
Proposition A.2 (complexity phase boundary). The complex class has strictly smaller loss whenever
The simple class has strictly smaller loss whenever
Between these two inequalities, the leading expansion alone does not determine the ranking.
Proof. We subtract (13) for k = 0 from (13) for k = 1:
Since , the difference is negative under (15) and positive under (16).
Proposition A.3 (leading-approximation phase boundary). We now ignore the remainders. Suppose and . The complexity cost is then strictly convex in . Its unique minimizer and its minimum satisfy
(17)
If , these reduce to and . In this leading approximation, the complex class wins at memory if and only if (Fig. 1A). The phase boundaries are the positive roots of
Three cases follow. If , the complex class never wins. If , the two curves touch at . If , the complex class wins on an interval between the two positive roots of (18). Only the part of this interval with admissible is relevant.
Proof. The second derivative is , so is strictly convex on . Hence the first derivative is strictly increasing. It tends to as and to as , so it has exactly one zero . Multiplying by gives the cubic in (17). Next, the complex class wins at memory if and only if . Multiplying this inequality by gives . The left side equals , so its zeros solve , which is (18). Since is strictly convex and as and as , the equation has no solution if . It has the single solution if , and two positive solutions if . In the last case, holds exactly between the two solutions. This gives the three cases. Finally, let . Then , so . Hence , and gives .
Two degenerate cases with and are simple. If and , the complex class wins for . If and , it wins for . In the first case, , and in the second case, . The U-shaped pattern above requires . However, can be negative if regularization or model type filters drifting directions more strongly in the complex class. In that case, the U-shaped characterization does not apply. Thus parameter count alone decides neither side of the comparison in (15) and (16).
A.3 Exact prediction risk and optimal memory for ridge regression
We give the details of Section 3.3 here. We first bound the risk of ridge regression under drift and serial dependence (Section A.3.1). We then make the memory dependence exact and prove Proposition 3 of Section 3.3 (Section A.3.2).
A.3.1 Direction-aware ridge risk under temporal dependence
We now study ridge regression when the coefficients drift, as in Section 3.3. Let be the forecast date. The model trains on the observations that precede , indexed by . Observation has predictor vector and outcome . We assume
Here is the coefficient vector at date , and is the regression error. The vector is the per-period drift of the coefficients near date . The term is the remainder that this linear drift leaves out. The estimation target is the current coefficient . We condition on the realized training design . We treat the coefficient path in (19) as fixed, or as a function of .
We define the sample second-moment matrix , the ridge inverse , the ridge filter , and the mean lag :
(20) where is the ridge penalty. The ridge estimator is
Three further quantities enter the estimation error:
We call the time-weighted design imbalance. It vanishes if every lag carries the same second-moment matrix. We call the curvature aggregate, because it sums the design-weighted remainders . We call the score. Its conditional mean is .
We assume that the centered conditional score variance obeys
Here is the error variance near date , and is a dependence factor. We use (A1) to bound the centered long-run score variance. We do not set the conditional score mean to zero. The stronger condition is strict score exogeneity at the window level. It is strong because contains regressors dated after some of the errors. Predetermined predictors, lagged returns, and persistent predictors with return-correlated innovations need not satisfy it (Stambaugh, 1999). For this reason, we keep in the bound. If the errors are independent of the whole design, conditionally homoskedastic, and conditionally serially uncorrelated, then . Serial dependence can require a bounded inflation factor .
For a vector , write . This local design norm measures the squared prediction difference, averaged over the training rows. We split the estimation risk into four components:
(24)
The term is the regularization bias, the part of that ridge shrinks away. The term is the ridge-filtered spectral dimension, which scales the variance. The term is the drift energy that the ridge filter passes through. The term is a remainder. It records three departures from the ideal case: curvature in the coefficient path, time imbalance in the realized design, and a nonzero conditional score mean.
In Section 3.3, we suppress the penalty and the date in the notation. We write , and there for , and . We keep the full notation here.
Proposition A.4 (conditional ridge identity and bound). The conditional excess prediction risk in the local design norm, , satisfies the exact identity
(25)
Under (A1), it also satisfies, for every ,
(26)
Proof. First we expand the estimator. The ridge normal equations and (19) give
Subtracting yields
The first three terms are functions of . The last term has conditional mean zero given . Hence the conditional risk equals the squared norm of the first three terms plus the variance of the last term. This is (25). The identity needs no bound on the variance. We use (A1) only in the final step.
To prove (26), we use the inequality , which holds for every . We apply it twice. The first application, with , separates the remainder from the leading bias. The second application, with , separates the regularization bias from the filtered drift. For the variance term, is positive semidefinite. Hence (A1) and the cyclicity of the trace bound the variance term. Because and commute, the bound equals
Collecting the terms proves (26).
Two features of (26) matter for the choice of memory (Fig. 1B). First, the variance term scales with the ridge-filtered dimension and decays like . If , serial dependence preserves this order. Second, the obsolete-data term scales with , which uses the filtered drift . Ridge shrinks drift in heavily shrunk or low-variance directions. Thus such drift adds little to the risk in the local prediction norm. We now connect the local norm to next-period risk. Let be the second-moment matrix of the predictor at the forecast date, conditional on . We measure next-period excess prediction risk by . Suppose for a constant . Then this risk is at most . Hence times the right side of (26) also bounds the next-period risk. If the covariance is locally stable, one would expect , , and to approach their local population counterparts. Finally, exact local linearity, a time-balanced design, and together imply .
A.3.2 Optimal memory and minimized risk
The bound (26) controls the risk from above. It does not identify the risk-minimizing memory. An exact memory calculation needs stronger assumptions than (A1). Hence we study a simplified family of candidate histories. All histories share the same local second-moment matrix , coefficient , drift , and penalty . We also assume , that is, . This holds, for example, if , , and all vanish. The centered score covariance equals exactly for a constant . These assumptions define a simplified comparison. We do not claim them for arbitrary nested historical windows. Write and . Let . Define
(27)
Here is the regularization bias, is the filtered drift energy, is their cross term, and is the variance scale. Under these assumptions, (25) reduces to the exact interpolation
(28) where is the conditional risk under these assumptions. This is the risk (7) of Section 3.3, which we write there as .
The risk (28) has the form (13) of Section A.2. Indeed, and . Collecting the terms in , we can take
and we treat any oracle approximation error separately in . These are the coefficients that Section 3.3 states. This choice keeps the known linear term explicit. A quadratic-only surrogate would move this term into . It would then leave a remainder of order , which can make a narrow ranking margin uninformative.
We restate Proposition 3 of Section 3.3 and prove it.
Corollary A.5 (cross-term-aware interior memory). Assume and . Extend (28) to real . The extended risk is strictly convex and has a unique positive minimizer (Fig. 1B). It satisfies
If , this condition reduces to the exact finite- cubic
If is large and is negligible relative to , then . The sign of shifts the optimum. A negative lengthens the optimal history, and a positive shortens it. The cube-root formula is only approximate. It fails for general ridge shrinkage and for short histories.
Proof. Differentiating (28) gives . Its derivative is , so the first derivative is strictly increasing. It tends to as and to as . Hence it crosses zero exactly once on , and this zero is the unique minimizer. Setting and multiplying the first-order condition by gives (31).
Integer histories need a final step. For admissible histories , we clip the continuous optimum to the permitted interval before we compare neighboring integers. In particular, we use if . If , then by the Cauchy-Schwarz inequality in the -inner product. In that case, any positive favors the longest available history. Regularization changes , , and jointly.
A simpler surrogate keeps only the leading terms. We drop and replace by . The memory-dependent part then equals with . Its minimum is
This value is the minimum of the surrogate, not of (28).
A.4 Surrogate approximations and transfer bounds for trees and neural networks
We give the details of Section 3.4 here. Boosted trees, RNNs, LSTMs, and Transformers are not linear in their parameters. Hence we analyze a surrogate that fixes the feature map before we fit the readout. We bound the risk of this surrogate for frozen feature maps and fixed-topology boosting (Section A.4.1), and we derive its exact spectral phase boundary (Section A.4.2). We then bound the gap between the surrogate and the trained model (Section A.4.3).
A.4.1 Frozen feature maps and fixed-tree boosting
The ridge argument of Section A.3.1 extends exactly to a feature map that we fix before we observe the outcomes that fit its readout. Here “fixed” means that the parameters of the map do not change during the readout fit. The output of the map may still depend on the input sequence. We need this condition because a feature map that we select on the same responses as its readout is not fixed. For trees, the feature map is the tree topology. For the neural models, it is the encoder that produces the final hidden state or the pooled token state.
Let be the raw input at date . It can be a vector or a sequence of length . Let map an input into , and call the feature vector. We may choose from an independent or an earlier sample. Let be a sigma-field that contains the chosen map and the current design . We condition on and write . We assume that the coefficient path, the approximation residuals, and all matrices below are -measurable. We also assume
(33)
Here is the feature coefficient at date , is its drift per period, and is the remainder of the linear drift. The term is the approximation residual, the part of the conditional mean that the features cannot represent.
We now make and unique. Let be the distribution of the input , and let be the conditional mean function at date . Write for expectation under , and assume . We define as the unique projection coefficient of onto . We define . Then and . This orthogonality holds in the population. It need not hold in a realized historical design.
We define the feature second-moment matrix, the ridge inverse and filter, the time imbalance, the aggregate bias, and the score:
(34)
We fit the readout by ridge regression of on with penalty and . That is, minimizes . We assume, with and as in (A1),
We do not assume a zero conditional score mean. The term carries any whole-window score bias, including the bias that persistent endogenous predictors induce. Let be any -measurable matrix that defines the prediction norm, and write .
Proposition A.6 (frozen-feature-map ridge bound). Assume the model (33), the projection identification above, and (35). The conditional risk of the fitted readout for the represented target is then exactly
(36)
Set
(37)
Then, for every ,
Proof. The ridge normal equations give
We center at and take the conditional squared -norm. This proves (36). Two applications of Young's inequality bound the squared bias, as in the proof of the ridge bound in Section A.3.1. The covariance order in (35) bounds the trace by . This proves (38).
Two choices of are useful. If , the variance term becomes . If is the next-period feature covariance, the bound measures risk in the norm that matters for forecasting. The bound concerns the represented target only. A bound for the full conditional mean must also include the approximation residual at the forecast date. To see this, take a -measurable evaluation design with rows of feature vectors. Let be the approximation residuals at these rows, and set . For any , the prediction error for the full conditional mean satisfies
(39)
This follows from the same two-term norm inequality .
Corollary A.7 (tree and sequence feature maps). Assume that the feature map does not depend on the readout outcomes and that (35) holds. Then the bound (38) of Proposition A.6 holds for each of the following maps:
-
Prechosen trees. Let concatenate the leaf indicators of prechosen tree partitions. Joint ridge fitting of the additive leaf coefficients then obeys (38). This fit is a fixed-tree surrogate. It differs from the usual greedy XGBoost fit.
-
Frozen RNN or LSTM. Let or be the final hidden state of the encoder. A ridge readout on this state obeys (38). It has its own covariance spectrum and coefficient drift.
-
Frozen Transformer. Let be the final-token state or a pooled state of the encoder. A ridge readout on this state obeys the same bound. Attention can depend on the input sequence, but the fitted parameters stay frozen.
We distinguish two lengths. The memory is the number of training dates that fit the readout. The context length is the number of time steps in the input sequence that constructs each feature vector.
Suppose that, over the candidate histories, we can approximate , , , and the remaining terms by constants. The memory-dependent part of the bound then has the form . This is the form (13) that Section 3.4 uses for the surrogate risk. Here is proportional to , and is proportional to . If is the only source of time dependence in the bound, then exactly. For positive and , this form has a unique positive continuous minimizer. It solves
For admissible integer histories , we clip the continuous solution to the history interval and compare the neighboring integers. This procedure minimizes the stated surrogate. It does not minimize the risk of a retrained encoder.
We can also analyze the stagewise squared-loss updates of boosting for fixed tree topologies. This avoids refitting all leaf coefficients jointly. Let be the number of boosting stages. Tree has leaves, and is its matrix of leaf indicators on the training rows. We treat each as fixed given . Let be a nonnegative diagonal matrix of fixed row-subsampling weights, and set for full-row fitting. Let be the leaf penalty of stage , and let be the learning rate. We assume a fixed zero initial prediction and no penalty. Define the stage- leaf smoother and the boosting smoother by
The product in (42) runs from on the left to on the right. Let . The fitted values at the training inputs are .
Let be the current regression function evaluated at the historical inputs. Let be the matrix of lags. We assume that the historical conditional means obey
where we treat the drift vector and the remainder as constants given . The remainder includes any distortion of the conditional mean that comes from conditioning on the whole historical design. Hence is a strong whole-window restriction. It can fail with persistent endogenous predictors or lagged returns. Define the centered residual . We assume
The mean-zero equality holds by definition of . It does not impose strict exogeneity on the original return disturbance. We can take , for example, if the centered errors are conditionally serially uncorrelated and conditionally homoskedastic with variance at most given . Independence from the design and homoskedasticity alone do not suffice, because off-diagonal covariances can remain. We use the scaled norm .
Proposition A.8 (fixed-topology boosting bound). Assume (41)–(44). The conditional local-design risk of the boosted fit is then exactly
Define
Then, for every ,
Proof. Let be the vector of fitted values after stage , with . At stage , squared-loss minimization on the fixed leaves gives the fitted increment . Hence the residual obeys
Iterating from yields . We substitute (43) and obtain
The noise term has conditional mean zero, which gives (45). Two Young inequalities bound the squared bias. The condition (44) bounds the variance by . This proves (47).
The bound above measures risk on the training inputs. Forecasting needs the risk on a fixed common evaluation design with rows. Write for the scaled norm on this design. Let be the matrix of leaf indicators that tree assigns to the evaluation rows. Define
(48)
Here the empty product equals I. This operator maps the training response to the forecast of the fixed-tree model on the evaluation design. We call this forecast the reference forecast. Let be the current mean vector on this design. The same calculation as above gives the unclipped reference risk
(49)
Under (44), the variance term is at most , where . For any , two Young inequalities then give the explicit upper bound
Hence .
The boosting operator filters the drift in (47). Consider a single fixed tree with and . Then , where is the number of training rows in leaf . The leaf penalty in (41) acts on the unnormalized squared-loss scale. It differs from the normalized ridge objective (21). Suppose we hold fixed and grows in proportion to . Then each shrinkage factor tends to one as grows. Short histories thus receive more shrinkage, which makes boosting less aggressive there. Consequently, and change with the memory. If we scale the penalty as , the relative penalty stays stable once the leaf proportions stabilize. This scaling is an additional condition. It does not follow from a fixed tree topology.
For several trees, need not be symmetric. Hence the relevant variance dimension is , not a ridge eigenvalue sum. Suppose and D_h^2_{\text{boost}} stay stable over the candidate windows, and we control the other terms. Then the memory-dependent part of the bound has the form . If is the only source of time dependence, then , and the positive continuous minimizer solves
This result does not cover outcome-dependent greedy splits, leaf penalties, or an outcome-dependent initial prediction. A fully retrained XGBoost model has all three features. Analyzing them needs additional assumptions. We treat greedy splits in Section A.4.3.
A.4.2 Spectral phase boundaries for fixed feature maps
The bounds above compare the memory-dependent costs in aggregate. We now compare models coordinate by coordinate in an orthogonal fixed-feature setting. This refines Proposition 2 of Section 3.2 for the surrogate. Let be features that we fix before we use the readout outcomes. Let be a generic input drawn from the current input distribution , and write for expectation under . We assume that the features are orthogonal under : with . We write the current conditional mean as . Here is the coefficient of mode , and is orthogonal to every . The prediction norm is . We assume that the training normal equations are diagonal with the same . Let be the per-period drift of . We define the training score of mode and assume its conditional moments:
These assumptions encode four conditions: locally linear coefficient drift, temporal balance of the design, an exact coordinate score variance, and zero conditional score bias given the whole design. The last condition is strict score exogeneity. A long-run variance bound does not imply it. All four conditions are stronger than the inequalities that we used for the frozen-feature-map and boosting bounds.
For a subset of modes, we fit the ridge coefficients with for , and we set all other coefficients to zero. Put , the ridge gain of mode . Put , the bias of coordinate .
Proposition A.9 (exact spectral complexity boundary). Assume (52). The conditional squared error of the fitted forecast for the current conditional mean, excluding irreducible future noise, is
Consider nested mode sets that we fit with the same , and let be the added modes. The richer set has strictly smaller error if and only if
Now fit all included modes without penalty, so that for . Define , , and . Then (54) reduces exactly to
The left side is the approximation error that the added modes remove. The right side has two costs of fitting them. The estimation variance falls with . The drift bias grows with .
Proof. For an included mode, (52) gives and . Orthogonality makes the squared prediction error a sum of coordinate errors, plus . An omitted mode contributes . This proves (53). The common coordinates cancel in the nested comparison, which gives (54) and (55).
Corollary A.10 (exact interior-memory equation). Assume that , , , and the coefficient path in Proposition A.9 are the same across candidate histories. Define
The part of (53) that depends on equals . Assume and . The continuous extension of this part has a unique positive minimizer. It solves
If we fit all modes in without penalty, then and . The minimizer then solves the cubic below, and it obeys the asymptotic form when it is large:
We now apply this result to the cost of the added modes. Suppose we fit the added modes in (55) without penalty, and suppose . Their complexity cost is . Its minimizer solves (58) with replaced by and replaced by . The complex class wins on an interval of positive histories if and only if exceeds the minimum of this cost. If and , the complex class wins for all . For integer histories, we must check the grid directly.
Proof. We expand the square in (53). Its -dependent terms are , up to a constant. Differentiation gives . Its derivative is , so it has exactly one zero, which is the minimum. The unpenalized formulas follow by setting .
The results above apply to boosted trees with fixed splits. Take one prechosen squared-loss tree with unpenalized leaf means. Refine it into a nested tree with more leaves. An orthogonal contrast basis for the refinement makes the number of added leaf contrasts. The quantity is the reduction in current approximation error, and Q is the drift energy in these contrasts. Under the score and design conditions above, (55) is thus a boundary for fixed-partition XGBoost-type models.
For several fixed boosting trees, we use the general noncommuting operator bound of Proposition A.8. A spectral specialization needs three further conditions. First, , so that every is symmetric. Second, the commute. Third, their common orthonormal eigenvectors equal the normalized training-sample evaluations of the modes . Commutation alone does not identify these modes. Let be the joint eigenvalue of for mode . The boosting smoother then has the modal gains . If the prediction norm and the score moments use this joint mode basis and satisfy (52), the same calculation of bias, drift, and variance applies to these modes.
The same results cover frozen neural encoders. For a frozen RNN or LSTM, we can orthogonalize the final-hidden-state features and use them as the . For a frozen Transformer, we can orthogonalize the pooled-state or selected-token features and use them as the . Attention may stay input-dependent. Each model family has its own . Hence each family has its own boundary (54) and its own optimum (57). The comparison covers nested sets of readout modes within one frozen family. It does not order different, nonnested encoders. We fix the input-context length of an encoder and vary only the training history . Finally, the cross term explains why a simple cube-root rule is only approximate. Ridge shrinkage and partial boosting gains both give , which can make .
A.4.3 Transfer bounds for boosted trees and neural encoders
We now bound the gap between the surrogate and the trained model, as in Section 3.4. We prove Proposition 4 of Section 3.4 in two steps. First, we bound the risk gap without model-specific conditions (Proposition A.11). Second, we derive the phase boundary and the memory for trained models (Corollary A.16). Between these steps, we give sufficient conditions for each model family.
Proposition A.11 (transfer under forecast perturbation). Let index a model. Let be its fixed-feature surrogate forecast and its retrained forecast at memory . We evaluate both against the same current conditional mean in the evaluation norm of Section A.4.2. Let be common pre-fit information. Define the surrogate risk, the retrained risk, and the squared perturbation by
Then
Consequently, if a surrogate ranking gap exceeds , the retrained forecasts have the same ranking sign. Next, consider the memory. Let be an admissible interval of histories. Suppose for all , where with . Let minimize over , and let minimize over . If is interior, it is the unique positive root of . Otherwise it is the corresponding endpoint of . Then
In Section 3.4, V, K, and W are the surrogate coefficients , , and .
Proof. We expand the difference of the squared norms and apply the Cauchy–Schwarz inequality. This proves (59). For the memory claim, we apply the uniform error bound twice. It shows that the surrogate risk at exceeds its minimum by at most . The surrogate has second derivative . Because minimizes over the interval , strong convexity gives for every . Hence , which is (60).
The transfer error enters additively, and it grows linearly in when is small, because is of second order. This transfer result is conditional. We do not show that is small for XGBoost with outcome-selected splits. We also do not show it for recurrent or attention encoders whose parameters we train on the forecast loss. Before we can transfer the fixed-feature boundary to these algorithms, we need an independent bound on the change in splits, the movement of the features, or the effect of the training algorithm. We now state sufficient conditions that bound the perturbation of Proposition A.11. Each condition concerns a specific version of a training procedure. A model name alone does not imply any of them. Prior work gives learning bounds for regularized boosting, recurrent networks, and Transformers under different complexity restrictions (Cortes et al., 2019; Chen et al., 2020; Trauger and Tewari, 2024). We add explicit forecast-perturbation terms to the memory and phase comparisons of this appendix.
We start with greedy boosted trees, the first family in Section 3.4. We follow the split-and-leaf rules of Chen and Guestrin (2016). Consider squared-loss stagewise boosting with greedy, axis-aligned trees. The model has a fixed learning rate, fixed row weights, leaf penalties, a zero initial prediction, and no penalty. Candidate thresholds lie on a prespecified finite grid, for example a fixed number of histogram bins per feature. Tree depth and stay bounded across candidate histories. Hence the total number of candidate gains along a reference path has a uniform bound.
We define a reference tree sequence from population gains. Let contain the training and common evaluation designs, the candidate grid, the row weights, the penalty choices, and the conditional target law. It excludes the realized readout errors. Index the candidate gains at the reference decisions by . At each reference decision, we compute every normalized empirical gain from the random reference residual. This residual results from applying all earlier reference leaf updates to the training outcomes. We define the population gain . Hence later-stage population gains average over the noisy residuals that earlier reference updates generate. We choose recursively the candidate with the largest population gain, including the choice to stop. These choices define the reference topology, which is -measurable. Let be the forecast that fits leaf updates on this topology. Let be the forecast that uses greedy, outcome-dependent splits on the same grid. We normalize all gains by . We express any minimum-split-loss threshold on this same scale, or we set it to zero.
Proposition A.12 (finite-grid greedy XGBoost with stable splits). Conditional on , assume the following.
(i) Margin. At each reference split, the best population gain exceeds every competing gain by at least .
(ii) Count. The reference decisions involve at most candidate gains in total, including the stop choice.
(iii) Concentration. For each such gain and every ,
where c > 0 and are constants that are common to all gains.
The event in (iii) covers every decision that the greedy algorithm reaches while it agrees with the reference path. We clip both final forecasts to , and we assume that the current conditional mean on the fixed evaluation design lies in . Let and be the conditional mean-squared risks of the clipped reference forecast and the clipped greedy forecast in the common norm of Section A.4.1. Then
(62)
Clipping also contracts squared error to a target in , so
where is the fixed-evaluation upper bound (50). The second inequality in (63) is one-sided, because clipping can only lower the reference risk.
Proof. By the margin condition, deviations below preserve the best split at every reference decision. Induction over nodes and boosting stages then makes the greedy and reference topologies, leaf updates, and forecasts identical. The union bound and (61) give
Clipped squared error against a target in lies in . Hence a disagreement changes the conditional risk by at most times this probability, in either direction. Clipping cannot increase the squared error to such a target. The bound (50) controls the unclipped reference risk. This proves both claims.
We now study the memory implied by this bound. Suppose the stable part of equals with . Suppose also that the split-margin constants do not change across candidate histories. Then the upper bound in (63) equals , where and . This function is strictly convex. Its unique continuous minimizer solves
and exceeds the positive root of , because the derivative of the selection term is negative at that root. Thus a positive split-selection penalty moves the minimizer of this upper-bound surrogate toward longer memory. We do not claim that the minimizer of the actual greedy risk moves by the same amount. This is the boosted-tree statement of Section 3.4, where .
The result has limits. The gain-tail condition (61) is an assumption. It does not follow from the XGBoost objective. Bounded gains, a minimum leaf occupancy, and a suitable dependence condition may supply it, but we do not prove this. Exact-greedy trees that consider every observed threshold behave differently. Their candidate count generally grows with , and adjacent gains have vanishing margins. For them, need not decay, and the constant-parameter memory surrogate fails without new -dependent control. To extend the local-design bound to next-period inputs, we need the fixed-evaluation operator (48) and corresponding design assumptions.
We next turn to recurrent networks, the second family in Section 3.4. Consider an input sequence of fixed length . We fix the reference encoder using independent or earlier outcomes. Its hidden states are . The trained encoder has hidden states . Both encoders start at zero. Here is the input at step , and are the recurrent weight matrices, and and are the input weight matrices. The function is the activation. We write for the operator norm. Suppose the activation is 1-Lipschitz and .
Proposition A.13 (contractive trained RNN). Assume the following bounds. They hold almost surely given the common pre-fit sigma-field , uniformly over evaluation inputs. Their upper bounds are -measurable.
These bounds control the input norm , the recurrent gain , the input weights , and the movement of the two weight matrices and . Let the reference forecast be , where is the input sequence and is the ridge readout fitted on the frozen features. Let the trained forecast be with readout . Assume almost surely given that and , with -measurable upper bounds. Set and . Then, uniformly in ,
Let be the bound on the conditional risk of the reference forecast from Proposition A.6, including any approximation residual via (39). Then the conditional risk of the trained forecast obeys
Proof. The reference state obeys , hence . The state difference satisfies
Iteration gives . We add and subtract to obtain (65). The pointwise bound controls the conditional perturbation in Proposition A.11. This gives (66).
The contraction keeps the perturbation bounded as grows, because . The result stays conditional. It needs bounds on the movement of the trained weights and readout. We do not claim that gradient descent supplies such bounds. This is the RNN statement of Section 3.4, where we write for .
We turn to LSTMs, the third family in Section 3.4. Consider two LSTM encoders on the same inputs . We fix the reference encoder using independent or earlier outcomes. The trained encoder has all its parameters trained on the forecast loss. For either encoder, let be the hidden state and the cell state. Write for the augmented state. The updates are
where is the elementwise product, , and are the forget, input, and output gates, and is the candidate cell state. The sigmoid gates lie in , and . Both encoders start at zero. We assume that the forget gates satisfy .
Proposition A.14 (trained LSTM with controlled gates). Compare the two encoders at any common admissible state and input. Assume that the forget, input, candidate, and output gate outputs of the two encoders differ by at most , respectively, in Euclidean norm. Assume also that the one-step map of the trained encoder, which sends to for a given input, is -Lipschitz in its state argument, with finite . These movement and Lipschitz bounds hold almost surely given , uniformly over evaluation inputs. Their upper bounds are -measurable. Let use the frozen ridge readout, and let use the trained readout. Assume and almost surely given , with -measurable upper bounds. Put
Then
Let be the risk bound for the frozen readout from Proposition A.6 and (39). Consequently, the risk of the trained forecast is at most
Proof. The forget-gate condition and the bounded input gate and candidate give . In addition, . At a common state, perturbing the gates changes the cell update by at most . Since tanh is 1-Lipschitz, the hidden update changes by at most . The Euclidean change in the augmented state is thus at most . We insert and subtract one full state update at the same state and obtain
We iterate this inequality, and then we add and subtract to get (67). We then apply Proposition A.11 to obtain (68).
The forget-gate bound controls the size of the cell state. It does not by itself imply a contraction of the full state, which the special case requires. We must verify the full-state Lipschitz constant from all recurrent and gate weights. Alternatively, we can replace it by a Jacobian product of finite length . If , the factor and hence the bound can grow rapidly with the context length. This is the LSTM statement of Section 3.4, where is the Lipschitz constant of the state update.
We finish with attention, the fourth family in Section 3.4. Consider a one-block Transformer readout with attention heads and a fixed input-context length . We fix its reference attention map using independent or earlier outcomes. For head and token , let and be the reference attention logit and value vector. Let and be their trained counterparts. The value vector carries two subscripts, and the input carries none. Define the head outputs
Proposition A.15 (trained multihead attention block). Assume the following bounds. They hold almost surely given , uniformly over heads, tokens, and evaluation inputs. Their upper bounds are -measurable.
Let and be the feature vectors. Here and are the output projection matrices of the reference and trained blocks, and stacks the head outputs. Assume and almost surely given , with -measurable upper bounds. The frozen forecast is with ridge readout . The trained forecast is . Assume and almost surely given , with -measurable upper bounds. Then
Let be the risk bound for the frozen attention map from Proposition A.6 and (39). Then the risk of the trained one-block model is at most
The perturbation bound has no explicit factor of . It does need a uniform bound on the logit and value perturbations over all tokens.
Proof. Let be a probability vector on the tokens, and let be the softmax derivative. For any vector , we have . This follows from the Cauchy–Schwarz inequality and . We integrate along the line segment between the two logit vectors and obtain
Hence and . Stacking the heads multiplies these Euclidean bounds by at most . We perturb first and the readout second, which proves (69). We then apply Proposition A.11 to obtain (70).
Consider dot-product logits with query and keys . Suppose the query and key are linear images of tokens with norm at most . Suppose also that the query and key matrices of both the trained and reference blocks have operator norm at most . If the query matrices differ by at most and the key matrices by at most in operator norm, then . If the value matrices differ by at most in operator norm, then . For additional Transformer blocks, feedforward layers, and residual paths, we can compose their bounded Lipschitz and perturbation constants. The bound (69) itself holds for one block only. This is the Transformer statement of Section 3.4.
We can combine each of Propositions A.12–A.15 with Proposition A.11 in two ways. First, suppose a fixed-surrogate complexity margin is strict and exceeds the two relevant transfer errors. Then the model ranking does not change. Second, suppose the transfer error is uniform over the candidate histories and the fixed-surrogate risk has the strongly convex memory form above. Then (60) localizes the retrained optimum. Both implications are conditional on the model-specific constants above. We do not claim that an arbitrary trained model satisfies them.
Corollary A.16 (model-conditional phase boundary and memory). Fix one common evaluation target, one design or distribution, one prediction norm, and one pre-fit sigma-field for all models and histories. If XGBoost enters the comparison, we take on the fixed evaluation design as the prediction norm of every model. Let be the risk of the fully trained model , and let be the risk of its fixed surrogate. Define the transfer error as follows. For a finite-grid greedy boosted-tree model that satisfies Proposition A.12, set
For a trained RNN, LSTM, or one-block Transformer, set, respectively,
with given by (65), (67), or (69), and with the surrogate risk bound of the corresponding proposition. We assume that the gain-tail and movement bounds that define also hold given this common . For XGBoost, we assume that the fixed-evaluation moment and gain-tail conditions hold with for every candidate . We also assume that the fixed-surrogate risks of classes and have expansions of the form (13), with the surrogate remainder bounded by . For XGBoost, the fixed-surrogate risk is the clipped reference risk of (62). The unclipped risk (49) gives only a one-sided upper bound after clipping. Hence we cannot derive the two-sided expansion of that we need from Proposition A.8. For XGBoost, this expansion is an additional assumption.
Then the following hold.
(a) The fully trained complex model has smaller risk than the fully trained simple model whenever
(b) The reverse ranking holds when is below the same leading boundary minus all four remainder terms, that is, when .
(c) Fix one model . Suppose uniformly over a continuous admissible history interval, that , and that both minimizers below lie in this interval. Let minimize , and let minimize the surrogate expansion . Then
if the surrogate minimum is interior. At a boundary, is the constrained minimum instead.
Because we keep the known linear term explicit, need not absorb it. The localization bound is informative only if the remaining uniform error is small on the chosen interval. Items (a) and (b) are the phase-boundary statement of Proposition 4 in Section 3.4, and item (c) is its memory statement.
Proof. We combine the transfer bound (62) for XGBoost with Propositions A.13–A.15 for the neural models. This gives in the common evaluation norm. For the neural cases, increases with , so we can replace by its bound . We then subtract the two fixed-surrogate expansions. Bounding their remainders and the transfer errors gives (71). For the reverse ranking in (b), we repeat the steps with the signs reversed. For (c), the trained risk differs from by at most , uniformly on the interval. The strong-convexity argument in the proof of Proposition A.11 then gives (72). Together with Proposition A.11, this proves Proposition 4 of Section 3.4.
B CONTROLLED SIMULATION RESULTS
This appendix gives the design and results for Section 4.1; Figure 2 presents the main-text gradual-drift comparison.
B.1 Simulation method
Covariates and signal. Each observation has covariates drawn from . The covariance is with . The decay parameter sets the spectrum. We call the flat spectrum and the decaying spectrum. The conditional mean at drift state is
The nonlinear strength scales a standardized product feature with unit variance. The baseline coefficient vector has a single nonzero entry, , so the linear signal has variance for every . The response is with . The signal-to-noise ratio is , which fixes the noise standard deviation for .
Drift. A training observation of age was recorded observations before the prediction date. Its coefficient vector equals except in one drifting coordinate (coordinate 1 in the factorial grid). Under gradual drift, with rate . Under an abrupt break, . Under zero drift, . The test targets use (age zero). Thus drift measures how far older observations lie from the prediction-date relation. The nonlinear term does not drift.
Models. The linear model uses the covariates. The quadratic model adds the 36 centered second-order features for , which gives 44 features. Every feature has mean zero. The quadratic span contains the true nonlinear term, so the quadratic model is correctly specified up to drift. Both models are fitted without an intercept by ridge regression. For features , the estimator minimizes over the most recent observations, with penalty on the raw feature scale. The memory is the number of training observations used. The histories are nested, so every memory uses the last rows of one 256-row history.
Worlds, replicates, and cells. A world fixes 16 test covariate vectors drawn from and their targets. Within a world, we draw replicates. Each replicate is an independent 256-row training history. All models, penalties, and memories are fitted to the same replicates and scored on the same targets. Hence replicate variation measures the effect of training sampling at fixed dates. Each factorial condition uses independent worlds. A cell is one combination of design, model, penalty, and memory. It pools test targets, collected in the vector . Let be the forecasts of replicate and their average. Let be the known conditional mean at the test points.
Score and exact decomposition. The score is the out-of-sample against the zero forecast,
Define the aggressiveness , the alignment (the cosine between targets and the average forecast), and the instability . Expanding the square gives the exact identity
We call the alignment reward, the aggressiveness cost, and the instability cost. We compute all three from unrounded forecasts. The largest reconstruction error over all 844 cells is . We also report the excess risk , which removes observation noise from the comparison.
Spectral proxy. For each cell we compute a population approximation to the excess risk. Let be the variance of feature . It equals for a linear feature and for a quadratic one. Define the ridge filter and the variance-effective dimension . The shrinkage bias in feature is . The drift bias in the drifting coordinate is under gradual drift and under the break. Let be the sum over features of times the squared total bias. Let for the linear model, which omits the nonlinear term, and for the quadratic model. The proxy excess risk is
The proxy is . The proxy gain of the quadratic model is . This approximation is exact in form for correctly specified gradual linear drift. For the break and for the omitted nonlinearity, it is a diagnostic approximation, because the omitted term enters only as extra residual variance. We assign no proxy to the null design.
Focused designs. Four further designs share the ridge fits and score definitions above. All use zero nonlinear strength unless noted. (i) Ridge scaling. We use the flat spectrum, SNR = 1, gradual drift with , linear ridge with , and 11 memories in . The design has 512 worlds. Training covariates are deterministic and balanced. A block of rows contains for each coordinate , placed at positions and . The block is tiled 16 times, and every memory is a whole number of blocks. Hence the training second-moment matrix equals exactly. Moreover, the age-weighted second-moment matrix equals the mean age times , because each sign pair is symmetric in age. Only the noise is redrawn across replicates. The test covariates stay random. We take the observed optimal memory as the grid memory with the smallest excess risk. We compare it with the proxy minimizer and regress on . Balancing the squared drift bias, of order , against the variance, of order , predicts a slope of . (ii) Directional drift. We use gradual drift with , SNR = 2, , and the drifting coordinate (variance ) or (variance ). The raw drift is equal, but the filtered drift differs. (iii) Stationary weak signal. We use zero drift, , , , noise standard deviation , and 192 worlds. (iv) Permutation null. We use zero drift, , SNR = 2, , and 96 worlds. In each training history and each test set, we generate the responses from an independent covariate draw and then permute them across rows. Hence responses are independent of the covariates. We set the conditional mean to zero. No forecast should beat zero systematically. The directional, weak-signal, and null designs each use both models, both penalties, and the five main-grid memories (the scaling design uses linear ridge only). In total, the grid has factorial cells and focused cells, which gives 844.
Random numbers and pairing. We use NumPy's default_rng with base seed . The factorial seed is , where and are the zero-based positions of the SNR and decay in their lists. Hence all nine drift- conditions with the same SNR and spectrum reuse the same standard normal draws, and only the coefficients and noise scale change. These common random numbers pair the contrasts across drift and nonlinear strength. The directional designs use and the scaling designs use . The weak-signal and null designs use , where and is the position of the design in the run order.
Paired contrasts and intervals. For each of the 360 factorial conditions (drift, SNR, , , , ), we compare the two models fitted to the same worlds. Let . For world , let be the mean squared forecast error averaged over replicates and the 16 targets. The paired difference is . The standard error of is divided by the mean per-world target energy. The interval is standard errors. The 24 worlds are independent, so this normal interval treats worlds as clusters. We call a contrast clear if its interval excludes zero. We call the proxy sign matching if and the proxy gain have the same sign. The intervals are descriptive. They do not adjust for multiplicity or for the search over specifications.
B.2 Results

Figure 4: Ridge theorem check under a balanced linear design. Each panel varies memory at a fixed coefficient-drift rate. Solid curves are observed excess prediction risk and dashed curves are the spectral approximation. The vertical rule marks the observed optimum; all four agree with the proxy grid optimum, and the log-optimal-memory versus log-drift slope is -0.67.

Figure 5: Direction-aware drift. Rows put the same raw drift rate in a high-variance coordinate (top) or heavily filtered low-information coordinate (bottom); columns vary ridge penalty. Linear and quadratic scores are shown at every candidate memory. With light regularization, the best linear memory is 32 in the high-variance direction and 256 in the low-information direction.

Figure 6: Stationary weak-signal and permutation-null controls. Columns compare light and heavy ridge penalties; each panel shows both model classes over every memory. The weak-signal optimum is long-memory, heavily shrunk linear ridge. None of the 20 null specifications exceeds the zero forecast in this run.

Figure 7: Quadratic-minus-linear gap versus memory under zero drift. Rows fix SNR and columns fix covariance decay and penalty . Solid curves with bars are the observed gap and its paired 95% interval; colors give nonlinear strength . Dotted curves are the leading spectral proxy. Positive values favor the quadratic model. The vertical range of each row covers the observed intervals, so a proxy curve that leaves the panel has missed the observed gap by a large margin. The intervals are descriptive and unadjusted for multiplicity.

Figure 8: Quadratic-minus-linear gap versus memory under gradual drift. Rows fix SNR and columns fix covariance decay and penalty . Solid curves with bars are the observed gap and its paired 95% interval; colors give nonlinear strength . Dotted curves are the leading spectral proxy. Positive values favor the quadratic model. The vertical range of each row covers the observed intervals, so a proxy curve that leaves the panel has missed the observed gap by a large margin. The intervals are descriptive and unadjusted for multiplicity.

Figure 9: Quadratic-minus-linear gap versus memory under abrupt drift. Rows fix SNR and columns fix covariance decay and penalty . Solid curves with bars are the observed gap and its paired 95% interval; colors give nonlinear strength . Dotted curves are the leading spectral proxy. Positive values favor the quadratic model. The vertical range of each row covers the observed intervals, so a proxy curve that leaves the panel has missed the observed gap by a large margin. The intervals are descriptive and unadjusted for multiplicity.
C EMPIRICAL DYNAMICS OF FORECAST COMPONENTS
C.1 Experimental method
Targets and sample. Let index the trading days from 1 September 1987 through 30 November 2016, in the calendar of the Kenneth French daily files. Let index the portfolios of the Kenneth French 17-industry classification: Food, Mines, Oil, Clths, Durbl, Chems, Cnsum, Cnstr, Steel, FabPr, Machn, Cars, Trans,Utils, Rtail, Finan, and Other. Let be the value-weighted daily return of portfolio in percent, and let be the daily risk-free rate in percent. We define the target , the daily excess return in decimals. Both series come from the Kenneth French data library, in the vintage built from the 202607 CRSP database. This vintage can differ slightly from the one that the source paper used. We fit and score each industry separately, so no parameter is shared across industries.
Forecast origins and test days. Let run over the 323 calendar months from January 1990 through November 2016. Let be the set of trading days in month . Each holds 15 to 23 days, with a median of 21, and the 323 sets hold 6,784 days. We fit each model once at the start of month , using only days before month . Preprocessing, validation, early stopping, and tuning also use only days before month . We use that fit to forecast every day in . The 590 trading days before 1990 serve only as training days. Each configuration thus yields out-of-sample forecasts per seed.
Benchmark and score. Let be a set of (day, industry) pairs, and let be the vector of the targets in . Let be a vector of forecasts for the same pairs. We score the forecasts against the zero forecast by
The score is 1 for a perfect forecast, 0 for the zero forecast, and negative for a forecast that is worse than zero. The norms pool all pairs in , so is a ratio of sums and not an average of finer scores. The zero benchmark suits daily returns, because their mean is small. Over 1990–2016 the mean of is 0.03% per day, against a root mean square of 1.4%. The source paper uses the same benchmark.
Inputs of the two branches. In the tabular branch, a model maps the vector to the target . In the temporal branch, a model maps the context to . The context holds the predictors of the last trading days, including day . We use as the primary context length and as the secondary one, about one and three months of trading days. We fixed both lengths in advance. Ridge, XGBoost, and the feed-forward networks receive the flattened context, a vector with 129 entries (2,580 for and 7,740 for ). The recurrent and attention networks receive the ordered context. Thus all temporal models use the same numbers within a context length, and their differences reflect the model type. By contrast, a comparison across branches or across context lengths changes the information set, so we do not read it as an effect of the model alone.
Training windows. Let be the window length in months. We write for the expanding window. For forecast month , the window holds the trading days of the calendar months before , or all days before if . No window holds a day of month or later. In the temporal branch, a day may train a model only if all days of its context lie inside the window. Hence a short window never uses predictors from before its start. Test contexts may reach back into the previous month, because those days are observed when we forecast. The numbers of days appear in Table 3. The sample starts in September 1987, so the 64-month window holds the same days as the expanding window for the 37 forecast months from January 1990 through January 1993. The 16-month window is complete from the first forecast month. The memory of the main text is the number of days in the window before subsampling.
Training subsamples and seeds. Let be the seed. Let be the number of window days in calendar month . For every seed , forecast month , and month of the window, we draw of these days without replacement. The draw uses a NumPy generator seeded by . We call the union of the draws over the subsample of the fit. All models of a branch, and all context lengths, use the same draws for the same , up to the first month of a window, where the context rule removes some days. Thus the replicates are paired across models and windows. The seed also determines, together with the model, the month, and the window, the random initialization, the minibatch order, and the dropout masks of a network. Ridge and XGBoost use no random numbers once the subsample is fixed, because we set the XGBoost row and column
| Window | Months | Window days | Subsampled days | Network fit days | Validation days |
|---|---|---|---|---|---|
| 16 months | 16 | 328–340 | 256–265 | 192–199 | 79–87 |
| 64 months | 28–64 | 590–1,352 | 460–1,052 | 263–856 | 246–255 |
| Expanding | 28–350 | 590–7,353 | 460–5,718 | 263–5,522 | 246–255 |
Table 3: Trading days per fit in the tabular branch, from the minimum to the maximum over the 323 forecast months. Window days are the days of the window before subsampling. Network fit days are the subsampled days before the validation block, which train the networks. The counts do not depend on the seed. A temporal fit has fewer window days.
sampling rates to one. Hence their variation across seeds comes from the subsample alone. Random forest adds bootstrap randomness, and networks add their own training randomness. We use six seeds, fewer than the 20 repetitions of the source paper, to limit compute. Each seed defines one replicate in the sense of the main text.
Preprocessing. Let be the set of days that train a fit. For each predictor , we compute its mean and standard deviation over , with divisor . In the temporal branch, we compute them over all days of all contexts of . We replace by 1 if . We standardize every predictor to , and we give the same standardized values to all models, including the boosted trees. Networks also standardize each target with its training mean and standard deviation. We map their forecasts back to decimal returns before scoring. Ridge, XGBoost, and random forest fit the unstandardized targets. Hence every score and every validation criterion uses return units. We store the predictors and targets in single precision.
Linear models. Let be the standardized input of day . For industry , ridge regression solves
The intercept is not penalized. The penalty multiplies the sum of squared errors and not their mean, so shrinks little when is large. We use as a fixed anchor, as in the source paper, and we tune on a grid as a second ridge model. The temporal ridge solves the same problem for the flattened context. Scikit-learn solves the tabular problem directly and the flattened problem with its LSQR solver.
Boosted trees. XGBoost fits gradient-boosted regression trees by squared-error loss. It provides a boosted-tree comparison with the random forest of the source paper. For industry we fit 150 rounds with maximum depth and learning rate . We fix the minimum child weight at 5, the leaf penalty at 1, and the penalty at 0. We use no row or column subsampling, and we find splits from histograms on the GPU. All other settings keep their library defaults. We tune and . The temporal version uses the flattened context.
Random forest. The tabular forest fits a separate regressor for each of the 17 industries using cuML on an NVIDIA A100. Each regressor grows 200 bootstrap trees, with maximum depth 5, minimum leaf size 1, all 129 predictors eligible at a split, and 128 histogram bins. The forest settings are fixed across windows and years; there is no validation grid for this anchor. The same six subsample seeds and monthly forecast origins used by the other tabular models determine its training sets.
Feed-forward networks. For industry , a network maps the standardized input to a scalar through one or two ReLU hidden layers. Dropout with rate follows each hidden layer. The small network has one hidden layer of width 32. The medium network has two hidden layers of widths 128 and 64. The 17 networks of a model train as one batched tensor program, but they share no parameters. We initialize them with the PyTorch defaults for linear layers. We keep the networks small, because the samples are small: a 16-month fit has about 260 subsampled days.
Recurrent and attention networks. These networks read the ordered context. The recurrent network (RNN) applies for , with . The long short-term memory network (LSTM) uses the standard input, forget, and output gates and a memory cell. Both predict from the last state through dropout and a linear map. The Transformer embeds the 129 predictors of each day linearly into width and adds sinusoidal position codes. It applies two pre-normalization blocks. Each block has multi-head self-attention with 4 heads and a residual connection, then a feed-forward layer of width with a GELU activation and a residual connection. Dropout acts on the attention weights and inside each residual
| Model | Input | Fixed settings | Candidate grid (eight candidates) |
|---|---|---|---|
| Tabular branch | |||
| Ridge, fixed alpha | none | ||
| Tuned ridge | none | ||
| XGBoost | 150 rounds; min. child weight 5; penalty 1; no subsampling | and | |
| Random forest | cuML; 200 bootstrap trees; depth 5; min. leaf 1; all features; 128 bins | none | |
| Small MLP | width (32); 4,193 parameters; batch 256; at most 30 epochs; patience 5 | learning rate , weight decay , dropout | |
| Medium MLP | widths (128, 64); 24,961 parameters; batch 256; at most 30 epochs; patience 5 | same as the small MLP | |
| Temporal branch | |||
| Flattened ridge | flat | none | |
| Flattened XGBoost | flat | as XGBoost | as XGBoost |
| Small flattened MLP | flat | width (32); learning rate 0.002; weight decay 0.01; dropout 0; batch 128; at most 20 epochs; patience 4; 82,625 parameters (), 247,745 () | none |
| Tuned flattened MLP | flat | weight decay 0; batch 128; at most 20 epochs; patience 4; 61,969 or 82,625 parameters (), 185,809 or 247,745 () | width , learning rate , dropout |
| Vanilla RNN | ordered | weight decay 0; batch 128; at most 20 epochs; patience 4; 3,721 or 5,217 parameters | hidden size , learning rate , dropout |
| LSTM | ordered | same training settings; 6,829 or 9,361 parameters | hidden size , learning rate , dropout |
| Small Transformer | ordered | 2 blocks; 4 heads; feed-forward width ; same training settings; 6,577 or 12,937 parameters | width , learning rate , dropout |
Table 4: Model specifications. The input is the predictor vector , the flattened context (flat), or the ordered context. Each tuned model has eight candidates, which are all combinations of the listed values. Parameter counts are trainable parameters per industry. When a cell lists two counts, they belong to the two grid values in the listed order. All networks use AdamW and clip the gradient norm at 1.0.
branch. A final layer normalization and a linear map turn the state of day into the forecast. Each industry again has its own network. We list the settings, the candidate grids, and the parameter counts of all models in Table 4.
Hyperparameter selection. Ridge with , the tabular random forest, and the small flattened network have fixed settings, so no tuning choice affects these anchors. We tune every other model once per calendar year, and separately for each context length. Each tuned model has eight candidates (Table 4). For window and forecast month , the validation block is the last months before , with and . Let be the days of the block. We use all of them, without subsampling. Let be the subsampled days of seed that precede the block. For the January refit of the year, we fit each candidate on for the three windows and the seeds , and we predict . For each industry we compute the relative squared error
The score of candidate is the mean of over the 17 industries, the three windows, and the two seeds. We select the candidate with the smallest score. The selection uses only days before 1 January of that year. It then holds for all monthly refits of the year (eleven in 2016), for all three windows, and for all seeds. Thus every window uses the same hyperparameters, and a contrast between windows holds the model capacity fixed. The division by keeps volatile industries from dominating the choice, and it keeps the zero benchmark. The validation days always follow the training days, so no step uses random cross-validation. The frozen configuration files fix the grids and the validation lengths for all runs.
Network training. We minimize the mean squared error of the standardized targets with AdamW. We clip the gradient norm at 1.0, and we use the batch sizes in Table 4. After each epoch we compute the validation score: the mean over industries of on , in return units. Training stops after the maximum number of epochs, or when the validation score has not improved for the patience number of epochs. We keep the weights of the epoch with the best validation score. A forecast fit of a network trains on , and it uses the validation block only to pick the epoch. By contrast, ridge, XGBoost, and random forest train on all subsampled days of the window, including the last months. Consequently, the gradient updates of a network see only 12 of the 16 months in the shortest window, 52 of 64 months in the 64-month window, and all but the last 12 months in the expanding window (Table 3).
Replicate statistics and exact decomposition. Fix a configuration (a model, a context length, and a window) and a set . Let be the forecasts of seed for the pairs in , and let be the number of seeds. The score of seed is . The mean seed score is . We also report the sample standard deviation of the six scores, with divisor , and the interval with . Let be the mean forecast. The ensemble score is . Write , and define
We call the alignment, the aggressiveness, and the instability. The alignment is the cosine between the targets and the mean forecast. The aggressiveness is the size of the mean forecast relative to the targets. The instability is the mean squared distance of the seed forecasts from their mean, relative to . Expanding the squares gives the exact identity
We call the alignment reward, the aggressiveness cost, and the instability cost. We compute all three from unrounded forecasts, and the identity holds to within in all 351,540 scope rows. Because the seeds vary both the subsample and the fitting randomness, mixes both sources of variation.
Scopes and uncertainty. We compute these statistics for five scopes . The overall scope holds all 6,784 days and 17 industries. The industry scope holds all days of one industry. The year scope holds all industries and days of one calendar year (2016 has 11 months). The month scope holds all industries and days of one forecast month. The month-by-industry scope holds the days of one forecast month for one industry. Each scope pools its sums of squares before it forms a score, so the score of a coarse scope is not the average of the scores of finer scopes. This appendix displays the overall scope in tables, and the month and month-by-industry scopes in curve plots. The industry and year scopes remain in the performance files. The interval above describes the variation of the training seeds and subsamples only. It ignores serial dependence across days, dependence across industries, changes of regime, and the choice of hyperparameters. This appendix reports no test of equal predictive accuracy. For the contrast between the two context lengths, we compute for each seed of one model and window. We report the mean of the six values and the interval . The two contexts share the seed indices, but their subsamples differ slightly at the start of each window.
Computation and reproducibility. We ran the experiment as resumable jobs on the Vessel cloud service, each with one NVIDIA A100 GPU. There is one fitting job for the classical models and one for the neural models of each branch, and one aggregation job per branch. Each job splits its work into resumable tasks by calendar year and model group. XGBoost uses CUDA, and ridge uses the CPU. The jobs install PyTorch 2.6.0 (CUDA 12.4), NumPy 2.2.6, pandas 2.2.3, scikit-learn 1.7.2, and XGBoost 3.0.5, and they request deterministic kernels where PyTorch has them. Before a job starts, it checks the predictor panel against a SHA-256 hash. Every fit writes a checkpoint whose hash covers the configuration, the design, the training, validation, and test rows, the seeds, and the forecasts. The aggregation step checks every hash and refuses to continue when a checkpoint is missing or does not match.
| Model | 16 months | 64 months | Expanding | |||
|---|---|---|---|---|---|---|
| Ridge, fixed alpha | Ensemble | 0.0706 | 0.3481 | 0.3477 | ||
| Mean [95% CI] | -0.0909 [-0.1033, -0.0786] | 0.3256 [0.3235, 0.3277] | 0.3386 [0.3374, 0.3397] | |||
| Tuned ridge | Ensemble | 0.3671 | 0.3767 | 0.3644 | ||
| Mean [95% CI] | 0.3515 [0.3487, 0.3543] | 0.3668 [0.3658, 0.3678] | 0.3602 [0.3593, 0.3611] | |||
| XGBoost | Ensemble | 0.3621 | 0.3619 | 0.3392 | ||
| Mean [95% CI] | 0.3316 [0.3284, 0.3348] | 0.3419 [0.3380, 0.3457] | 0.3232 [0.3202, 0.3262] | |||
| Small MLP | Ensemble | 0.3096 | 0.3414 | 0.3423 | ||
| Mean [95% CI] | 0.2869 [0.2841, 0.2898] | 0.3231 [0.3212, 0.3251] | 0.3301 [0.3274, 0.3328] | |||
| Medium MLP | Ensemble | 0.3018 | 0.3383 | 0.3425 | ||
| Mean [95% CI] | 0.2786 [0.2756, 0.2816] | 0.3189 [0.3151, 0.3228] | 0.3270 [0.3232, 0.3308] | |||
| Random forest | Ensemble | 0.3705 | 0.3494 | 0.3079 | ||
| Mean [95% CI] | 0.3549 [0.3514, 0.3583] | 0.3374 [0.3341, 0.3407] | 0.2953 [0.2826, 0.3080] | |||
Table 5: Tabular: pooled out-of-sample for every reported model and training window. In each cell, the upper line gives the of the six-seed ensemble, which scores the mean forecast. The lower line gives the mean of the six seed scores, with its seed-only 95% interval in brackets.
C.2 Results of tabular models
The tabular random forest has mean seed of 0.3549, 0.3374, and 0.2953 for the 16-month, 64-month, and expanding windows, respectively. Its corresponding ensemble scores are 0.3705, 0.3494, and 0.3079. The 16-month window scores highest for this model on both measures.
C.2.1 Month-by-industry curves
We show one model per figure, with one panel per training window: 16 months, 64 months, and expanding. Each panel draws 17 curves, one per industry. A curve gives the six-seed mean of the pooled for that industry in each month. All panels share the vertical axis [-2.0, 1.0], and each industry keeps one color throughout. Values below -2.0 fall outside the frame, and each caption counts them.

Figure 10: Tabular, Ridge, fixed alpha: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 393, 83, and 90 of 5,491 in the three panels.

Figure 11: Tabular, Tuned ridge: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 2, 51, and 52 of 5,491 in the three panels.

Figure 12: Tabular, XGBoost: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 0, 36, and 38 of 5,491 in the three panels.

Figure 13: Tabular, Small MLP: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 1, 2, and 10 of 5,491 in the three panels.

Figure 14: Tabular, Medium MLP: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below fall outside the frame: 6, 1, and 7 of 5,491 in the three panels.

Figure 15: Tabular, Random forest: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below fall outside the frame: 2, 55, and 63 of 5,491 in the three panels.
C.3 Results of temporal models, 20-day context
| Model | 16 months | 64 months | Expanding | |
|---|---|---|---|---|
| Flattened ridge | Ensemble | 0.1915 | -0.0139 | -0.3308 |
| Mean [95% CI] | 0.1397 [0.1346, 0.1447] | -0.2128 [-0.2208, -0.2049] | -1.1533 [-1.1871, -1.1194] | |
| Flattened XGBoost | Ensemble | 0.3341 | 0.3485 | 0.3379 |
| Mean [95% CI] | 0.3026 [0.2992, 0.3061] | 0.3287 [0.3258, 0.3315] | 0.3208 [0.3170, 0.3247] | |
| Small flattened MLP | Ensemble | 0.0200 | 0.1544 | 0.2485 |
| Mean [95% CI] | -0.0841 [-0.0926, -0.0756] | 0.0574 [0.0532, 0.0617] | 0.1623 [0.1552, 0.1694] | |
| Tuned flattened MLP | Ensemble | 0.0406 | 0.1715 | 0.2607 |
| Mean [95% CI] | -0.0350 [-0.0559, -0.0141] | 0.1160 [0.1112, 0.1209] | 0.2066 [0.2038, 0.2095] | |
| Vanilla RNN | Ensemble | 0.3166 | 0.3166 | 0.3315 |
| Mean [95% CI] | 0.2860 [0.2834, 0.2887] | 0.2987 [0.2970, 0.3005] | 0.3184 [0.3161, 0.3206] | |
| LSTM | Ensemble | 0.2317 | 0.2673 | 0.3071 |
| Mean [95% CI] | 0.2087 [0.2059, 0.2114] | 0.2491 [0.2463, 0.2519] | 0.2905 [0.2886, 0.2925] | |
| Small Transformer | Ensemble | 0.3218 | 0.3191 | 0.3361 |
| Mean [95% CI] | 0.2828 [0.2789, 0.2866] | 0.2995 [0.2972, 0.3018] | 0.3193 [0.3172, 0.3213] | |
Table 6: Temporal, 20-day context: pooled out-of-sample for every completed model and training window. In each cell, the upper line gives the of the six-seed ensemble, which scores the mean forecast. The lower line gives the mean of the six seed scores, with its seed-only 95% interval in brackets.
C.3.1 Month-by-industry curves
We show one model per figure, with one panel per training window: 16 months, 64 months, and expanding. Each panel draws 17 curves, one per industry. A curve gives the six-seed mean of the pooled for that industry in each month. All panels share the vertical axis , and each industry keeps one color throughout. Values below fall outside the frame, and each caption counts them.

Figure 16: Temporal, 20-day context: monthly pooled of every completed model, one curve each, under the 16-month, 64-month, and expanding windows. Each month pools all 17 industries and the trading days of that month. Values below -2.0 fall outside the frame: 3, 11, and 112 of 2,261 model-months in the three panels.

Figure 17: Temporal, 20-day context, Flattened ridge: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 14, 552, and 1,962 of 5,491 in the three panels.

Figure 18: Temporal, 20-day context, Flattened XGBoost: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below fall outside the frame: 0, 29, and 29 of 5,491 in the three panels.

Figure 19: Temporal, 20-day context, Small flattened MLP: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below fall outside the frame: 31, 46, and 42 of 5,491 in the three panels.

Figure 20: Temporal, 20-day context, Tuned flattened MLP: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 23, 2, and 9 of 5,491 in the three panels.

Figure 21: Temporal, 20-day context, Vanilla RNN: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 0, 9, and 9 of 5,491 in the three panels.

Figure 22: Temporal, 20-day context, LSTM: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 2, 6, and 4 of 5,491 in the three panels.

Figure 23: Temporal, 20-day context, Small Transformer: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 2, 21, and 22 of 5,491 in the three panels.
C.4 Results of temporal models, 60-day context
| Model | 16 months | 64 months | Expanding | ||
|---|---|---|---|---|---|
| Ensemble | 0.1092 | 0.1654 | -0.0295 | ||
| Flattened ridge | Mean [95% CI] | 0.0772 [0.0712, 0.0831] | 0.1078 [0.1018, 0.1138] | -0.2835 [-0.2946, -0.2724] | |
| Flattened XGBoost | Ensemble | 0.3161 | 0.3402 | 0.3253 | |
| Mean [95% CI] | 0.2812 [0.2779, 0.2845] | 0.3223 [0.3188, 0.3257] | 0.3148 [0.3132, 0.3164] | ||
| Small flattened MLP | Ensemble | -0.3891 | 0.0765 | 0.1690 | |
| Mean [95% CI] | -0.8216 [-0.8845, -0.7588] | -0.0124 [-0.0180, -0.0068] | 0.0881 [0.0846, 0.0916] | ||
| Tuned flattened MLP | Ensemble | -0.0970 | 0.0804 | 0.1822 | |
| Mean [95% CI] | -0.2223 [-0.2347, -0.2098] | 0.0002 [-0.0034, 0.0039] | 0.1158 [0.1121, 0.1196] | ||
| Vanilla RNN | Ensemble | 0.3123 | 0.3167 | 0.3276 | |
| Mean [95% CI] | 0.2776 [0.2747, 0.2806] | 0.2989 [0.2969, 0.3009] | 0.3169 [0.3144, 0.3194] | ||
| LSTM | Ensemble | 0.2153 | 0.2661 | 0.3042 | |
| Mean [95% CI] | 0.1913 [0.1873, 0.1952] | 0.2472 [0.2455, 0.2489] | 0.2885 [0.2876, 0.2895] | ||
| Small Transformer | Ensemble | 0.3191 | 0.3160 | 0.3342 | |
| Mean [95% CI] | 0.2712 [0.2658, 0.2766] | 0.2969 [0.2961, 0.2976] | 0.3195 [0.3178, 0.3212] | ||
Table 7: Temporal, 60-day context: pooled out-of-sample for every completed model and training window. In each cell, the upper line gives the of the six-seed ensemble, which scores the mean forecast. The lower line gives the mean of the six seed scores, with its seed-only 95% interval in brackets.
C.4.1 Month-by-industry curves
We show one model per figure, with one panel per training window: 16 months, 64 months, and expanding. Each panel draws 17 curves, one per industry. A curve gives the six-seed mean of the pooled for that industry in each month. All panels share the vertical axis , and each industry keeps one color throughout. Values below fall outside the frame, and each caption counts them.

Figure 24: Temporal, 60-day context: monthly pooled of every completed model, one curve each, under the 16-month, 64-month, and expanding windows. Each month pools all 17 industries and the trading days of that month. Values below -2.0 fall outside the frame: 32, 0, and 27 of 2,261 model-months in the three panels.

Figure 25: Temporal, 60-day context, Flattened ridge: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 1, 48, and 685 of 5,491 in the three panels.

Figure 26: Temporal, 60-day context, Flattened XGBoost: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 0, 5, and 5 of 5,491 in the three panels.

Figure 27: Temporal, 60-day context, Small flattened MLP: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 673, 55, and 53 of 5,491 in the three panels.

Figure 28: Temporal, 60-day context, Tuned flattened MLP: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below fall outside the frame: 88, 29, and 32 of 5,491 in the three panels.

Figure 29: Temporal, 60-day context, Vanilla RNN: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below fall outside the frame: 2, 4, and 5 of 5,491 in the three panels.

Figure 30: Temporal, 60-day context, LSTM: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 1, 4, and 3 of 5,491 in the three panels.

Figure 31: Temporal, 60-day context, Small Transformer: monthly pooled for the 17 industries, one curve each, under the 16-month, 64-month, and expanding windows. Values below -2.0 fall outside the frame: 1, 6, and 6 of 5,491 in the three panels.
C.5 Configuration-level numerical results
Table 8: All 60 reported Stage 5 model-window-context cells. is pooled against zero over 6,784 dates and 17 industries. The interval uses six seed scores; ensemble scores their mean forecast. The final three columns obey up to rounding.
| Model | Window | Mean | SD | CI low | CI high | Ensemble | 2ag | ||
|---|---|---|---|---|---|---|---|---|---|
| Tabular | |||||||||
| Ridge, fixed alpha | 16m | -0.0909 | 0.0118 | -0.1033 | -0.0786 | 0.0706 | 0.9726 | 0.9019 | 0.1615 |
| Ridge, fixed alpha | 64m | 0.3256 | 0.0020 | 0.3235 | 0.3277 | 0.3481 | 0.9373 | 0.5892 | 0.0225 |
| Ridge, fixed alpha | Exp. | 0.3386 | 0.0011 | 0.3374 | 0.3397 | 0.3477 | 0.7620 | 0.4143 | 0.0091 |
| Tuned ridge | 16m | 0.3515 | 0.0027 | 0.3487 | 0.3543 | 0.3671 | 0.8296 | 0.4625 | 0.0156 |
| Tuned ridge | 64m | 0.3668 | 0.0010 | 0.3658 | 0.3678 | 0.3767 | 0.8571 | 0.4804 | 0.0099 |
| Tuned ridge | Exp. | 0.3602 | 0.0008 | 0.3593 | 0.3611 | 0.3644 | 0.7084 | 0.3440 | 0.0042 |
| XGBoost | 16m | 0.3316 | 0.0031 | 0.3284 | 0.3348 | 0.3621 | 0.7180 | 0.3559 | 0.0305 |
| XGBoost | 64m | 0.3419 | 0.0037 | 0.3380 | 0.3457 | 0.3619 | 0.7345 | 0.3725 | 0.0201 |
| XGBoost | Exp. | 0.3232 | 0.0029 | 0.3202 | 0.3262 | 0.3392 | 0.6439 | 0.3047 | 0.0160 |
| Small MLP | 16m | 0.2869 | 0.0027 | 0.2841 | 0.2898 | 0.3096 | 0.6003 | 0.2907 | 0.0227 |
| Small MLP | 64m | 0.3231 | 0.0018 | 0.3212 | 0.3251 | 0.3414 | 0.6778 | 0.3364 | 0.0183 |
| Small MLP | Exp. | 0.3301 | 0.0026 | 0.3274 | 0.3328 | 0.3423 | 0.6304 | 0.2881 | 0.0122 |
| Medium MLP | 16m | 0.2786 | 0.0028 | 0.2756 | 0.2816 | 0.3018 | 0.6012 | 0.2994 | 0.0232 |
| Medium MLP | 64m | 0.3189 | 0.0037 | 0.3151 | 0.3228 | 0.3383 | 0.6700 | 0.3317 | 0.0193 |
| Medium MLP | Exp. | 0.3270 | 0.0036 | 0.3232 | 0.3308 | 0.3425 | 0.6272 | 0.2847 | 0.0155 |
| Random forest | 16m | 0.3549 | 0.0033 | 0.3514 | 0.3583 | 0.3705 | 0.7320 | 0.3615 | 0.0156 |
| Random forest | 64m | 0.3374 | 0.0031 | 0.3341 | 0.3407 | 0.3494 | 0.7117 | 0.3623 | 0.0120 |
| Random forest | Exp. | 0.2953 | 0.0121 | 0.2826 | 0.3080 | 0.3079 | 0.6036 | 0.2957 | 0.0126 |
| Temporal, 20-day context | |||||||||
| Flattened ridge | 16m | 0.1397 | 0.0048 | 0.1346 | 0.1447 | 0.1915 | 0.5584 | 0.3669 | 0.0518 |
| Flattened ridge | 64m | -0.2128 | 0.0076 | -0.2208 | -0.2049 | -0.0139 | 0.8094 | 0.8233 | 0.1990 |
| Flattened ridge | Exp. | -1.1533 | 0.0323 | -1.1871 | -1.1194 | -0.3308 | 0.8015 | 1.1324 | 0.8225 |
| Flattened XGBoost | 16m | 0.3026 | 0.0033 | 0.2992 | 0.3061 | 0.3341 | 0.6053 | 0.2712 | 0.0315 |
| Flattened XGBoost | 64m | 0.3287 | 0.0027 | 0.3258 | 0.3315 | 0.3485 | 0.6602 | 0.3116 | 0.0198 |
| Flattened XGBoost | Exp. | 0.3208 | 0.0037 | 0.3170 | 0.3247 | 0.3379 | 0.6047 | 0.2668 | 0.0171 |
| Small flattened MLP | 16m | -0.0841 | 0.0081 | -0.0926 | -0.0756 | 0.0200 | 0.2220 | 0.2020 | 0.1041 |
| Small flattened MLP | 64m | 0.0574 | 0.0040 | 0.0532 | 0.0617 | 0.1544 | 0.4273 | 0.2729 | 0.0969 |
| Small flattened MLP | Exp. | 0.1623 | 0.0068 | 0.1552 | 0.1694 | 0.2485 | 0.5360 | 0.2875 | 0.0862 |
| Tuned flattened MLP | 16m | -0.0350 | 0.0199 | -0.0559 | -0.0141 | 0.0406 | 0.1764 | 0.1357 | 0.0756 |
| Tuned flattened MLP | 64m | 0.1160 | 0.0046 | 0.1112 | 0.1209 | 0.1715 | 0.3652 | 0.1937 | 0.0554 |
| Tuned flattened MLP | Exp. | 0.2066 | 0.0027 | 0.2038 | 0.2095 | 0.2607 | 0.5001 | 0.2394 | 0.0540 |
| Vanilla RNN | 16m | 0.2860 | 0.0025 | 0.2834 | 0.2887 | 0.3166 | 0.5951 | 0.2784 | 0.0306 |
| Vanilla RNN | 64m | 0.2987 | 0.0017 | 0.2970 | 0.3005 | 0.3166 | 0.6320 | 0.3154 | 0.0178 |
| Vanilla RNN | Exp. | 0.3184 | 0.0021 | 0.3161 | 0.3206 | 0.3315 | 0.6067 | 0.2752 | 0.0132 |
| LSTM | 16m | 0.2087 | 0.0026 | 0.2059 | 0.2114 | 0.2317 | 0.3958 | 0.1641 | 0.0230 |
| LSTM | 64m | 0.2491 | 0.0027 | 0.2463 | 0.2519 | 0.2673 | 0.5130 | 0.2457 | 0.0182 |
| LSTM | Exp. | 0.2905 | 0.0019 | 0.2886 | 0.2925 | 0.3071 | 0.5439 | 0.2368 | 0.0166 |
| Small Transformer | 16m | 0.2828 | 0.0037 | 0.2789 | 0.2866 | 0.3218 | 0.6275 | 0.3058 | 0.0390 |
| Small Transformer | 64m | 0.2995 | 0.0022 | 0.2972 | 0.3018 | 0.3191 | 0.6437 | 0.3247 | 0.0196 |
| Small Transformer | Exp. | 0.3193 | 0.0020 | 0.3172 | 0.3213 | 0.3361 | 0.6132 | 0.2772 | 0.0168 |
| Temporal, 60-day context | |||||||||
| Flattened ridge | 16m | 0.0772 | 0.0057 | 0.0712 | 0.0831 | 0.1092 | 0.2775 | 0.1684 | 0.0320 |
| Flattened ridge | 64m | 0.1078 | 0.0057 | 0.1018 | 0.1138 | 0.1654 | 0.5507 | 0.3853 | 0.0576 |
| Flattened ridge | Exp. | -0.2835 | 0.0106 | -0.2946 | -0.2724 | -0.0295 | 0.6561 | 0.6856 | 0.2541 |
| Flattened XGBoost | 16m | 0.2812 | 0.0031 | 0.2779 | 0.2845 | 0.3161 | 0.5640 | 0.2479 | 0.0350 |
| Flattened XGBoost | 64m | 0.3223 | 0.0033 | 0.3188 | 0.3257 | 0.3402 | 0.6283 | 0.2880 | 0.0180 |
| Flattened XGBoost | Exp. | 0.3148 | 0.0015 | 0.3132 | 0.3164 | 0.3253 | 0.5388 | 0.2135 | 0.0105 |
| Small flattened MLP | 16m | -0.8216 | 0.0599 | -0.8845 | -0.7588 | -0.3891 | 0.1340 | 0.5231 | 0.4325 |
| Small flattened MLP | 64m | -0.0124 | 0.0053 | -0.0180 | -0.0068 | 0.0765 | 0.2813 | 0.2048 | 0.0889 |
| Small flattened MLP | Exp. | 0.0881 | 0.0033 | 0.0846 | 0.0916 | 0.1690 | 0.4152 | 0.2462 | 0.0809 |
| Tuned flattened MLP | 16m | -0.2223 | 0.0119 | -0.2347 | -0.2098 | -0.0970 | 0.0760 | 0.1729 | 0.1253 |
| Model | Window | Mean | SD | CI low | CI high | Ensemble | 2ag | u | |
|---|---|---|---|---|---|---|---|---|---|
| Tuned flattened MLP | 64m | 0.0002 | 0.0035 | -0.0034 | 0.0039 | 0.0804 | 0.2552 | 0.1748 | 0.0802 |
| Tuned flattened MLP | Exp. | 0.1158 | 0.0036 | 0.1121 | 0.1196 | 0.1822 | 0.4150 | 0.2328 | 0.0663 |
| Vanilla RNN | 16m | 0.2776 | 0.0028 | 0.2747 | 0.2806 | 0.3123 | 0.5788 | 0.2665 | 0.0347 |
| Vanilla RNN | 64m | 0.2989 | 0.0019 | 0.2969 | 0.3009 | 0.3167 | 0.6275 | 0.3108 | 0.0178 |
| Vanilla RNN | Exp. | 0.3169 | 0.0024 | 0.3144 | 0.3194 | 0.3276 | 0.5841 | 0.2565 | 0.0107 |
| LSTM | 16m | 0.1913 | 0.0038 | 0.1873 | 0.1952 | 0.2153 | 0.3651 | 0.1498 | 0.0241 |
| LSTM | 64m | 0.2472 | 0.0016 | 0.2455 | 0.2489 | 0.2661 | 0.5065 | 0.2404 | 0.0189 |
| LSTM | Exp. | 0.2885 | 0.0009 | 0.2876 | 0.2895 | 0.3042 | 0.5301 | 0.2259 | 0.0156 |
| Small Transformer | 16m | 0.2712 | 0.0052 | 0.2658 | 0.2766 | 0.3191 | 0.6203 | 0.3011 | 0.0479 |
| Small Transformer | 64m | 0.2969 | 0.0007 | 0.2961 | 0.2976 | 0.3160 | 0.6315 | 0.3155 | 0.0191 |
| Small Transformer | Exp. | 0.3195 | 0.0016 | 0.3178 | 0.3212 | 0.3342 | 0.5948 | 0.2606 | 0.0147 |