IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2512.12727.html

EXFormer: A Multi-Scale Trend-Aware Transformer with Dynamic Variable Selection for Foreign Exchange Returns Prediction

Author

Listed:
  • Dinggao Liu
  • Robert 'Slepaczuk
  • Zhenpeng Tang

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.

Suggested Citation

  • Dinggao Liu & Robert 'Slepaczuk & Zhenpeng Tang, 2025. "EXFormer: A Multi-Scale Trend-Aware Transformer with Dynamic Variable Selection for Foreign Exchange Returns Prediction," Papers 2512.12727, arXiv.org, revised Jan 2026.
  • Handle: RePEc:arx:papers:2512.12727
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2512.12727
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Mohammad Zoynul Abedin & Mahmudul Hasan Moon & M. Kabir Hassan & Petr Hajek, 2025. "Deep learning-based exchange rate prediction during the COVID-19 pandemic," Annals of Operations Research, Springer, vol. 345(2), pages 1335-1386, February.
    2. Nelson Camanho & Harald Hau & Hélène Rey, 2022. "Global Portfolio Rebalancing and Exchange Rates," The Review of Financial Studies, Society for Financial Studies, vol. 35(11), pages 5228-5274.
    3. Philippe Mueller & Alireza Tahbaz-Salehi & Andrea Vedolin, 2017. "Exchange Rates and Monetary Policy Uncertainty," Journal of Finance, American Finance Association, vol. 72(3), pages 1213-1252, June.
    4. Davood Pirayesh Neghab & Mucahit Cevik & M. I. M. Wahab & Ayse Basar, 2025. "Explaining Exchange Rate Forecasts with Macroeconomic Fundamentals Using Interpretive Machine Learning," Computational Economics, Springer;Society for Computational Economics, vol. 65(4), pages 1857-1899, April.
    5. Forbes, Kristin & Hjortsoe, Ida & Nenova, Tsvetelina, 2018. "The shocks matter: Improving our estimates of exchange rate pass-through," Journal of International Economics, Elsevier, vol. 114(C), pages 255-275.
    6. Shihao Gu & Bryan Kelly & Dacheng Xiu, 2020. "Empirical Asset Pricing via Machine Learning," Review of Finance, European Finance Association, vol. 33(5), pages 2223-2273.
    7. Cheung, Yin-Wong & Chinn, Menzie D. & Pascual, Antonio Garcia, 2005. "Empirical exchange rate models of the nineties: Are any fit to survive?," Journal of International Money and Finance, Elsevier, vol. 24(7), pages 1150-1175, November.
    8. Yun Zhou & Xuxu Zhu, 2025. "Forecasting USD/RMB exchange rate using the ICEEMDAN‐CNN‐LSTM model," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 44(1), pages 200-215, January.
    9. Siran Fang & Yunjie Wei & Shouyang Wang, 2024. "30 years of exchange rate analysis and forecasting: A bibliometric review," Journal of Economic Surveys, Wiley Blackwell, vol. 38(3), pages 973-1007, July.
    10. Barbara Rossi, 2013. "Exchange Rate Predictability," Journal of Economic Literature, American Economic Association, vol. 51(4), pages 1063-1119, December.
    11. Vasilios Plakandaras & Theophilos Papadimitriou & Periklis Gogas, 2015. "Forecasting Daily and Monthly Exchange Rates with Machine Learning Techniques," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 34(7), pages 560-573, November.
    12. Levent Bulut, 2018. "Google Trends and the forecasting performance of exchange rate models," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 37(3), pages 303-315, April.
    13. Akram Shavkatovich Hasanov & Robert Brooks & Sirojiddin Abrorov & Aktam Usmanovich Burkhanov, 2024. "Structural breaks and GARCH models of exchange rate volatility: Re‐examination and extension," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 39(7), pages 1403-1407, November.
    14. Leland Bybee & Bryan Kelly & Yinan Su & Tarun Ramadorai, 2023. "Narrative Asset Pricing: Interpretable Systematic Risk Factors from News Text," The Review of Financial Studies, Society for Financial Studies, vol. 36(12), pages 4759-4787.
    15. Shihao Gu & Bryan Kelly & Dacheng Xiu, 2020. "Empirical Asset Pricing via Machine Learning," The Review of Financial Studies, Society for Financial Studies, vol. 33(5), pages 2223-2273.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Petropoulos, Fotios & Apiletti, Daniele & Assimakopoulos, Vassilios & Babai, Mohamed Zied & Barrow, Devon K. & Ben Taieb, Souhaib & Bergmeir, Christoph & Bessa, Ricardo J. & Bijak, Jakub & Boylan, Joh, 2022. "Forecasting: theory and practice," International Journal of Forecasting, Elsevier, vol. 38(3), pages 705-871.
      • Fotios Petropoulos & Daniele Apiletti & Vassilios Assimakopoulos & Mohamed Zied Babai & Devon K. Barrow & Souhaib Ben Taieb & Christoph Bergmeir & Ricardo J. Bessa & Jakub Bijak & John E. Boylan & Jet, 2020. "Forecasting: theory and practice," Papers 2012.03854, arXiv.org, revised Jan 2022.
    2. Uluc Aysun & Melanie Guldi, 2026. "Revisiting exchange rate predictability: Can machine learning with theoretical filtering outperform canonical models?," Working Papers 2026-01, University of Central Florida, Department of Economics.
    3. Linying Lv, 2025. "Do Sell-side Analyst Reports Have Investment Value?," Papers 2502.20489, arXiv.org, revised Aug 2025.
    4. Amat, Christophe & Michalski, Tomasz & Stoltz, Gilles, 2018. "Fundamentals and exchange rate forecastability with simple machine learning methods," Journal of International Money and Finance, Elsevier, vol. 88(C), pages 1-24.
    5. Hsu, Po-Hsuan & Taylor, Mark P. & Wang, Zigan & Xu, Qi, 2022. "Currency volatility and global technological innovation," Journal of International Economics, Elsevier, vol. 137(C).
    6. Martin McCarthy & Stephen Snudden, 2025. "Forecasts of Period-average Exchange Rates: Insights from Real-time Daily Data," RBA Research Discussion Papers rdp2025-09, Reserve Bank of Australia.
    7. Biswas, Rita & Li, Xiao & Piccotti, Louis R., 2023. "Do macroeconomic variables drive exchange rates independently?," Finance Research Letters, Elsevier, vol. 52(C).
    8. Angelidis, Timotheos & Sakkas, Athanasios & Tessaromatis, Nikolaos, 2025. "Predicting commodity returns: Time series vs. cross sectional prediction models," Journal of Commodity Markets, Elsevier, vol. 38(C).
    9. Beckmann, Joscha & Kerkemeier, Marco & Kruse-Becher, Robinson, 2025. "Regime-specific exchange rate predictability," Journal of Economic Dynamics and Control, Elsevier, vol. 176(C).
    10. Kovvuri, Veera Raghava Reddy & Fu, Hsuan & Fan, Xiuyi & Seisenberger, Monika, 2023. "Fund performance evaluation with explainable artificial intelligence," Finance Research Letters, Elsevier, vol. 58(PB).
    11. Paresh Date & Janeeta Maunthrooa, 2025. "Modelling and Forecasting of Exchange Rate Pairs Using the Kalman Filter," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 44(2), pages 606-622, March.
    12. Matteo Aquilina & Douglas Kiarelly Godoy de Araujo & Gaston Gelos & Taejin Park & Fernando Perez-Cruz, 2025. "Harnessing artificial intelligence for monitoring financial markets," BIS Working Papers 1291, Bank for International Settlements.
    13. Ismailov, Adilzhan & Rossi, Barbara, 2018. "Uncertainty and deviations from uncovered interest rate parity," Journal of International Money and Finance, Elsevier, vol. 88(C), pages 242-259.
    14. Martin McCarthy, Stephen Snudden, 2024. "Forecasts of Period-Average Exchange Rates: New Insights from Real-Time Daily Data," LCERPA Working Papers jc0148, Laurier Centre for Economic Research and Policy Analysis, revised Oct 2024.
    15. Mohammad Abdullah & Mohammad Ashraful Ferdous Chowdhury & Ajim Uddin & Syed Moudud‐Ul‐Huq, 2023. "Forecasting nonperforming loans using machine learning," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 42(7), pages 1664-1689, November.
    16. Changeun Kim & Younwoo Jeong & Bong-Gyu Jang, 2025. "Interpretable Deep Learning for Stock Returns: A Consensus-Bottleneck Asset Pricing Model," Papers 2512.16251, arXiv.org, revised Apr 2026.
    17. Gürkaynak, Refet S. & Kısacıkoğlu, Burçin & Lee, Sang Seok, 2022. "Exchange rate and inflation under weak monetary policy: Turkey verifies theory," CFS Working Paper Series 679, Center for Financial Studies (CFS).
    18. Semenov, Andrei, 2024. "Overreaction and underreaction to new information and the directional forecast of exchange rates," International Review of Economics & Finance, Elsevier, vol. 96(PC).
    19. Michalski, Lachlan & Low, Rand Kwong Yew, 2024. "Determinants of corporate credit ratings: Does ESG matter?," International Review of Financial Analysis, Elsevier, vol. 94(C).
    20. Ylinen, Mika & Ranta, Mikko, 2025. "Predicting corporate innovation using machine learning and social media data," Technovation, Elsevier, vol. 148(C).

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2512.12727. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.