IDEAS home Printed from https://ideas.repec.org/a/gam/jjrfmx/v17y2024i8p332-d1447911.html
   My bibliography  Save this article

Prediction of Currency Exchange Rate Based on Transformers

Author

Listed:
  • Lu Zhao

    (School of Engineering, Computer and Mathematical Sciences, Auckland University of Technology, Auckland 1010, New Zealand)

  • Wei Qi Yan

    (School of Engineering, Computer and Mathematical Sciences, Auckland University of Technology, Auckland 1010, New Zealand)

Abstract

The currency exchange rate is a crucial link between all countries related to economic and trade activities. With increasing volatility, exchange rate fluctuations have become frequent under the combined effects of global economic uncertainty and political risks. Consequently, accurate exchange rate prediction is significant in managing financial risks and economic instability. In recent years, the Transformer models have attracted attention in the field of time series analysis. Transformer models, such as Informer and TFT (Temporal Fusion Transformer), have also been extensively studied. In this paper, we evaluate the performance of the Transformer, Informer, and TFT models based on four exchange rate datasets: NZD/USD, NZD/CNY, NZD/GBP, and NZD/AUD. The results indicate that the TFT model has achieved the highest accuracy in exchange rate prediction, with an R 2 value of up to 0.94 and the lowest RMSE and MAE errors. However, the Informer model offers faster training and convergence speeds than the TFT and Transformer, making it more efficient. Furthermore, our experiments on the TFT model demonstrate that integrating the VIX index can enhance the accuracy of exchange rate predictions.

