The Foreign Exchange Rate Prediction Using Long-Short Term Memory

A Case Study in COVID-19 Pandemic

  • Hasna Haifa Zahrah Telkom University
  • Siti Sa’adah
  • Rita Rismala
Abstract views: 817 , pdf downloads: 596
Keywords: COVID-19, Foreign Exchange, Hyperparameter, Long-Short Term Memory, Prediction


The foreign exchange market is a global financial market that is influenced by economic, political, and psychological factors that are interconnected in complex ways. This complexity makes the foreign exchange market a difficult time-series prediction. At the end of 2019, the world was faced with the COVID-19 pandemic that has not only affected public health but also the foreign exchange market, which makes the trading behaviour affected. Long Short-Term Memory network (LSTM) is a type of recurrent neural network (RNN) that can solve long-term dependencies and is suitable to be a financial time-series model. This study implemented the LSTM model to predict the foreign exchange rate at a timeframe of 1 hour and daily in 2020 to get the best hyperparameter based on the RMSE evaluation results. Furthermore, with the obtained hyperparameters, the prediction result of 2020 was then compared with the 2018 and 2019 prediction results. The best RMSE result was obtained in 1-hour timeframe and when 2020’s RMSE result was compared to 2018’s and 2019’s RMSE result, the prediction of 2019 gave the best RMSE result. The LSTM model is able to achieve good results in the 2020 prediction, proven by the RMSE result which is 0.00135.


Download data is not yet available.


[1] S. Ranjit, S. Shrestha, S. Subedi, and S. Shakya, “Foreign Rate Exchange Prediction Using Neural Network and Sentiment Analysis,” Proc. - IEEE 2018 Int. Conf. Adv. Comput. Commun. Control Networking, ICACCCN 2018, no. Icacccn, pp. 1173–1177, 2018, doi: 10.1109/ICACCCN.2018.8748819.
[2] J. W. Goodell, “COVID-19 and finance: Agendas for future research,” Financ. Res. Lett., vol. 35, no. March, 2020, doi: 10.1016/
[3] B. Njindan Iyke, “The Disease Outbreak Channel of Exchange Rate Return Predictability: Evidence from COVID-19,” Emerg. Mark. Financ. Trade, vol. 56, no. 10, pp. 2277–2297, 2020, doi: 10.1080/1540496X.2020.1784718.
[4] F. Aslam, S. Aziz, D. K. Nguyen, K. S. Mughal, and M. Khan, “On the efficiency of foreign exchange markets in times of the COVID-19 pandemic,” Technol. Forecast. Soc. Change, vol. 161, no. June, p. 120261, 2020, doi: 10.1016/j.techfore.2020.120261.
[5] A. A. Philip, “Artificial Neural Network Model for Forecasting Foreign Exchange Rate,” vol. 1, no. 3, pp. 110–118, 2011.
[6] S. Zhelev and D. R. Avresky, “Using LSTM Neural Network for Time Series Predictions in Financial Markets,” 2019 IEEE 18th Int. Symp. Netw. Comput. Appl. NCA 2019, pp. 1–5, 2019, doi: 10.1109/NCA.2019.8935009.
[7] Y. C. Shiao, G. Chakraborty, S. F. Chen, L. Hua Li, and R. C. Chen, “Modeling and Prediction of Time-Series-A Case Study with Forex Data,” 2019 IEEE 10th Int. Conf. Aware. Sci. Technol. iCAST 2019 - Proc., pp. 1–5, 2019, doi: 10.1109/ICAwST.2019.8923188.
[8] K. Chen, Y. Zhou, and F. Dai, “A LSTM-based method for stock returns prediction: A case study of China stock market,” Proc. - 2015 IEEE Int. Conf. Big Data, IEEE Big Data 2015, pp. 2823–2824, 2015, doi: 10.1109/BigData.2015.7364089.
[9] J. Chung, C. Gulcehre, K. Cho, and Y. Bengio, “Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling,” Dec. 2014, Accessed: Nov. 28, 2020. [Online]. Available:
[10] Y. Bengio, P. Simard, and P. Frasconi, “Learning Long-Term Dependencies with Gradient Descent is Difficult,” IEEE Trans. Neural Networks, vol. 5, no. 2, pp. 157–166, 1994, doi: 10.1109/72.279181.
[11] S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Comput., vol. 9, no. 8, pp. 1735–1780, Nov. 1997, doi: 10.1162/neco.1997.9.8.1735.
[12] R. Dey and F. M. Salemt, “Gate-variants of Gated Recurrent Unit (GRU) neural networks,” in Midwest Symposium on Circuits and Systems, Sep. 2017, vol. 2017-August, pp. 1597–1600, doi: 10.1109/MWSCAS.2017.8053243.
[13] T. C. Fu, “A review on time series data mining,” Engineering Applications of Artificial Intelligence, vol. 24, no. 1. Elsevier Ltd, pp. 164–181, Feb. 01, 2011, doi: 10.1016/j.engappai.2010.09.007.
[14] “Forecasting: principles and practice - Rob J Hyndman, George Athanasopoulos - Google Books.”,+Forecasting :+Principles+and+Practice,+2nd+ed.+2018.&ots=Tie1vjTNMH&sig=ogwPnQKKJnzrbecXfk4-FgJOCg4&redir_esc=y#v=onepage&q=R. J. Hyndman and G. Athanasopoulos%2C Forecasting %3A Principles and Practice%2C 2nd ed. 2018.&f=false (accessed Dec. 18, 2020).
[15] D. P. Kingma and J. L. Ba, “Adam: A method for stochastic optimization,” Dec. 2015, Accessed: Nov. 28, 2020. [Online]. Available:
[16] S. Ruder, “Overview Optimization Gradients,” arXiv Prepr. arXiv1609.04747, pp. 1–14, 2017, [Online]. Available:
[17] “Dollar retreats as coronavirus fallout raises expectations of rate cut.” (accessed Dec. 16, 2020).
[18] “Euro falls after ECB holds fire, dollar jumps as spreads widen.” (accessed Dec. 16, 2020).
How to Cite
Haifa Zahrah, H., Sa’adahS., & Rismala , R. (2021). The Foreign Exchange Rate Prediction Using Long-Short Term Memory: A Case Study in COVID-19 Pandemic. International Journal on Information and Communication Technology (IJoICT), 6(2), 94-105.
Intelligence System