A Novel Cryptocurrency Price Prediction Model Using GRU, LSTM and bi-LSTM Machine Learning Algorithms
Abstract
:1. Introduction
- Presenting a comprehensive study of the various existing schemes to predict the prices of BTC, ETH, and LTC cryptocurrencies.
- Using AI algorithms such as LSTM, bi-LSTM, and GRU to accurately predict the prices of cryptocurrencies.
- Utilizing long short-term memory (LSTM), a deep learning algorithm, and Fbprophet, which is an auto machine learning algorithm, for prediction.
- Evaluating the proposed hybrid models using evaluation matrices such as RMSE and MAPE for Bitcoin, Ethereum, and Litecoin.
2. Literature Review
3. Materials and Methods
3.1. Machine Learning Algorithms
3.1.1. Long Short-Term Memory (LSTM)
3.1.2. Bidirectional LSTM (bi-LSTM)
3.1.3. Gated Recurrent Unit (GRU)
3.2. Evaluation Matrix
3.3. Data Exploration
4. Dataset
5. Results
5.1. Results for BTC
5.2. Results for ETH
5.3. Results for LTC
6. Discussion
7. Conclusions
- The AI algorithm is reliable and acceptable for cryptocurrency prediction.
- GRU can predict cryptocurrency prices better than LSTM and bi-LSTM but overall all algorithms represent excellent predictive results.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Mukhopadhyay, U.; Skjellum, A.; Hambolu, O.; Oakley, J.; Yu, L.; Brooks, R. A brief survey of Cryptocurrency systems. In Proceedings of the 14th Annual Conference on Privacy, Security and Trust (PST), Auckland, New Zealand, 12–14 December 2016; pp. 745–752. [Google Scholar] [CrossRef]
- Rose, C. The Evolution Of Digital Currencies: Bitcoin, A Cryptocurrency Causing A Monetary Revolution. Int. Bus. Econ. Res. J. (IBER) 2015, 14, 617. [Google Scholar] [CrossRef]
- Brenig, C.; Accorsi, R.; Müller, G. Economic Analysis of Cryptocurrency Backed Money Laundering. ECIS 2015 Completed Research Papers. Paper 20. 2015. Available online: https://aisel.aisnet.org/ecis2015_cr/20 (accessed on 16 June 2021).
- Eyal, I. Blockchain Technology: Transforming Libertarian Cryptocurrency Dreams to Finance and Banking Realities. Computer 2017, 50, 38–49. [Google Scholar] [CrossRef]
- DeVries, P. An Analysis of Cryptocurrency, Bitcoin, and the Future. Int. J. Bus. Manag. Commer. 2016, 1, 1–9. [Google Scholar]
- Jang, H.; Lee, J. An Empirical Study on Modeling and Prediction of Bitcoin Prices with Bayesian Neural Networks Based on Blockchain Information. IEEE Access 2017, 6, 5427–5437. [Google Scholar] [CrossRef]
- Saad, M.; Choi, J.; Nyang, D.; Kim, J.; Mohaisen, A. Toward Characterizing Blockchain-Based Cryptocurrencies for Highly Accurate Predictions. IEEE Syst. J. 2019, 14, 321–332. [Google Scholar] [CrossRef]
- Gautam, K.; Sharma, N.; Kumar, P. Empirical Analysis of Current Cryptocurrencies in Different Aspects. In Proceedings of the ICRITO 2020—IEEE 8th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions), Noida, India, 4–5 June 2020; pp. 344–348. [Google Scholar] [CrossRef]
- Adams, R.; Kewell, B.; Parry, G. Blockchain for Good? Digital Ledger Technology and Sustainable Development Goals. In Handbook of Sustainability and Social Science Research; Filho, W.L., Marans, R., Callewaert, J., Eds.; World Sustainability Series; Springer: Cham, Switzerland, 2018. [Google Scholar] [CrossRef]
- Killer, C.; Rodrigues, B.; Stiller, B. Security Management and Visualization in a Blockchain-based Collaborative Defense. In Proceedings of the ICBC 2019—IEEE International Conference on Blockchain and Cryptocurrency, Seoul, Korea, 14–17 May 2019; pp. 108–111. [Google Scholar] [CrossRef] [Green Version]
- Gandal, N.; Halaburda, H. Competition in the Cryptocurrency Market (September 29, 2014). CESifo Working Paper Series No. 4980. Available online: https://ssrn.com/abstract=2506577 (accessed on 16 June 2021).
- Iwamura, M.; Kitamura, Y.; Matsumoto, T. Is Bitcoin the Only Cryptocurrency in the Town? Economics of Cryptocurrency And Friedrich A. Hayek (February 28, 2014). Available online: https://ssrn.com/abstract=2405790 (accessed on 16 June 2021). [CrossRef] [Green Version]
- Kyriazis, N.A. A Survey on Empirical Findings about Spillovers in Cryptocurrency Markets. J. Risk Financ. Manag. 2019, 12, 170. [Google Scholar] [CrossRef] [Green Version]
- Hassani, H.; Huang, X.; Silva, E. Big-Crypto: Big Data, Blockchain and Cryptocurrency. Big Data Cogn. Comput. 2018, 2, 34. [Google Scholar] [CrossRef] [Green Version]
- Nizzoli, L.; Tardelli, S.; Avvenuti, M.; Cresci, S.; Tesconi, M.; Ferrara, E. Charting the Landscape of Online Cryptocurrency Manipulation. IEEE Access 2020, 8, 113230–113245. [Google Scholar] [CrossRef]
- Rebane, J.; Karlsson, I.; Papapetrou, P.; Denic, S. Seq2Seq RNNs and ARIMA models for Cryptocurrency Prediction: A Comparative Study. In Proceedings of the SIGKDD Workshop on Fintech (SIGKDD Fintech’18), London, UK, 19–23 August 2018. [Google Scholar]
- Rehman, M.U.; Apergis, N. Determining the predictive power between cryptocurrencies and real time commodity futures: Evidence from quantile causality tests. Resour. Policy 2019, 61, 603–616. [Google Scholar] [CrossRef]
- Liew, J.; Li, R.Z.; Budavári, T.; Sharma, A. Cryptocurrency Investing Examined. J. Br. Blockchain Assoc. 2019, 2, 1–12. [Google Scholar] [CrossRef] [Green Version]
- Dyntu, V.; Dykyi, O. Cryptocurrency in the system of money laundering. Balt. J. Econ. Stud. 2019, 4, 75–81. [Google Scholar] [CrossRef]
- Kethineni, S.; Cao, Y. The Rise in Popularity of Cryptocurrency and Associated Criminal Activity. Int. Crim. Justice Rev. 2019, 30, 325–344. [Google Scholar] [CrossRef]
- Liu, Y.; Tsyvinski, A. Risks and Returns of Cryptocurrency. Rev. Financ. Stud. 2020, 34, 2689–2727. [Google Scholar] [CrossRef]
- Valdeolmillos, D.; Mezquita, Y.; González-Briones, A.; Prieto, J.; Corchado, J.M. Blockchain Technology: A Review of the Current Challenges of Cryptocurrency. In Blockchain and Applications. BLOCKCHAIN 2019. Advances in Intelligent Systems and Computing; Prieto, J., Das, A., Ferretti, S., Pinto, A., Corchado, J., Eds.; Springer: Cham, Switzerland, 2020; Volume 1010. [Google Scholar] [CrossRef]
- Yuneline, M.H. Analysis of cryptocurrency’s characteristics in four perspectives. J. Asian Bus. Econ. Stud. 2019, 26, 206–219. [Google Scholar] [CrossRef] [Green Version]
- Huynh, T.L.D.; Nasir, M.A.; Vo, X.V.; Nguyen, T.T. “Small things matter most”: The spillover effects in the cryptocurrency market and gold as a silver bullet. North Am. J. Econ. Financ. 2020, 54, 101277. [Google Scholar] [CrossRef]
- Hitam, N.A.; Ismail, A.R. Comparative Performance of Machine Learning Algorithms for Cryptocurrency Forecasting. Indones. J. Electr. Eng. Comput. Sci. 2018, 11, 1121–1128. [Google Scholar] [CrossRef]
- Andrianto, Y. The Effect of Cryptocurrency on Investment Portfolio Effectiveness. J. Financ. Account. 2017, 5, 229. [Google Scholar] [CrossRef] [Green Version]
- Derbentsev, V.; Babenko, V.; Khrustalev, K.; Obruch, H.; Khrustalova, S. Comparative Performance of Machine Learning Ensemble Algorithms for Forecasting Cryptocurrency Prices. Int. J. Eng. Trans. A Basics 2021, 34, 140–148. [Google Scholar] [CrossRef]
- Patel, M.M.; Tanwar, S.; Gupta, R.; Kumar, N. A Deep Learning-based Cryptocurrency Price Prediction Scheme for Financial Institutions. J. Inf. Secur. Appl. 2020, 55, 102583. [Google Scholar] [CrossRef]
- Miura, R.; Pichl, L.; Kaizoji, T. Artificial Neural Networks for Realized Volatility Prediction in Cryptocurrency Time Series. In Advances in Neural Networks—ISNN 2019; Lu, H., Tang, H., Wang, Z., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2019; Volume 11554. [Google Scholar] [CrossRef]
- Karasu, S.; Altan, A.; Sarac, Z.; Hacioglu, R. Prediction of Bitcoin prices with machine learning methods using time series data. In Proceedings of the 26th Signal Processing and Communications Applications Conference (SIU), Izmir, Turkey, 2–5 May 2018. [Google Scholar] [CrossRef]
- Saad, M.; Mohaisen, A. Towards characterizing blockchain-based cryptocurrencies for highly-accurate predictions. In Proceedings of the IEEE INFOCOM—IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), Honolulu, HI, USA, 15–19 April 2018. [Google Scholar] [CrossRef]
- Yiying, W.; Yeze, Z. Cryptocurrency Price Analysis with Artificial Intelligence. In Proceedings of the 5th International Conference on Information Management (ICIM), Cambridge, UK, 24–27 March 2019; pp. 97–101. [Google Scholar] [CrossRef]
- Chen, Z.; Li, C.; Sun, W. Bitcoin price prediction using machine learning: An approach to sample dimension engineering. J. Comput. Appl. Math. 2019, 365, 112395. [Google Scholar] [CrossRef]
- Valencia, F.; Gómez-Espinosa, A.; Valdés-Aguirre, B. Price Movement Prediction of Cryptocurrencies Using Sentiment Analysis and Machine Learning. Entropy 2019, 21, 589. [Google Scholar] [CrossRef] [Green Version]
- Ferdiansyah, F.; Othman, S.H.; Radzi, R.Z.R.M.; Stiawan, D.; Sazaki, Y.; Ependi, U. A LSTM-Method for Bitcoin Price Prediction: A Case Study Yahoo Finance Stock Market. In Proceedings of the ICECOS—3rd International Conference on Electrical Engineering and Computer Science, Batam, Indonesia, 2–3 October 2019; pp. 206–210. [Google Scholar] [CrossRef]
- Zhao, Y.; Chen, Z. Forecasting stock price movement: New evidence from a novel hybrid deep learning model. J. Asian Bus. Econ. Studies 2021. ahead-of-print. [Google Scholar] [CrossRef]
- Jain, A.; Tripathi, S.; Dwivedi, H.D.; Saxena, P. Forecasting Price of Cryptocurrencies Using Tweets Sentiment Analysis. In Proceedings of the 11th International Conference on Contemporary Computing (IC3), Noida, India, 2–4 August 2018; pp. 1–7. [Google Scholar] [CrossRef]
- Wu, C.-H.; Lu, C.-C.; Ma, Y.-F.; Lu, R.-S. A New Forecasting Framework for Bitcoin Price with LSTM. In Proceedings of the IEEE International Conference on Data Mining Workshops (ICDMW), Singapore, 17–20 November 2018; pp. 168–175. [Google Scholar] [CrossRef]
- Yamak, P.T.; Yujian, L.; Gadosey, P.K. A Comparison between ARIMA, LSTM, and GRU for Time Series Forecasting. In Proceedings of the 2nd International Conference on Algorithms, Computing and Artificial Intelligence, Sanya, China, 20–22 December 2019; pp. 49–55. [Google Scholar] [CrossRef]
- McNally, S.; Roche, J.; Caton, S. Predicting the Price of Bitcoin Using Machine Learning. In Proceedings of the 26th Euromicro International Conference on Parallel, Distributed and Network-based Processing (PDP), Cambridge, UK, 21–23 March 2018; pp. 339–343. [Google Scholar] [CrossRef] [Green Version]
- Lazo, J.G.L.; Medina, G.H.H.; Guevara, A.V.; Talavera, A.; Otero, A.N.; Cordova, E.A. Support System to Investment Management in Cryptocurrencies. In Proceedings of the 2019 7th International Engineering, Sciences and Technology Conference, IESTEC, Panama, Panama, 9–11 October 2019; pp. 376–381. [Google Scholar] [CrossRef]
- Market Watch Which Provides the Latest Stock Market, Financial and Business News. Available online: https://www.marketwatch.com (accessed on 16 June 2021).
- Greff, K.; Srivastava, R.K.; Koutnik, J.; Steunebrink, B.R.; Schmidhuber, J. LSTM: A Search Space Odyssey. IEEE Trans. Neural Netw. Learn. Syst. 2017, 28, 2222–2232. [Google Scholar] [CrossRef] [Green Version]
- Sherratt, F.; Plummer, A.; Iravani, P. Understanding LSTM Network Behaviour of IMU-Based Locomotion Mode Recognition for Applications in Prostheses and Wearables. Sensors 2021, 21, 1264. [Google Scholar] [CrossRef] [PubMed]
- Jozefowicz, R.; Zaremba, W.; Sutskever, I. An empirical exploration of Recurrent Network architectures. In Proceedings of the 32nd International Conference on Machine Learning (ICML), Lille, France, 6–11 July 2015; Volume 3, pp. 2332–2340. [Google Scholar]
- Le, X.-H.; Ho, H.V.; Lee, G.; Jung, S. Application of Long Short-Term Memory (LSTM) Neural Network for Flood Forecasting. Water 2019, 11, 1387. [Google Scholar] [CrossRef] [Green Version]
- Li, X.; Peng, L.; Yao, X.; Cui, S.; Hu, Y.; You, C.; Chi, T. Long short-term memory neural network for air pollutant concentration predictions: Method development and evaluation. Environ. Pollut. 2017, 231, 997–1004. [Google Scholar] [CrossRef]
- Kwak, G.H.; Park, C.W.; Ahn, H.Y.; Na, S.; Il, L.; Do, K.; Park, N.W. Potential of bidirectional long short-term memory networks for crop classification with multitemporal remote sensing images. Korean J. Remote. Sens. 2020, 36, 515–525. [Google Scholar] [CrossRef]
- Althelaya, K.A.; El-Alfy, E.-S.M.; Mohammed, S. Evaluation of bidirectional LSTM for short-and long-term stock market prediction. In Proceedings of the 9th International Conference on Information and Communication Systems (ICICS), Irbid, Jordan., 3–5 April 2018. [Google Scholar] [CrossRef]
- Yildirim, Ö. A novel wavelet sequence based on deep bidirectional LSTM network model for ECG signal classification. Comput. Biol. Med. 2018, 96, 189–202. [Google Scholar] [CrossRef] [PubMed]
- Yang, S. Research on Network Behavior Anomaly Analysis Based on Bidirectional LSTM. In Proceedings of the IEEE 3rd Information Technology, Networking, Electronic and Automation Control Conference (ITNEC), Chengdu, China, 15–17 March 2019. [Google Scholar] [CrossRef]
- Dey, R.; Salemt, F.M. Gate-variants of Gated Recurrent Unit (GRU) neural networks. In Proceedings of the IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), Boston, MA, USA, 6–9 August 2017. [Google Scholar] [CrossRef] [Green Version]
- Zhao, R.; Wang, D.; Yan, R.; Mao, K.; Shen, F.; Wang, J. Machine Health Monitoring Using Local Feature-Based Gated Recurrent Unit Networks. IEEE Trans. Ind. Electron. 2018, 65, 1539–1548. [Google Scholar] [CrossRef]
- Su, Y.; Kuo, C.-C.J. On extended long short-term memory and dependent bidirectional recurrent neural network. Neurocomputing 2019, 356, 151–161. [Google Scholar] [CrossRef] [Green Version]
Variable Name | Variable Description | Data Type |
---|---|---|
Date | Date of Observation | Date |
Open | Opening price on the given day | Number |
High | High price on the given day | Number |
Low | Low price on the given day | Number |
Close | Close price on the given day | Number |
Model | RMSE | MAPE |
---|---|---|
LSTM | 410.399 | 1.1234% |
bi-LSTM | 2927.006 | 5.990% |
GRU | 174.129 | 0.2454% |
Model | RMSE | MAPE |
---|---|---|
LSTM | 59.507 | 1.5498% |
bi-LSTM | 321.061 | 6.85% |
GRU | 26.59 | 0.8267% |
Model | RMSE | MAPE |
---|---|---|
LSTM | 3.069 | 0.8474% |
bi-LSTM | 4.307 | 2.332% |
GRU | 0.825 | 0.2116% |
Reference | Cryptocurrency | Method | Result |
---|---|---|---|
[51] | BTC, LTC | Multi-linear regression model | R2 score: 44% for LTC and 59% for BTC |
[45] | BTC | Logistic regression and linear discriminant analysis | LR: 66% LDA: 65.3% |
[53] | BTC | ARIMA, LSTM and GRU. | RMSE ARIMA: 302.53, LSTM: 603.68 GRU: 381.34 |
This paper | BTC | LSTM, GRU, and bi-LSTM | GRU MAPE: 0.2454% RMSE: 174.129 LSTM MAPE: 1.1234% RMSE: 410.399 bi-LSTM MAPE: 5.990% RMSE: 2927.006 |
This paper | ETH | LSTM, GRU, and bi-LSTM | GRU MAPE: 0.8267% RMSE: 26.59 LSTM MAPE: 1.5498% RMSE: 59.507 bi-LSTM MAPE: 6.85% RMSE: 321.061 |
This paper | LTC | LSTM, GRU, and bi-LSTM | GRU MAPE: 0.2116% RMSE: 0.825 LSTM MAPE: 0.8474% RMSE: 3.069 bi-LSTM MAPE: 2.332% RMSE: 4.307 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Hamayel, M.J.; Owda, A.Y. A Novel Cryptocurrency Price Prediction Model Using GRU, LSTM and bi-LSTM Machine Learning Algorithms. AI 2021, 2, 477-496. https://doi.org/10.3390/ai2040030
Hamayel MJ, Owda AY. A Novel Cryptocurrency Price Prediction Model Using GRU, LSTM and bi-LSTM Machine Learning Algorithms. AI. 2021; 2(4):477-496. https://doi.org/10.3390/ai2040030
Chicago/Turabian StyleHamayel, Mohammad J., and Amani Yousef Owda. 2021. "A Novel Cryptocurrency Price Prediction Model Using GRU, LSTM and bi-LSTM Machine Learning Algorithms" AI 2, no. 4: 477-496. https://doi.org/10.3390/ai2040030
APA StyleHamayel, M. J., & Owda, A. Y. (2021). A Novel Cryptocurrency Price Prediction Model Using GRU, LSTM and bi-LSTM Machine Learning Algorithms. AI, 2(4), 477-496. https://doi.org/10.3390/ai2040030