Deep learning architectures, specifically Deep Momentum Networks (DMNs) [1904.04912], have been found to be an effective approach to momentum and mean-reversion trading. However, some of the key challenges in recent years involve learning long-term dependencies, degradation of performance when considering returns net of transaction costs and adapting to new market regimes, notably during the SARS-CoV-2 crisis. Attention mechanisms, or Transformer-based architectures, are a solution to such challenges because they allow the network to focus on significant time steps in the past and longer-term patterns. We introduce the Momentum Transformer, an attention-based architecture which outperforms the benchmarks, and is inherently interpretable, providing us with greater insights into our deep learning trading strategy. Our model is an extension to the LSTM-based DMN, which directly outputs position sizing by optimising the network on a risk-adjusted performance metric, such as Sharpe ratio. We find an attention-LSTM hybrid Decoder-Only Temporal Fusion Transformer (TFT) style architecture is the best performing model. In terms of interpretability, we observe remarkable structure in the attention patterns, with significant peaks of importance at momentum turning points. The time series is thus segmented into regimes and the model tends to focus on previous time-steps in alike regimes. We find changepoint detection (CPD) [2105.13727], another technique for responding to regime change, can complement multi-headed attention, especially when we run CPD at multiple timescales. Through the addition of an interpretable variable selection network, we observe how CPD helps our model to move away from trading predominantly on daily returns data. We note that the model can intelligently switch between, and blend, classical strategies - basing its decision on patterns in the data.
翻译:深层次学习架构,特别是深动力网络(DMN) [1904.04912],被认为是对势头和中值回流交易的一种有效方法。然而,近年来的一些主要挑战包括学习长期依赖性、在考虑交易成本回报净额和适应新市场制度时表现的退化,特别是在SARS-COV-2危机期间。关注机制或基于变压器的架构,是应对这些挑战的一种解决办法,因为这些机制使网络能够侧重于过去和较长期模式中的重要时间步骤。我们引入了动向变速变速器,这是一个基于注意的架构,它超越了基准,并且具有内在的解释性,为我们提供了对深层次学习交易战略的更深刻认识。我们的模型是扩展基于LSTM的DMNM,它通过优化网络网络以风险调整的性能衡量标准(如锐化比率) 。我们发现一个关注-LSTM的混合变速机制在以往和长期模式中变速,我们观察变速变速变速的风格结构是最佳的模型。在时间模型中,我们观察了变速模式中,我们是如何解读了变速数据,因此将数据转向了以往的。因此,我们观察了一个显著的变速数据结构在时间结构中,我们观察了一个显著的周期中,我们观察了一个显著的变速。