kieranjwood/trading-momentum-transformer
This code accompanies the the paper Trading with the Momentum Transformer: An Intelligent and Interpretable Architecture (https://arxiv.org/pdf/2112.08534.pdf).
Implements a Temporal Fusion Transformer (TFT) attention-LSTM hybrid architecture for futures trading, combining multi-headed attention for regime-aware learning with changepoint detection modules that enable the model to switch between momentum and mean-reversion strategies. Optimizes directly on risk-adjusted metrics (Sharpe ratio) and provides interpretability through attention weight visualization, revealing how the model focuses on momentum turning points and segments trading decisions by market regime. Trains on 600+ continuous futures contracts from Quandl, with optional online changepoint detection at multiple timescales to improve robustness during regime transitions.
603 stars. No commits in the last 6 months.
Stars
603
Forks
247
Language
Python
License
MIT
Category
Last pushed
Dec 10, 2023
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/kieranjwood/trading-momentum-transformer"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related frameworks
quantylab/rltrader
파이썬과 케라스를 이용한 딥러닝/강화학습 주식투자 - 퀀트 투자, 알고리즘 트레이딩을 위한 최첨단 해법 입문 (개정판)
erhardtconsulting/tensortrade-ng
TensorTrade-NG is an open source Python framework for building, training, evaluating, and...
matlab-deep-learning/reinforcement_learning_financial_trading
MATLAB example on how to use Reinforcement Learning for developing a financial trading model
LeonardoBerti00/DeepMarket
DeepMarket is a framework for performing Limit Order Book simulation with Deep Learning. This is...
TradeMaster-NTU/TradeMaster
TradeMaster is an open-source platform for quantitative trading empowered by reinforcement...