WATTNet: Learning to Trade FX via Hierarchical Spatio-Temporal Representation of Highly Multivariate Time Series

IJCAI 2020

TL;DR

This paper introduces WATTNet, a novel deep learning architecture for learning optimal trading strategies in the complex Non-Deliverable Forward (NDF) foreign exchange market. By leveraging a new, comprehensive NDF dataset and a hierarchical spatio-temporal modeling approach, WATTNet significantly outperforms existing methods in predicting profitable trading tenors.

What Problem Does This Paper Address?

The financial world, particularly foreign exchange (FX) trading, presents significant challenges for deep learning models due to low signal-to-noise ratios, non-stationarity, and partial observability. The Non-Deliverable Forward (NDF) market, a specific type of FX derivative, adds further complexity by requiring long-term planning for contract duration (tenor) selection. This paper tackles the problem of automatically learning an optimal tenor selection strategy for NDFs, a task that traditionally relies on expert knowledge and is difficult to model due to the highly multivariate and temporal nature of the data. Existing deep learning approaches often struggle with capturing inter-dependencies across multiple time series and are ill-suited for the high dimensionality of financial data.

Methods

The core contribution is the WaveATTentionNet (WATTNet) model, a novel Temporal Convolutional Network (TCN) architecture designed for spatio-temporal modeling of highly multivariate time series. WATTNet combines:

  • Temporal Modules: Utilizes dilated convolutions (similar to WaveNet) to capture autoregressive effects within individual time series.
  • Spatial Modules: Employs self-attention mechanisms to aggregate information across different time series at a given time step, allowing for the learning of inter-time series interactions.

These temporal and spatial modules are alternated in a hierarchical manner, forming WATTBlocks, which are stacked to build a deep representation. The model is trained using an imitation learning framework, where it learns from expert trading trajectories derived from historical NDF data.

Datasets

The paper introduces a newly curated NDF dataset derived from the Depository Trust & Clearing Corporation (DTCC) database. This dataset includes:

  • Spot rates for 64 FX currency pairs.
  • Technical indicators.
  • Hourly frequency NDF contract trade data (volumes and dates) spanning from 2013 to 2019.

This dataset is used to train and evaluate WATTNet, as well as classical and recurrent baselines. The authors also define "Expert" and "Expert oracle" benchmarks derived from this data to contextualize performance.

Key Insights and Ideas

  • Hierarchical Spatio-Temporal Modeling is Crucial: The success of WATTNet highlights the importance of jointly modeling temporal dependencies within individual time series and spatial dependencies (interactions) across multiple time series.
  • Self-Attention for Inter-Time Series Interaction: The use of self-attention in the spatial modules is key to effectively capturing how different FX markets influence each other, a critical aspect often missed by univariate models.
  • Imitation Learning from Expert Data: Learning directly from historical expert trades provides a robust way to distill complex trading strategies, especially when explicit reward signals are hard to define.
  • Data-Driven Tenor Selection: The approach moves beyond hand-crafted rules by learning to balance the risk-return trade-off inherent in selecting NDF contract tenors.
  • Explainability Matters: The paper emphasizes the need for understanding why a model makes certain trading decisions, proposing methods to verify noise robustness and identify driving factors.

Key Results

WATTNet achieved significant positive returns on investment (ROI) across multiple NDF markets, outperforming classical baselines (Momentum-1, Momentum-90) and recurrent baselines (GRU, LSTM) by a wide margin. For example, in the USDCNY market, WATTNet achieved a 219.1% ROI compared to 74.3% for LSTM-I and 0.0% for the Expert baseline. The model also demonstrated superior "optimal accuracy" (correctly predicting the best tenor) and "non-negative return accuracy." Qualitative analysis using UMAP embeddings suggests WATTNet learns a more coherent and robust latent representation compared to LSTMs.

Limitations and Future Work

  • Human Bias in Expert Data: While learning from expert data is beneficial, it may also inherit human biases. The authors acknowledge this potential limitation.
  • Computational Cost: While WATTNet is designed to be computationally efficient, training deep spatio-temporal models on high-dimensional data can still be resource-intensive.
  • Future Work: The authors suggest extending the model to incorporate additional input features, explore different attention mechanisms, and further investigate explainability techniques. The newly released dataset is also intended to foster further research in this area.

Summary updated

BibTeX
@inproceedings{2020wattnet,
  title = {{WATTNet: Learning to Trade FX via Hierarchical Spatio-Temporal Representation of Highly Multivariate Time Series}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2020},
}
Figure