# Learning Multiple Stock Trading Patterns with Temporal Routing Adaptor and Optimal Transport

arXiv: https://arxiv.org/abs/2106.12950 · HTML: https://mlsanity.com/paper/2106.12950/

## Key facts

- Cited by 32 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 33 references that are in the map.
- First posted on arXiv 24 Jun 2021.

## Builds on (most cited first, 15 of 15)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Parameter-Efficient Transfer Learning for NLP](https://mlsanity.com/paper/1902.00751/) (2019)
- [Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer](https://mlsanity.com/paper/1701.06538/) (2017)
- [Categorical Reparameterization with Gumbel-Softmax](https://mlsanity.com/paper/1611.01144/) (2016)
- [Sinkhorn Distances: Lightspeed Computation of Optimal Transportation Distances](https://mlsanity.com/paper/1306.0895/) (2013)
- [Learning multiple visual domains with residual adapters](https://mlsanity.com/paper/1705.08045/) (2017)
- [A Dual-Stage Attention-Based Recurrent Neural Network for Time Series Prediction](https://mlsanity.com/paper/1704.02971/) (2017)
- [Efficient parametrization of multi-domain deep neural networks](https://mlsanity.com/paper/1803.10082/) (2018)
- [Conditional Channel Gated Networks for Task-Aware Continual Learning](https://mlsanity.com/paper/2004.00070/) (2020)
- [Learning to Branch for Multi-Task Learning](https://mlsanity.com/paper/2006.01895/) (2020)
- [Channel Gating Neural Networks](https://mlsanity.com/paper/1805.12549/) (2018)
- [Listening to Chaotic Whispers: A Deep Learning Framework for News-oriented Stock Trend Prediction](https://mlsanity.com/paper/1712.02136/) (2017)
- [Risk-Averse Trust Region Optimization for Reward-Volatility Reduction](https://mlsanity.com/paper/1912.03193/) (2019)
- [Depthwise Convolution is All You Need for Learning Multiple Visual Domains](https://mlsanity.com/paper/1902.00927/) (2019)
- [Uncertainty-Aware Lookahead Factor Models for Quantitative Investing](https://mlsanity.com/paper/2007.04082/) (2020)

## Built on by (most cited first, 30 of 32)

- [HIST: A Graph-based Framework for Stock Trend Forecasting via Mining Concept-Oriented Shared Information](https://mlsanity.com/paper/2110.13716/) (2021)
- [R&D-Agent-Quant: A Multi-Agent Framework for Data-Centric Factors and Model Joint Optimization](https://mlsanity.com/paper/2505.15155/) (2025)
- [AlphaAgent: LLM-Driven Alpha Mining with Regularized Exploration to Counteract Alpha Decay](https://mlsanity.com/paper/2502.16789/) (2025)
- [TimeBridge: Non-Stationarity Matters for Long-term Time Series Forecasting](https://mlsanity.com/paper/2410.04442/) (2024)
- [DoubleAdapt: A Meta-learning Approach to Incremental Learning for Stock Trend Forecasting](https://mlsanity.com/paper/2306.09862/) (2023)
- [LSR-IGRU: Stock Trend Prediction Based on Long Short-Term Relationships and Improved GRU](https://mlsanity.com/paper/2409.08282/) (2024)
- [Diffusion Variational Autoencoder for Tackling Stochasticity in Multi-Step Regression Stock Price Prediction](https://mlsanity.com/paper/2309.00073/) (2023)
- [DiffsFormer: A Diffusion Transformer on Stock Factor Augmentation](https://mlsanity.com/paper/2402.06656/) (2024)
- [Trade When Opportunity Comes: Price Movement Forecasting via Locality-Aware Attention and Iterative Refinement Labeling](https://mlsanity.com/paper/2107.11972/) (2021)
- [Deep Risk Model: A Deep Learning Solution for Mining Latent Risk Factors to Improve Covariance Matrix Estimation](https://mlsanity.com/paper/2107.05201/) (2021)
- [E2EAI: End-to-End Deep Learning Framework for Active Investing](https://mlsanity.com/paper/2305.16364/) (2023)
- [MCI-GRU: Stock Prediction Model Based on Multi-Head Cross-Attention and Improved GRU](https://mlsanity.com/paper/2410.20679/) (2024)
- [Learning Universal Multi-level Market Irrationality Factors to Improve Stock Return Forecasting](https://mlsanity.com/paper/2502.04737/) (2025)
- [CSPO: Cross-Market Synergistic Stock Price Movement Forecasting with Pseudo-volatility Optimization](https://mlsanity.com/paper/2503.22740/) (2025)
- [Expert Aggregation for Financial Forecasting](https://mlsanity.com/paper/2111.15365/) (2021)
- [FactorEngine: A Program-level Knowledge-Infused Factor Mining Framework for Quantitative Investment](https://mlsanity.com/paper/2603.16365/) (2026)
- [Factor Investing with a Deep Multi-Factor Model](https://mlsanity.com/paper/2210.12462/) (2022)
- [MOT: A Mixture of Actors Reinforcement Learning Method by Optimal Transport for Algorithmic Trading](https://mlsanity.com/paper/2407.01577/) (2024)
- [Quantitative Stock Investment by Routing Uncertainty-Aware Trading Experts: A Multi-Task Learning Approach](https://mlsanity.com/paper/2207.07578/) (2022)
- [Discovering Predictable Latent Factors for Time Series Forecasting](https://mlsanity.com/paper/2303.10426/) (2023)
- [Mitigating Distribution Shift in Stock Price Data via Return-Volatility Normalization for Accurate Prediction](https://mlsanity.com/paper/2508.20108/) (2025)
- [Integrating Inductive Biases in Transformers via Distillation for Financial Time Series Forecasting](https://mlsanity.com/paper/2603.16985/) (2026)
- [AlphaCrafter: Harnessing Multi-Agent Workflows for Cross-Sectional Quantitative Trading](https://mlsanity.com/paper/2605.05580/) (2026)
- [RAGIC: Risk-Aware Generative Adversarial Model for Stock Interval Construction](https://mlsanity.com/paper/2402.10760/) (2024)
- [GRU-PFG: Extract Inter-Stock Correlation from Stock Factors with Graph Neural Network](https://mlsanity.com/paper/2411.18997/) (2024)
- [Adapting to the Unknown: Robust Meta-Learning for Zero-Shot Financial Time Series Forecasting](https://mlsanity.com/paper/2504.09664/) (2025)
- [Cross-Modal Temporal Fusion for Financial Market Forecasting](https://mlsanity.com/paper/2504.13522/) (2025)
- [OTESGN: Optimal Transport-Enhanced Syntactic-Semantic Graph Networks for Aspect-Based Sentiment Analysis](https://mlsanity.com/paper/2509.08612/) (2025)
- [Momentum-integrated Multi-task Stock Recommendation with Converge-based Optimization](https://mlsanity.com/paper/2509.10461/) (2025)
- [RAVEN: A Regime-Aware Variable-context Expert Network for Financial Time Series Forecasting](https://mlsanity.com/paper/2606.24062/) (2026)

## Abstract (arXiv)

Successful quantitative investment usually relies on precise predictions of the future movement of the stock price. Recently, machine learning based solutions have shown their capacity to give more accurate stock prediction and become indispensable components in modern quantitative investment systems. However, the i.i.d. assumption behind existing methods is inconsistent with the existence of diverse trading patterns in the stock market, which inevitably limits their ability to achieve better stock prediction performance. In this paper, we propose a novel architecture, Temporal Routing Adaptor (TRA), to empower existing stock prediction models with the ability to model multiple stock trading patterns. Essentially, TRA is a lightweight module that consists of a set of independent predictors for learning multiple patterns as well as a router to dispatch samples to different predictors. Nevertheless, the lack of explicit pattern identifiers makes it quite challenging to train an effective TRA-based model. To tackle this challenge, we further design a learning algorithm based on Optimal Transport (OT) to obtain the optimal sample to predictor assignment and effectively optimize the router with such assignment through an auxiliary loss term. Experiments on the real-world stock ranking task show that compared to the state-of-the-art baselines, e.g., Attention LSTM and Transformer, the proposed method can improve information coefficient (IC) from 0.053 to 0.059 and 0.051 to 0.056 respectively. Our dataset and code used in this work are publicly available: https://github.com/microsoft/qlib/tree/main/examples/benchmarks/TRA.
