Forex market forecasting with two-layer stacked Long Short-Term Memory neural network (LSTM) and correlation analysis

Michael Ayitey1, Peter Appiahene1, Obed Appiah1
1Department of Computer Science and Informatics, School of Sciences, University of Energy and Natural Resources, Sunyani, Ghana

Tóm tắt

AbstractSince it is one of the world's most significant financial markets, the foreign exchange (Forex) market has attracted a large number of investors. Accurately anticipating the forex trend has remained a popular but difficult issue to aid Forex traders' trading decisions. It is always a question of how precise a Forex prediction can be because of the market's tremendous complexity. The fast advancement of machine learning in recent decades has allowed artificial neural networks to be effectively adapted to several areas, including the Forex market. As a result, a slew of research articles aimed at improving the accuracy of currency forecasting has been released. The Long Short-Term Memory (LSTM) neural network, which is a special kind of artificial neural network developed exclusively for time series data analysis, is frequently used. Due to its high learning capacity, the LSTM neural network is increasingly being utilized to predict advanced Forex trading based on previous data. This model, on the other hand, can be improved by stacking it. The goal of this study is to choose a dataset using the Hurst exponent, then use a two-layer stacked Long Short-Term Memory (TLS-LSTM) neural network to forecast the trend and conduct a correlation analysis. The Hurst exponent (h) was used to determine the predictability of the Australian Dollar and United States Dollar (AUD/USD) dataset. TLS-LSTM algorithm is presented to improve the accuracy of Forex trend prediction of Australian Dollar and United States Dollar (AUD/USD). A correlation study was performed between the AUD/USD, the Euro and the Australian Dollar (EUR/AUD), and the Australian Dollar and the Japanese Yen (AUD/JPY) to see how AUD/USD movement affects EUR/AUD and AUD/JPY. The model was compared with Single-Layer Long Short-Term (SL-LSTM), Multilayer Perceptron (MLP), and Complete Ensemble Empirical Mode Decomposition with Adaptive Noise–Improved Firefly Algorithm Long Short-Term Memory. Based on the evaluation metrics Mean Square Error (MSE), Root Mean Square Error, and Mean Absolute Error, the suggested TLS-LSTM, whose data selection is based on the Hurst exponent (h) value of 0.6026, outperforms SL-LSTM, MLP, and CEEMDAN-IFALSTM. The correlation analysis conducted shows both positive and negative relations between AUD/USD, EUR/AUD, and AUD/JPY which means that a change in AUD/USD will affect EUR/AUD and AUD/JPY as recorded depending on the magnitude of the correlation coefficient (r).

Từ khóa


Tài liệu tham khảo

Ahmed S, Hassan SU, Aljohani NR, Nawaz R (2020) FLF-LSTM: a novel prediction system using Forex Loss Function. Appl Soft Comput J 97:106780. https://doi.org/10.1016/j.asoc.2020.106780

Alameer Z, Elaziz MA, Ewees AA, Ye H, Jianhua Z (2019) Forecasting gold price fluctuations using improved multilayer perceptron neural network and whale optimization algorithm. Resour Policy 61(January):250–260. https://doi.org/10.1016/j.resourpol.2019.02.014

Aryal S, Nadarajah D, Kasthurirathna D, Rupasinghe L, Jayawardena C (2019) Comparative analysis of the application of Deep Learning techniques for Forex Rate prediction 329(1):329–333

Baasher AA, Fakhr MW (2011) Forex trend classification using machine learning techniques. In: Proceedings of the 11th WSEAS international conference on applied computer science, January 2011, pp 41–47. http://www.wseas.us/e-library/conferences/2011/Penang/ACRE/ACRE-05.pdf

Batista GEAPA, Monard MC (2003) An analysis of four missing data treatment methods for supervised learning. Appl Artif Intell 17(5–6):519–533. https://doi.org/10.1080/713827181

BIS (2019) Foreign exchange turnover in April 2019: preliminary global result. Triennial Central Bank Survey, September, 24. https://www.bis.org/statistics/rpfx19_fx.pdf

Cao W, Zhu W, Wang W, Demazeau Y, Zhang C (2020) A deep coupled LSTM approach for USD/CNY exchange rate forecasting. IEEE Intell Syst 35(2):43–53. https://doi.org/10.1109/MIS.2020.2977283