Suggested Citation

  • Lu Zhao & Wei Qi Yan, 2024. "Prediction of Currency Exchange Rate Based on Transformers," JRFM, MDPI, vol. 17(8), pages 1-16, August.
  • Handle: RePEc:gam:jjrfmx:v:17:y:2024:i:8:p:332-:d:1447911
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1911-8074/17/8/332/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1911-8074/17/8/332/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Xu, Yang & Han, Liyan & Wan, Li & Yin, Libo, 2019. "Dynamic link between oil prices and exchange rates: A non-linear approach," Energy Economics, Elsevier, vol. 84(C).
    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. Hlongwane, Nyiko Worship, 2022. "The relationship between oil prices and exchange rates in South Africa," MPRA Paper 113209, University Library of Munich, Germany.
    2. Fasanya, Ismail O. & Adekoya, Oluwasegun B. & Adetokunbo, Abiodun M., 2021. "On the connection between oil and global foreign exchange markets: The role of economic policy uncertainty," Resources Policy, Elsevier, vol. 72(C).
    3. Liu, Yang & Wang, Jianda & Dong, Kangyin & Taghizadeh-Hesary, Farhad, 2023. "How does natural resource abundance affect green total factor productivity in the era of green finance? Global evidence," Resources Policy, Elsevier, vol. 81(C).
    4. Krzysztof Drachal & Michał Pawłowski, 2024. "Forecasting Selected Commodities’ Prices with the Bayesian Symbolic Regression," IJFS, MDPI, vol. 12(2), pages 1-56, March.
    5. Ahmad, Wasim & Prakash, Ravi & Uddin, Gazi Salah & Chahal, Rishman Jot Kaur & Rahman, Md. Lutfur & Dutta, Anupam, 2020. "On the intraday dynamics of oil price and exchange rate: What can we learn from China and India?," Energy Economics, Elsevier, vol. 91(C).
    6. Kumar, Pawan & Singh, Vipul Kumar, 2022. "Does crude oil fire the emerging markets currencies contagion spillover? A systemic perspective," Energy Economics, Elsevier, vol. 116(C).
    7. Lei Ming & Yao Shen & Shenggang Yang & Minyi Dong, 2022. "Contagion or flight‐to‐quality? The linkage between oil price and the US dollar based on the local Gaussian approach," Journal of Futures Markets, John Wiley & Sons, Ltd., vol. 42(4), pages 722-750, April.
    8. Zhang, Xiheng & Liu, Jiayu & Zhang, Kaiqi & Robert, James, 2023. "Analysis of firm performance in presence of oil price shocks: Importance of skilled management," Resources Policy, Elsevier, vol. 86(PA).
    9. Szafranek, Karol & Szafrański, Grzegorz & Leszczyńska-Paczesna, Agnieszka, 2024. "Inflation returns. Revisiting the role of external and domestic shocks with Bayesian structural VAR," International Review of Economics & Finance, Elsevier, vol. 93(PA), pages 789-810.
    10. Albulescu, Claudiu Tiberiu & Ajmi, Ahdi Noomen, 2021. "Oil price and US dollar exchange rate: Change detection of bi-directional causal impact," Energy Economics, Elsevier, vol. 100(C).
    11. Kumar, Suresh & Choudhary, Sangita & Singh, Gurcharan & Singhal, Shelly, 2021. "Crude oil, gold, natural gas, exchange rate and indian stock market: Evidence from the asymmetric nonlinear ARDL model," Resources Policy, Elsevier, vol. 73(C).
    12. Syeda Beena Zaidi & Abidullah Khan & Shabeer Khan & Mohd Ziaur Rehman & Wadi B. Alonazi & Abul Ala Noman, 2023. "Connectedness between Pakistan’s Stock Markets with Global Factors: An Application of Quantile VAR Network Model," Mathematics, MDPI, vol. 11(19), pages 1-17, October.
    13. Wen, Danyan & Liu, Li & Ma, Chaoqun & Wang, Yudong, 2020. "Extreme risk spillovers between crude oil prices and the U.S. exchange rate: Evidence from oil-exporting and oil-importing countries," Energy, Elsevier, vol. 212(C).
    14. Chowdhury, Kushal Banik & Garg, Bhavesh, 2022. "Has COVID-19 intensified the oil price–exchange rate nexus?," Economic Analysis and Policy, Elsevier, vol. 76(C), pages 280-298.
    15. Juan B'ogalo & Pilar Poncela & Eva Senra, 2020. "Understanding fluctuations through Multivariate Circulant Singular Spectrum Analysis," Papers 2007.07561, arXiv.org, revised Aug 2023.
    16. Jassim Aladwani, 2023. "Wavelet Coherence and Continuous Wavelet Transform - Implementation and Application to the Relationship between Exchange Rate and Oil Price for Importing and Exporting Countries," International Journal of Energy Economics and Policy, Econjournals, vol. 13(4), pages 531-541, July.
    17. Chatziantoniou, Ioannis & Elsayed, Ahmed H. & Gabauer, David & Gozgor, Giray, 2023. "Oil price shocks and exchange rate dynamics: Evidence from decomposed and partial connectedness measures for oil importing and exporting economies," Energy Economics, Elsevier, vol. 120(C).
    18. Rufei Zhang & Haizhen Zhang & Wang Gao & Ting Li & Shixiong Yang, 2022. "The Dynamic Effects of Oil Price Shocks on Exchange Rates—From a Time-Varying Perspective," Sustainability, MDPI, vol. 14(14), pages 1-20, July.
    19. Seyfettin Erdoğan & Nigar Demircan Çakar & Recep Ulucak & Danish & Yacouba Kassouri, 2021. "The role of natural resources abundance and dependence in achieving environmental sustainability: Evidence from resource‐based economies," Sustainable Development, John Wiley & Sons, Ltd., vol. 29(1), pages 143-154, January.
    20. James Ming Chen & Mobeen Ur Rehman, 2021. "A Pattern New in Every Moment: The Temporal Clustering of Markets for Crude Oil, Refined Fuels, and Other Commodities," Energies, MDPI, vol. 14(19), pages 1-58, September.

    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:gam:jjrfmx:v:17:y:2024:i:8:p:332-:d:1447911. 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: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    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.