EXFormer: A Multi-Scale Trend-Aware Transformer with Dynamic Variable Selection for Foreign Exchange Returns Prediction
Dinggao Liu, Robert Ślepaczuk, Zhenpeng Tang
TL;DR
This paper tackles the longstanding difficulty of predicting daily foreign exchange returns by introducing EXFormer, a Transformer-based model that fuses multi-scale trend-aware self-attention, dynamic covariate weighting, and squeeze-and-excitation calibration. The encoder–decoder framework jointly models short-, medium-, and long-horizon patterns while adaptively weighting 28 exogenous covariates, delivering pre-hoc interpretability of drivers. Empirically, EXFormer significantly outperforms randomness benchmarks and a wide set of baselines across EUR/USD, USD/JPY, and GBP/USD, translating predictive gains into economically meaningful trading profits even after realistic frictions. The study also demonstrates regime-robust performance and provides insights into which global factors drive currency dynamics, bridging modern neural architectures with established international finance theories.
Abstract
Accurately forecasting daily exchange rate returns represents a longstanding challenge in international finance, as the exchange rate returns are driven by a multitude of correlated market factors and exhibit high-frequency fluctuations. This paper proposes EXFormer, a novel Transformer-based architecture specifically designed for forecasting the daily exchange rate returns. We introduce a multi-scale trend-aware self-attention mechanism that employs parallel convolutional branches with differing receptive fields to align observations on the basis of local slopes, preserving long-range dependencies while remaining sensitive to regime shifts. A dynamic variable selector assigns time-varying importance weights to 28 exogenous covariates related to exchange rate returns, providing pre-hoc interpretability. An embedded squeeze-and-excitation block recalibrates channel responses to emphasize informative features and depress noise in the forecasting. Using the daily data for EUR/USD, USD/JPY, and GBP/USD, we conduct out-of-sample evaluations across five different sliding windows. EXFormer consistently outperforms the random walk and other baselines, improving directional accuracy by a statistically significant margin of up to 8.5--22.8%. In nearly one year of trading backtests, the model converts these gains into cumulative returns of 18%, 25%, and 18% for the three pairs, with Sharpe ratios exceeding 1.8. When conservative transaction costs and slippage are accounted for, EXFormer retains cumulative returns of 7%, 19%, and 9%, while other baselines achieve negative. The robustness checks further confirm the model's superiority under high-volatility and bear-market regimes. EXFormer furnishes both economically valuable forecasts and transparent, time-varying insights into the drivers of exchange rate dynamics for international investors, corporations, and central bank practitioners.