Contreras AV, Llanes A, Pérez-Bernabeu A, Navarro S, Pérez-Sánchez H, López-Espín JJ, Cecilia JM (2018) ENMX: an elastic network model to predict the FOREX market evolution. Simul Model Pract Theory 86:1–10. https://doi.org/10.1016/j.simpat.2018.04.008

Czarnowski I, Caballero AM, Howlett RJ, Jain LC (2016) Preface. Smart Innov Syst Technol 56:v. https://doi.org/10.1007/978-3-319-39627-9

D’Lima N, Khan SS (2015a) FOREX rate prediction using a Hybrid System. 3:4–8

Dautel AJ, Härdle WK, Lessmann S, Seow H-V (2020) Forex exchange rate forecasting using deep recurrent neural networks. Digital Finance 2(1–2):69–96. https://doi.org/10.1007/s42521-020-00019-x

Ding L (2009) BID-ask spread and order size in the foreign exchange market: An empirical investigation. Int Rev Econ Finance 14(1):98–105. https://doi.org/10.1002/ijfe.365

Dobrovolny M, Soukal I, Lim KC, Selamat A, Krejcar O (2020) Forecasting of FOREX price trend using recurrent neural network - long short-term memory. Proc Int Sci Conf Hradec Econ Days 2020 10:95–103. https://doi.org/10.36689/uhk/hed/2020-01-011

Escudero P, Alcocer W, Paredes J (2021) Recurrent neural networks and ARIMA models for euro/dollar exchange rate forecasting. Appl Sci (Switzerland) 11(12):1. https://doi.org/10.3390/app11125658

Galeshchuk S (2017) Deep networks for predicting direction of change in foreign exchange rates. April 2016. https://doi.org/10.1002/isaf.1404

Galeshchuk S, Mukherjee S (2017) Deep learning for predictions in emerging currency markets. In: ICAART 2017 - Proceedings of the 9th International Conference on Agents and Artificial Intelligence 2:681–686. https://doi.org/10.5220/0006250506810686

Geromichalos A, Jung KM (2018) An over-the-counter approach to the forex market. Int Econ Rev 59(2):859–905. https://doi.org/10.1111/iere.12290

Gonz C, Herman M (2018) Foreign exchange forecasting via machine learning

Handayani I, Rahardja U, Febriyanto E, Yulius H, Aini Q (2019) Longer time frame concept for foreign exchange trading indicator using matrix correlation technique. In: Proceedings of 2019 4th international conference on informatics and computing, ICIC 2019. https://doi.org/10.1109/ICIC47613.2019.8985709

Jung G, Choi S (2021) Autoencoder-LSTM Techniques

Hurst T, Hurst HE, Otto L (2010) Hurst exponent Generalized exponent, pp 4–5

Kondratenko VV, Kuperin YA (2003) Using Recurrent Neural Networks To Forecasting of Forex. http://arxiv.org/abs/cond-mat/0304469

Kumar K, Haider MTU (2021) Enhanced prediction of intra-day stock market using metaheuristic optimization on RNN–LSTM network. In: New Generation Computing (vol 39, Issue 1). Ohmsha. https://doi.org/10.1007/s00354-020-00104-0

Lee CI, Chang CH, Hwang FN (2019) Currency exchange rate prediction with long short-term memory networks based on attention and news sentiment analysis. In: Proceedings - 2019 international conference on technologies and applications of artificial intelligence, TAAI 2019, March. https://doi.org/10.1109/TAAI48200.2019.8959884

Lee Rodgers J, Wander AN (1988) Thirteen ways to look at the correlation coefficient. Am Stat 42(1):59–66. https://doi.org/10.1080/00031305.1988.10475524

Leslie Tiong Ching Ow DCLN, Y L (2016) Prediction of forex trend movement using. 2(2):117–140

Li Y, Xie Y, Yu C, Yu F, Jiang B, Khushi M (n.d.) Feature importance recap and stacking models for forex price prediction

Lin H, Sun Q, Chen SQ (2020) Reducing exchange rate risks in international trade: A hybrid forecasting approach of CEEMDAN and multilayer LSTM. Sustain (Switzerland) 12(6):1. https://doi.org/10.3390/su12062451

Liu H, Motoda H (2001) Data Reduction via Instance Selection. In: Instance Selection and Construction for Data Mining. p. 3–20. https://doi.org/10.1007/978-1-4757-3359-4_1

Markovitch S, Rosenstein D (2002) Feature generation using general constructor functions. Mach Learn 49(1):59–98. https://doi.org/10.1023/A:1014046307775

