10sun / slow-momentum-fast-reversion

This code accompanies the the paper Slow Momentum with Fast Reversion: A Trading Strategy Using Deep Learning and Changepoint Detection (https://arxiv.org/pdf/2105.13727.pdf).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slow Momentum with Fast Reversion

Note: Currently porting code and cleaning it up - this is still a work in progress!

About

This code accompanies the the paper Slow Momentum with Fast Reversion: A Trading Strategy Using Deep Learning and Changepoint Detection.

Momentum strategies are an important part of alternative investments and are at the heart of commodity trading advisors (CTAs). These strategies have however been found to have difficulties adjusting to rapid changes in market conditions, such as during the 2020 market crash. In particular, immediately after momentum turning points, where a trend reverses from an uptrend (downtrend) to a downtrend (uptrend), time-series momentum (TSMOM) strategies are prone to making bad bets. To improve the response to regime change, we introduce a novel approach, where we insert an online change-point detection (CPD) module into a Deep Momentum Network (DMN) [1904.04912] pipeline, which uses an LSTM deep-learning architecture to simultaneously learn both trend estimation and position sizing. Furthermore, our model is able to optimise the way in which it balances 1) a slow momentum strategy which exploits persisting trends, but does not overreact to localised price moves, and 2) a fast mean-reversion strategy regime by quickly flipping its position, then swapping it back again to exploit localised price moves. Our CPD module outputs a changepoint location and severity score, allowing our model to learn to respond to varying degrees of disequilibrium, or smaller and more localised changepoints, in a data driven manner. Using a portfolio of 50, liquid, continuous futures contracts over the period 1990-2020, the addition of the CPD module leads to an improvement in Sharpe ratio of one-third. Even more notably, this module is especially beneficial in periods of significant nonstationarity, and in particular, over the most recent years tested (2015-2020) the performance boost is approximately two-thirds. This is especially interesting as traditional momentum strategies have been underperforming in this period.

Please cite our paper with:

@article{wood2021slow,
    title={Slow Momentum with Fast Reversion: A Trading Strategy Using Deep Learning and Changepoint Detection},
    author={Wood, Kieran and Roberts, Stephen and Zohren, Stefan},
    journal={arXiv preprint arXiv:2105.13727},
    year={2021}
}

Currently Implemented

  • CPD Module (this version still requires testing)
  • Deep Momentum Network

About

This code accompanies the the paper Slow Momentum with Fast Reversion: A Trading Strategy Using Deep Learning and Changepoint Detection (https://arxiv.org/pdf/2105.13727.pdf).

License:MIT License


Languages

Language:Python 100.0%