Trading with the Momentum Transformer: An Intelligent and Interpretable Architecture
Trading with the Momentum Transformer: An Intelligent and Interpretable Architecture
The paper introduces the Momentum Transformer, a deep-learning architecture for time-series momentum trading that combines LSTM layers for local processing with multi-head self-attention for long-term dependencies. Unlike standard LSTM-based Deep Momentum Networks (DMNs), which struggle with regime changes and long-term patterns, the attention mechanism provides direct connections to all previous time-steps, enabling the model to learn longer-term dependencies and adapt to new market regimes. The architecture also includes a Variable Selection Network (VSN) that filters out noisy inputs and provides interpretable variable importance over time.
Backtesting on a portfolio of 50 liquid futures from 1990–2020 shows that the Momentum Transformer significantly outperforms classical TSMOM strategies and LSTM-based DMNs across multiple risk-adjusted metrics, including Sharpe, Sortino, and Calmar ratios. The improvement is especially pronounced during periods of high nonstationarity, such as 2015–2020 and the SARS-CoV-2 crisis. The addition of a changepoint detection (CPD) module further enhances performance, demonstrating that attention and CPD are complementary. The model's interpretability is highlighted through attention patterns that reveal which past time-steps and factors are most important, providing insights into the trading strategy's decision-making process.
Highlights
- 1Introduces the Momentum Transformer, an attention-LSTM hybrid architecture for time-series momentum trading that outperforms LSTM-based and classical strategies.
- 2Demonstrates that multi-head attention captures concurrent regimes at different timescales, improving performance net of transaction costs and adapting to market crises like SARS-CoV-2.
- 3Provides inherent interpretability via variable selection and attention patterns, revealing the importance of factors and past time-steps.
- 4Shows that combining attention with changepoint detection (CPD) yields complementary benefits, further enhancing risk-adjusted returns.
Methods
- MAttention-LSTM hybrid architecture (Decoder-Only TFT) with multi-head self-attention and variable selection network.
- MTraining via mini-batch SGD to directly maximize Sharpe ratio (risk-adjusted return).
- MVolatility scaling and portfolio construction typical of CTA/TSMOM strategies.
- MOptional changepoint detection (CPD) module using Bayesian Gaussian process region switching.
Results
- RMomentum Transformer achieves Sharpe ratio of 2.54 (1995–2020) and 1.71 (2015–2020), outperforming LSTM (1.70 and 0.82) by 50% and 109% respectively.
- RAdding CPD further improves Sharpe to 2.62 (1995–2020) and 2.00 (2015–2020).
- RDuring SARS-CoV-2 crisis, Transformer-based models (e.g., Decoder-Only Transformer Sharpe 3.01) significantly outperform LSTM (Sharpe -1.50).
- RAttention patterns show the model focuses on similar past regimes and momentum turning points, providing interpretability.
Analyze Paper
Generate insights from "Trading with the Momentum Transformer: An Intelligent and In...".