Mitra SK (2012) Is Hurst exponent value useful in forecasting financial time series? Asian Soc Sci 8(8):111–120. https://doi.org/10.5539/ass.v8n8p111

Montgomery DC, Jennings CL, Kulahci M (2015) Introduction time series analysis and forecasting. Wiley, p 671.

Munkhdalai L, Munkhdalai T, Park KH, Lee HG, Li M, Ryu KH (2019) Mixture of activation functions with extended min-max normalization for forex market prediction. IEEE Access 7:183680–183691. https://doi.org/10.1109/ACCESS.2019.2959789

Nagpure AR (2019) Prediction of multi-currency exchange rates using deep learning. Int J Innov Technol Explor Eng 8(6):316–322

Ni L, Li Y, Wang X, Zhang J, Yu J, Qi C (2019) Forecasting of forex time series data based on deep learning. Procedia Comput Sci 147:647–652. https://doi.org/10.1016/j.procs.2019.01.189

Pang S, Song L, Kasabov N (2011) Correlation-aided support vector regression for forex time series prediction. pp 1193–1203. https://doi.org/10.1007/s00521-010-0482-5

Petropoulos A, Chatzis SP, Siakoulis V, Vlachogiannakis N (2017) PT US CR. Expert Syst Appl. https://doi.org/10.1016/j.eswa.2017.08.011

Philip AA (2011) Artificial Neural Network Model for Forecasting Foreign Exchange Rate 1(3):110–118

Preeti BR, Singh RP (2019) Financial and non-stationary time series forecasting using LSTM recurrent neural network for short and long horizon. In: 2019 10th International conference on computing, communication and networking technologies, ICCCNT 2019, 1–7. https://doi.org/10.1109/ICCCNT45670.2019.8944624

Primananda SB, Isa SM (2021) Forecasting gold price in rupiah using multivariate analysis with LSTM and GRU neural networks. Adv Sci Technol Eng Syst J 6(2):245–253. https://doi.org/10.25046/aj060227

Putra ARP, Permanasari AE, Fauziati S (2017) I forex trend prediction technique using multiple indicators and multiple pairs correlations DSS: a software design. In: Proceedings of 2016 8th International Conference on Information Technology and Electrical Engineering: Empowering Technology for Better Future, ICITEE 2016. https://doi.org/10.1109/ICITEED.2016.7863248

Putri KS, Halim S (2020) Currency movement forecasting using time series analysis and long short-term memory. Int J Ind Optim 1(2):71. https://doi.org/10.12928/ijio.v1i2.2490

Qian B, Rasheed K (2004) Hurst exponent and financial market predictability. In: Proceedings of the Second IASTED International Conference on Financial Engineering and Applications, pp 203–209

Qian B, Rasheed K (2010) Foreign exchange market prediction with multiple classifiers. J Forecast 29(3):271–284. https://doi.org/10.1002/for.1124

Qiu TYF, Yuan AYC, Chen PZ, Lee RST (2019) Hybrid Chaotic Radial Basis Function Neural Oscillatory Network (HCRBFNON) for financial forecast and trading system. In: 2019 IEEE Symposium Series on Computational Intelligence, SSCI 2019, September, 2799–2806. https://doi.org/10.1109/SSCI44817.2019.9002781

Qu Y, Zhao X (2019) Application of LSTM Neural Network in Forecasting Foreign Exchange Price. J Phys: Conf Ser 1237(4):1. https://doi.org/10.1088/1742-6596/1237/4/042036

Ramadhani IJ, Rismala R (2016) Prediction of multi currency exchange rates using correlation analysis and backpropagation. 2016 International Conference on ICT for Smart Society, ICISS 2016, July, 63–68. https://doi.org/10.1109/ICTSS.2016.7792850

Ranjit S, Shrestha S, Subedi S, Shakya S (2018) Comparison of algorithms in foreign exchange rate prediction. In: Proceedings on 2018 IEEE 3rd international conference on computing, communication and security, ICCCS 2018, December 2020, 9–13. https://doi.org/10.1109/CCCS.2018.8586826

Reddy SK, B A, (2015) Exchange rate forecasting using ARIMA, neural network and fuzzy neuron. J Stock Forex Trad 04(03):1. https://doi.org/10.4172/2168-9458.1000155

Resta M (2012) Send orders of reprints at [email protected] Recent Patents on. In Computer Science (vol 5).

