Prediction of Forex Prices on USD/NGN Using Deep Learning (LSTM and GRU) Techniques
Abstract
The goal of the project is to develop a model to forecast the Foreign Exchange (FOREX) prices of United State Dollar to Nigerian Naira (USD/NGN), utilizing two machine learning algorithms, including Long Short-Term Memory (LSTM) and Gated Recurrent Units (GRU). These were chosen for this study because they have been found to be effective in previous studies that have been examined. The principles of machine learning and its applications, as well as the many machine learning techniques and algorithms will be covered in this study. Additionally, various extraction methods that will be used in the study will be presented. Data from the Investing.com dataset would be retrieved for this study's purpose and divided into training and test sets. Using the two machine learning techniques previously mentioned, the model would be trained and tested. Then, to measure the model's performance in terms of accuracy and precision, Mean Squared Error, Root Mean Squared Error, and Mean Absolute Error would be utilized. The results obtained showed that, GRU performed better than LSTM with a 0.950 Test R2 score and an adjusted R2 score of 0.122. The RMSE is way lower than LSTMs at 0.105 and MAE is even lower at 0.950.
Downloads
References
M.L. Sapini, M.S.M. Noorani, F.A. Razak, M.A. Alias, and N.M. Yusof, "Understanding Published Literatures on Persistent Homology using Social Network Analysis," Malaysian Journal of Fundamental and Applied Sciences, vol. 18, no. 4, pp. 413-429, 2022.
C.Y. Lai, R.C. Chen, and R.E. Caraka, "Prediction stock price based on different index factors using LSTM," in Proc. 2019 International Conference on Machine Learning and Cybernetics (ICMLC), 2019, pp. 1-6.
P.D. Yoo, M.H. Kim, and T. Jan, "Machine learning techniques and use of event information for stock market prediction: A survey and evaluation," in Proc. International Conference on Computational Intelligence for Modelling, Control and Automation and International Conference on Intelligent Agents, Web Technologies and Internet Commerce (CIMCA-IAWTIC'06), vol. 2, 2005, pp. 835-841.
R. Chowdhury, M.R.C. Mahdy, T.N. Alam, G.D. Al Quaderi, and M.A. Rahman, "Predicting the stock price of frontier markets using machine learning and modified Black–Scholes Option pricing model," Physica A: Statistical Mechanics and its Applications, vol. 555, p. 124444, 2020.
J. Chung, C. Gulcehre, K. Cho, and Y. Bengio, "Empirical evaluation of gated recurrent neural networks on sequence modeling," arXiv preprint arXiv:1412.3555, 2014.
L.S.T. Memory, "Long short-term memory," Neural Computation, vol. 9, no. 8, pp. 1735-1780, 2010.
F.A. Gers, J. Schmidhuber, and F. Cummins, "Learning to forget: Continual prediction with LSTM," Neural Computation, vol. 12, no. 10, pp. 2451-2471, 2000.
D.P. Kumar, T. Amgoth, and C.S.R. Annavarapu, "Machine learning algorithms for wireless sensor networks: A survey," Information Fusion, vol. 49, pp. 1-25, 2019.
H. Pönkä, "Predicting the direction of US stock markets using industry returns," Empirical Economics, vol. 52, pp. 1451-1480, 2017.
L.P. Chen, "Using machine learning algorithms on prediction of stock price," Journal of Modeling and Optimization, vol. 12, no. 2, pp. 84-99, 2020.
Z. Hu, Y. Zhao, and M. Khushi, "A survey of forex and stock price prediction using deep learning," Applied System Innovation, vol. 4, no. 1, p. 9, 2021.
N. Pahwa, N. Khalfay, V. Soni, and D. Vora, "Stock prediction using machine learning a review paper," International Journal of Computer Applications, vol. 163, no. 5, pp. 36-43, 2017.
K. Kumar and M.T.U. Haider, "Blended computation of machine learning with the recurrent neural network for intra-day stock market movement prediction using a multi-level classifier," International Journal of Computers and Applications, vol. 43, no. 8, pp. 733-749, 2021.
L.A. Harahap, R. Lipikorn, and A. Kitamoto, "Nikkei Stock market price index prediction using machine learning," in Proc. Journal of Physics: Conference Series, vol. 1566, no. 1, p. 012043, 2020.
C.Y. Lai, R.C. Chen, and R.E. Caraka, "Prediction stock price based on different index factors using LSTM," in Proc. 2019 International Conference on Machine Learning and Cybernetics (ICMLC), 2019, pp. 1-6.
Meliones and G. Makrides, "Automated Stock Price Motion Prediction Using Technical Analysis Datasets and Machine Learning," Machine Learning Paradigms: Applications of Learning and Analytics in Intelligent Systems, pp. 207-228, 2019.
N. Naik and B.R. Mohan, "Optimal feature selection of technical indicator and stock prediction using machine learning technique," in Proc. Emerging Technologies in Computer Engineering: Microservices in Big Data Analytics: Second International Conference, ICETCE 2019, Jaipur, India, February 1–2, 2019, Revised Selected Papers 2, 2019, pp. 261-268.
M. Nikou, G. Mansourfar, and J. Bagherzadeh, "Stock price prediction using DEEP learning algorithm and its comparison with machine learning algorithms," Intelligent Systems in Accounting, Finance and Management, vol. 26, no. 4, pp. 164-174, 2019.
Palikuca and T. Seidl, "Predicting High Frequency Exchange Rates Using Machine Learning," 2016.
J. Patel, S. Shah, P. Thakkar, and K. Kotecha, "Predicting stock market index using fusion of machine learning techniques," Expert Systems with Applications, vol. 42, no. 4, pp. 2162-2172, 2015.
D. Pedrozo, F. Barajas, A. Estupiñán, K.L. Cristiano, and D.A. Triana, "Development and implementation of a predictive method for the stock market analysis, using the long short-term memory machine learning method," Journal of Physics: Conference Series, vol. 1514, no. 1, p. 012009, 2020.
S. Ravikumar and P. Saraf, "Prediction of stock prices using machine learning (regression, classification) Algorithms," in Proc. 2020 International Conference for Emerging Technology (INCET), 2020, pp. 1-5.
G. Ardiyansyah, F. Ferdiansyah, and U. Ependi, "Deep Learning Model Analysis and Web-Based Implementation of Cryptocurrency Prediction," Journal of Information Systems and Informatics, vol. 4, no. 4, pp. 958-974, 2022.
C. Zhang, Z. Ji, J. Zhang, Y. Wang, X. Zhao, and Y. Yang, "Predicting Chinese stock market price trend using machine learning approach," in Proc. 2nd International Conference on Computer Science and Application Engineering, 2018, pp. 1-5.
P.D. Yoo, M.H. Kim, and T. Jan, "Machine learning techniques and use of event information for stock market prediction: A survey and evaluation," in Proc. International Conference on Computational Intelligence for Modelling, Control and Automation and International Conference on Intelligent Agents, Web Technologies and Internet Commerce (CIMCA-IAWTIC'06), vol. 2, 2005, pp. 835-841.
N. Rouf, M.B. Malik, T. Arif, S. Sharma, S. Singh, S. Aich, and H.C. Kim, "Stock market prediction using machine learning techniques: a decade survey on methodologies, recent developments, and future directions," Electronics, vol. 10, no. 21, p. 2717, 2021.
V.K.S. Reddy, "Stock market prediction using machine learning," International Research Journal of Engineering and Technology (IRJET), vol. 5, no. 10, pp. 1033-1035, 2018.
P. Werawithayaset and S. Tritilanunt, "Stock closing price prediction using machine learning," in Proc. 2019 17th International Conference on ICT and Knowledge Engineering (ICT&KE), 2019, pp. 1-8.
S. Sarode, H.G. Tolani, P. Kak, and C.S. Lifna, "Stock price prediction using machine learning techniques," in Proc. 2019 International Conference on Intelligent Sustainable Systems (ICISS), 2019, pp. 177-181.
M.S. Ismail, M.S.M. Noorani, M. Ismail, F.A. Razak, and M.A. Alias, "Predicting next day direction of stock price movement using machine learning methods with persistent homology: Evidence from Kuala Lumpur Stock Exchange," Applied Soft Computing, vol. 93, p. 106422, 2020.
M. Vijh, D. Chandola, V.A. Tikkiwal, and A. Kumar, "Stock closing price prediction using machine learning techniques," Procedia Computer Science, vol. 167, pp. 599-606, 2020.
W. Khan, U. Malik, M.A. Ghazanfar, M.A. Azam, K.H. Alyoubi, and A.S. Alfakeeh, "Predicting stock market trends using machine learning algorithms via public sentiment and political situation analysis," Soft Computing, vol. 24, pp.11019-11043, 2020.
X. Zhong and D. Enke, "Predicting the daily return direction of the stock market using hybrid machine learning algorithms," Financial Innovation, vol. 5, no. 1, pp. 1-20, 2019.
S. Tekin and E. Çanakoğlu, "Prediction of stock returns in Istanbul stock exchange using machine learning methods," in Proc. 2018 26th Signal Processing and Communications Applications Conference (SIU), May 2018, pp. 1-4.
F.A. Gers, J. Schmidhuber, and F. Cummins, "Learning to forget: Continual prediction with LSTM," Neural Computation, vol. 12, no. 10, pp. 2451-2471, 2000.
K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, "Learning phrase representations using RNN encoder-decoder for statistical machine translation," arXiv preprint arXiv:1406.1078, 2014.
A. Shewalkar, D. Nyavanandi, and S.A. Ludwig, "Performance evaluation of deep neural networks applied to speech recognition: RNN, LSTM and GRU," Journal of Artificial Intelligence and Soft Computing Research, vol. 9, no. 4, pp. 235-245, 2019.
Y. LeCun, Y. Bengio, and G. Hinton, "Deep learning," Nature, vol. 521, no. 7553, pp. 436-444, 2015.
M. Nikou, G. Mansourfar, and J. Bagherzadeh, "Stock price prediction using DEEP learning algorithm and its comparison with machine learning algorithms," Intelligent Systems in Accounting, Finance and Management, vol. 26, no. 4, pp. 164-174, 2019.
M. Vijh, D. Chandola, V.A. Tikkiwal, and A. Kumar, "Stock closing price prediction using machine learning techniques," Procedia Computer Science, vol. 167, pp. 599-606, 2020.
U. Ependi, A.F. Rochim, and A. Wibowo, "A Hybrid Sampling Approach for Improving the Classification of Imbalanced Data Using ROS and NCL Methods," International Journal of Intelligent Engineering and Systems, vol. 16, no. 3, pp. 345-361, 2023.
S. Hochreiter and J. Schmidhuber, "Long short-term memory," Neural Computation, vol. 9, no. 8, pp. 1735-1780, 1997.
D.P. Kumar, T. Amgoth, and C.S.R. Annavarapu, "Machine learning algorithms for wireless sensor networks: A survey," Information Fusion, vol. 49, pp. 1-25, 2019.
J. Chung, C. Gulcehre, K. Cho, and Y. Bengio, "Empirical evaluation of gated recurrent neural networks on sequence modeling," arXiv preprint arXiv:1412.3555, 2014.
L.P. Chen, "Using machine learning algorithms on prediction of stock price," Journal of Modeling and Optimization, vol. 12, no. 2, pp. 84-99, 2020.
L. Qi, M. Khushi, and J. Poon, "Event-driven LSTM for forex price prediction," in Proc. 2020 IEEE Asia-Pacific Conference on Computer Science and Data Engineering (CSDE), December 2020, pp. 1-6.
P.K. Sarangi, M. Chawla, P. Ghosh, S. Singh, and P.K. Singh, "FOREX trend analysis using machine learning techniques: INR vs USD currency exchange rate using ANN-GA hybrid approach," Materials Today: Proceedings, vol. 49, pp. 3170-3176, 2022.
M.Z. Abedin, M.H. Moon, M.K. Hassan, and P. Hajek, "Deep learning-based exchange rate prediction during the COVID-19 pandemic," Annals of Operations Research, pp. 1-52, 2021.
Download PDF: 656 times
Copyright (c) 2023 Journal of Information Systems and Informatics
This work is licensed under a Creative Commons Attribution 4.0 International License.
- I certify that I have read, understand and agreed to the Journal of Information Systems and Informatics (Journal-ISI) submission guidelines, policies and submission declaration. Submission already using the provided template.
- I certify that all authors have approved the publication of this and there is no conflict of interest.
- I confirm that the manuscript is the authors' original work and the manuscript has not received prior publication and is not under consideration for publication elsewhere and has not been previously published.
- I confirm that all authors listed on the title page have contributed significantly to the work, have read the manuscript, attest to the validity and legitimacy of the data and its interpretation, and agree to its submission.
- I confirm that the paper now submitted is not copied or plagiarized version of some other published work.
- I declare that I shall not submit the paper for publication in any other Journal or Magazine till the decision is made by journal editors.
- If the paper is finally accepted by the journal for publication, I confirm that I will either publish the paper immediately or withdraw it according to withdrawal policies
- I Agree that the paper published by this journal, I transfer copyright or assign exclusive rights to the publisher (including commercial rights)