Machine learning for markets
Transformers and temporal fusion
4 min
The transformer is the architecture behind the recent leap in AI, and it has been adapted for time-series forecasting. Understanding why it is interesting — and why it is not a silver bullet for markets — rounds out the deep-learning picture.
The core idea: attention
Where an LSTM processes a sequence step by step, a transformer uses attention: each position in the sequence can directly look at, and weight, every other position. The model learns which past moments matter for the current prediction, regardless of how far back they are. This sidesteps the long-memory struggle of recurrent networks and parallelises beautifully.
Temporal Fusion Transformers
The Temporal Fusion Transformer (TFT) is a design tailored to forecasting. Its appeal is partly interpretability: it can blend known-future inputs (calendar effects, scheduled events), static metadata (which asset) and observed history, while exposing which inputs the model leaned on. In a field where black boxes are dangerous, a model that can show its reasoning is valuable.
The reality check for markets
Transformers earned their fame on language, where there is effectively unlimited high-quality data and a stable underlying structure. Financial markets offer neither:
- Scarce, non-stationary data — the very conditions transformers are worst suited to. Their hunger for data is even greater than other deep nets.
- Low signal-to-noise — most price movement is irrelevant noise, and attention can just as easily latch onto spurious patterns.
Transformers and TFTs are a legitimate and active research direction, and they can add value in execution, multi-asset forecasting and blending heterogeneous inputs. But the newest, most powerful architecture does not overcome the fundamental problem: markets are noisy, adaptive and short on data. More sophisticated models overfit in more sophisticated ways. Sophistication is not a substitute for the validation discipline in the final chapter.
This content is for educational and informational purposes only and is not investment, financial, tax or legal advice. Trading and investing carry risk, including the possible loss of capital. Any performance shown by third-party tools is hypothetical and not a promise of future results. Do your own research and consider professional advice before making any decision.