Rundo F (2019) applied sciences Deep LSTM with Reinforcement Learning Layer for Financial Trend Prediction in FX High Frequency Trading Systems

Raimundo M, Okamoto J Jr (2018) Application of Hurst Exponent (H) and the R/S Analysis in the Classification of FOREX Securities. Int J Model Optim 8(2):116–124. https://doi.org/10.7763/ijmo.2018.v8.635

Saiful Islam M, Hossain E (2020) Foreign exchange currency rate prediction using a GRU-LSTM Hybrid Network. Soft Computing Letters. https://doi.org/10.1016/j.socl.2020.100009

Samarawickrama AJP, Fernando TGI (2019) Multi-step-ahead prediction of exchange rates using artificial neural networks: a study on selected Sri Lankan foreign exchange rates. 2019 IEEE 14th International Conference on Industrial and Information Systems: Engineering for Innovations for Industry 4.0, ICIIS 2019 - Proceedings, 488–493. https://doi.org/10.1109/ICIIS47346.2019.9063310

Silva DA, Dylan M, Tiago D (2021) Forex price prediction using LSTM ’ s

Shah V, Parikh K (2018) Exploring the predictability of different asset class using exponents in multifractal analysis

Tealab A, Hefny H, Badr A (2017) Forecasting of nonlinear time series using ANN. Fut Comput Inf J 2(1):39–47. https://doi.org/10.1016/j.fcij.2017.05.001

Ulina M, Purba R, Halim A, Putri KS, Halim S (2020) Foreign exchange prediction using CEEMDAN and improved FA-LSTM. Int J Ind Optim 1(2):71. https://doi.org/10.12928/ijio.v1i2.2490

Wang H, Ma C, Zhou L (2009) A brief review of machine learning and its application. Proceedings - 2009 International Conference on Information Engineering and Computer Science, ICIECS 2009. https://doi.org/10.1109/ICIECS.2009.5362936

Weerathunga HPSD, Silva ATP (2018) DRNN-ARIMA approach to short-term trend forecasting in forex market. 2018 18th International Conference on Advances in ICT for Emerging Regions (ICTer), pp 287–293

Wei W, Li P (2019) Multi-channel LSTM with different time scales for foreign exchange rate prediction. ACM Int Conf Proc Ser. https://doi.org/10.1145/3373477.3373693

Vyklyuk Y, Darko Vuković AJ (2013) Forex prediction with neural network: Usd/Eur. Actual Problems Econ 10(10):251–261

Yıldırım DC, Toroslu IH, Fiore U (2021) Forecasting directional movement of Forex data using LSTM with technical and macroeconomic indicators. Financ Innov 7(1):1–36. https://doi.org/10.1186/s40854-020-00220-2

Yu L, Liu H (2004) Efficient feature selection via analysis of relevance and redundancy. J Mach Learn Res 5:1205–1224

Yu-Liu04.dvi _ Enhanced Reader.pdf. (n.d.).

Zanc R, Cioara T, Anghel I (2019) Forecasting financial markets using deep learning. In: Proceedings - 2019 IEEE 15th International Conference on Intelligent Computer Communication and Processing, ICCP 2019, September, pp 459–466. https://doi.org/10.1109/ICCP48234.2019.8959715

Zhang B (2018) Foreign exchange rates forecasting with an EMD-LSTM neural networks model. J Phys: Conf Ser 1053(1). https://doi.org/10.1088/1742-6596/1053/1/012005

Zhang K, Jiang Y, Liu D, Song H (2020) Spatio-temporal data mining for aviation delay prediction. In: 2020 IEEE 39th international performance computing and communications conference, IPCCC 2020. https://doi.org/10.1109/IPCCC50635.2020.9391561

Zhao Y, Khushi M (2020) Wavelet Denoised-ResNet CNN and LightGBM method to predict forex rate of change. In: IEEE International Conference on Data Mining Workshops, ICDMW, 385–391. https://doi.org/10.1109/ICDMW51313.2020.00060

Zhelev S, Avresky DR (2019) Using LSTM neural network for time series predictions in financial markets. 2019 IEEE 18th International Symposium on Network Computing and Applications. NCA 2019:1–5. https://doi.org/10.1109/NCA.2019.8935009

Zhou T (2020) Forex trend forecasting based on long short term memory and its variations with hybrid activation functions. https://bura.brunel.ac.uk/handle/2438/20942