Source-linked AI summary
Titans-QFWP: A Regime-Aware Hybrid Quantum Fast Weight Programmer for Portfolio Optimization
Ming-Kai Hung, Jun-Hao Chen, Yun-Cheng Tsai, Samuel Yen-Chi Chen
TL;DR
The paper addresses adaptive portfolio optimization under nonstationary, high-dimensional market conditions. It combines quantum fast-weight programming with Titans-style memory and an enhanced A3C2 environment, then evaluates the resulting agent on 468 S&P 500 stocks under a parameter-matched benchmark. Titans-QFWP reports higher ARR and Calmar than the S&P 500 buy-and-hold benchmark, while ablations indicate that quantum gating changes the roles of the memory components.
Problem
Nonstationary markets and high-dimensional state spaces challenge traditional portfolio optimization and reinforcement-learning methods, while static clustering and fixed-parameter quantum circuits limit adaptation.
Method
Titans-QFWP integrates a Quantum Fast Weight Programmer with Persistence, Surprise, and Forgetting memory, enhanced A3C2 clustering, defensive cash allocation, and scaled log-return rewards.
Results
Titans-QFWP achieves ARR 0.4260 versus 0.2528 for S&P 500 Buy & Hold, Calmar 8.5504 versus 7.1638, and the highest IR at 0.8427 under the EPC benchmark.
Takeaways & Limitations
Quantum gating alters memory roles: Persistence is associated with drawdown control, Surprise with return generation, and Forgetting with additional stabilization.
Takeaways & Limitations
The evaluation is limited by survivorship bias, a short out-of-sample period, seed variability, simplified transaction costs, simulated quantum components, and descriptively reported risk metrics.
Abstract
from arXiv · showhide
We propose Titans-QFWP, a hybrid reinforcement learning architecture integrating a Quantum Fast Weight Programmer with Titans-style memory (Persistence, Surprise, and Forgetting) for adaptive portfolio optimization. To address high-dimensional market features, we introduce an enhanced A3C^2 framework with Hungarian-aligned K-means clustering and scaled log-return rewards. Evaluated on 468 S&P 500 stocks under an Equal-Parameter-Count (EPC) benchmark with approximately 3,000 trainable parameters, Titans-QFWP achieves strong performance (median ARR 0.4260, Calmar 8.5504, IR 0.8427). Ablation results reveal that quantum gating fundamentally reshapes memory component roles, with Persistence supporting drawdown control, Surprise contributing to return generation, and Forgetting providing additional stabilization. By stabilizing these quantum representations, the model enables defensive allocation during market drawdowns while preserving upside potential.
I. INTRODUCTION
Titans-QFWP addresses nonstationary, high-dimensional market states by combining quantum fast-weight programming and Titans-style memory with adaptive clustering in an enhanced reinforcement-learning environment.
- Motivation: Financial markets’ regime shifts and nonstationarity challenge traditional portfolio optimization, while deep reinforcement learning faces computational and high-dimensional-state burdens.Static clustering cannot capture abrupt market transitions, and fixed-parameter variational quantum circuits lack adaptability.
- Titans-QFWP Architecture: Titans-QFWP upgrades Q-A3C2 by replacing its variational quantum circuit with a Quantum Fast Weight Programmer integrated with Persistence, Surprise, and Forgetting memory.The architecture is designed for adaptive portfolio optimization under changing market conditions.
- Enhanced A3C2 Framework: The enhanced A3C2 environment adds Hungarian-aligned K-means clustering, a defensive cash action, and a scaled log-return reward.These changes target market-state representation and portfolio control within the reinforcement-learning environment.
- Temporal Alignment: The state construction uses exponentially smoothed Hungarian-matched centroids to reduce short-term noise while preserving temporal consistency.Centroid matching minimizes L2 drift before smoothing with EMA λ = 0.8.
B. Portfolio Construction and Reward Function
Portfolio construction begins from drifted prior weights, applies inverse-volatility target weighting or a cash action, and computes a transaction-cost-adjusted, scaled reward.
- Portfolio Drift: At each 20-day step, prior target weights are compounded with asset gross returns to calculate drifted portfolio weights.The gross return vector is derived from 20 days of daily log-returns, and element-wise multiplication updates the prior holdings.
- Target Allocation: New target weights follow an inverse-volatility strategy using the 60-day historical volatility vector.The target weights are normalized after applying inverse volatility to the drifted portfolio.
- Defensive Action: Choosing the cash action sets the target portfolio weights to zero.This provides a defensive allocation option within the portfolio simulation environment.
- Transaction Costs: Rebalancing incurs a cost rate c = 0.0015, producing a net survival fraction solved by successive substitution.The realized return combines the net survival fraction with the gross portfolio return.
- Reward Function: The reward floors net realized return at 10^-6 and scales it by 100 for stability.The scaling factor is treated as a hyperparameter.
C. Titans-QFWP Architecture and Optimization
The architecture compresses clustered market states, augments them with trainable fast-weight parameters, updates Titans-style memory through learned gates, and converts bounded memory into quantum policy features.
- State Encoding: Two tanh activations compress the 53-dimensional state into an 8-dimensional encoded vector, which attention augments using a trainable 8 × 4 matrix.Attention weights are produced by a softmax transformation of the encoded state.
- Quantum Fast-Weight Programming: A slow-program layer projects the augmented representation into a 23-dimensional vector before three softmax heads generate Pauli X, Y, and Z distributions.Their normalized outer product forms the Surprise Tensor.
- Titans-Style Memory: Learned sigmoid gates control memory retention, momentum, and surprise in the fast-weight update initialized from M0 = Θ0 = 0.These gates govern the evolution of Titans-style memory conditioned on the augmented input.
- Quantum Circuit: The raw memory is clamped to [−π, π] so it can parameterize rotation angles in the variational quantum circuit.The circuit begins from a uniform superposition and applies feature encoding, entanglement, and parameterized rotations.
- Policy and Value Outputs: Pauli-Z expectation values produce an 8-dimensional quantum feature vector that feeds ReLU actor and critic heads for cluster selection.Stocks within selected clusters are weighted by inverse volatility.
III. EXPERIMENTAL SETUP
The evaluation uses daily S&P 500 stock returns split into training, validation, and test periods, with all architectures constrained to approximately 3,000 trainable parameters.
- Dataset: The dataset contains 468 S&P 500 stocks after excluding assets with more than 10% missing observations.Daily log-returns span January 2015 through April 2026, and features use only information available at each time.
- Dataset Split: The data are divided into 2,262 training days, 252 validation days, and 332 test days.The training period ends in 2023, validation covers 2024, and testing begins in 2025.
- Benchmark Design: All 11 architectures are evaluated under an Equal-Parameter-Count benchmark of approximately 3,000 trainable parameters.Titans-QFWP is compared with its variants under this parameter-matched setup.
A. Overall Analysis
Under an Equal-Parameter-Count benchmark, Titans-QFWP is compared with the S&P 500 Buy & Hold across results summarized as medians and IQRs over 10 seeds.
- A. Overall Analysis: 10 random seeds are used, with results reported as median [IQR] in Table II.The benchmark comparison is the S&P 500 Buy & Hold.
- A. Overall Analysis: 0.4260 ARR and 8.5504 Calmar exceed the S&P 500 benchmark values of 0.2528 and 7.1638, respectively.Titans-QFWP also records the highest Information Ratio at 0.8427.
- A. Overall Analysis: −0.0353 MDD is lower for the market benchmark than for Titans-QFWP.The benchmark also has a higher Sortino Ratio of 8.5405, partly because transaction costs are excluded.
1) Classical Ablation (Titans-FWP):
Classical ablations show that Surprise is the most consequential memory component for return and risk-adjusted performance, while Forgetting is most consequential for drawdown.
- 1) Classical Ablation (Titans-FWP):: Removing Surprise produces the largest degradation in ARR, Sortino, Calmar, and IR.This pattern is reported for the classical variants in Table III.
- 1) Classical Ablation (Titans-FWP):: Removing Forgetting results in the largest deterioration in MDD.Removing Persistence causes smaller changes across most metrics.
2) Quantum Ablation (Titans-QFWP):
Quantum ablations associate Persistence with drawdown and risk-adjusted metrics, while Surprise is associated with return and information-ratio performance; portfolio behavior also varies across clusters and selected stocks.
- 2) Quantum Ablation (Titans-QFWP):: Removing Persistence causes the largest degradation in median MDD, Sortino, and Calmar among quantum variants.The pattern indicates a different memory-role distribution under quantum gating.
- 2) Quantum Ablation (Titans-QFWP):: Removing Surprise leads to the lowest median ARR and IR among quantum variants.Quantum gating is reported to alter the roles of the memory components.
- C. Portfolio Dynamics and Asset Selection: +30.33% cumulative return slightly exceeds the S&P 500's +28.46% in Fig. 2 Seed 1.The result is attributed to allocations to higher-return clusters such as Clusters 7 and 9.
- C. Portfolio Dynamics and Asset Selection: WDC and CIEN outperform the benchmark at every time step, reaching peak active returns of +42.7% and +51.6%.COHR, LITE, and MU also contribute substantial excess returns across the 10-seed average.
V. LIMITATIONS
The paper reports methodological and evaluation limitations, while its conclusion frames regime-aware allocation and quantum-classical memory as relevant to nonstationary markets.
- V. LIMITATIONS: Reported limitations include survivorship bias, a short out-of-sample period, seed variability, and simplified transaction costs.These constraints bound how broadly the reported portfolio results should be interpreted.
- V. LIMITATIONS: Quantum components are evaluated using lightning.qubit quantum simulation.This is a stated evaluation setting rather than hardware execution.
- V. LIMITATIONS: Risk-adjusted metrics are reported descriptively rather than as statistically conclusive evidence.The limitation is stated alongside the other evaluation constraints.
- VI. CONCLUSION: The conclusion states that regime-aware allocation transitions between defensive and high-performing asset clusters.It also identifies Persistence rather than Forgetting as more important for representation preservation and drawdown control under quantum gating.