Skip to main content
Log in

Hybrid Deep Learning Model Integrating Attention Mechanism for the Accurate Prediction and Forecasting of the Cryptocurrency Market

  • Original Research
  • Published:
Operations Research Forum Aims and scope Submit manuscript

Abstract

Currently, cryptocurrency has become one of the most traded worldwide financial instruments. The nature of cryptocurrency is complex and is also deemed a perplexing finance problem. This study applied deep learning methods to predict and forecast the Bitcoin (BTC-USD) and Ethereum (ETH-USD) cryptocurrency market-adjusted close prices. Based on root mean square error (RMSE), the hybrid CNN-LSTM model with Attention Mechanism outperformed CNN and LSTM models in predicting the ETH-USD-adjusted close price. In addition, the traditional LSTM model predicted well the BTC-USD-adjusted close price. In forecasting, the hybrid CNN-LSTM model produced better results for both BTC-USD- and ETH-USD-adjusted close prices compared to individual models. Furthermore, the hybrid model performed well at shorter forecasting horizon and loses its forecasting ability when the horizon is long. The result plays a significant role in analyzing the future cryptocurrency market. The traders and financial analysts can easily understand the future market trend using the hybrid model. Thus, this may help traders to easily trade in the complex and challenging cryptocurrency markets.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

Availability of Data and Materials

The data was collected from https://finance.yahoo.com, saved as a CSV file, and remained with the authors. Therefore, the data are available upon request.

Abbreviations

BTC-USD:

Bitcoin-adjusted close price (US dollars)

CNN:

Convolution neural networks

ETH-USD:

Ethereum-adjusted close price (US dollars)

ReLU:

Rectified linear unit

LSTM:

Long short-term memory

RMSE:

Root mean square error

References

  1. Patel MM, Tanwar S, Gupta R, Kumar N (2020) A deep learning-based cryptocurrency price prediction scheme for financial institutions. J Inf Secur Appl 55:102583

    Article  Google Scholar 

  2. Borri N, Shakhnov K (2020) Regulation spillovers across cryptocurrency markets. Financ Res Lett 36:101333

    Article  Google Scholar 

  3. Solodan K (2019) Legal regulation of cryptocurrency taxation in European countries. European Journal of Law and Public Administration 6(1):64–74

    Article  Google Scholar 

  4. Chudinovskikh M, Sevryugin V (2019) Cryptocurrency regulation in the BRICS countries and the Eurasian Economic Union. BRICS Law J 6(1)

  5. Østbye P (2018) Will regulation change cryptocurrency protocols? Available at SSRN 3159479

  6. Yalaman GÖ, Yıldırım H (2019) Cryptocurrency and tax regulation: global challenges for tax administration in Blockchain Economics and Financial Market Innovation. Springer pp. 407–422

  7. Pintelas E, Livieris IE, Stavroyiannis S, Kotsilieris T, Pintelas P (2020) Investigating the problem of cryptocurrency price prediction: a deep learning approach in IFIP International Conference on Artificial Intelligence Applications and Innovations. Springer pp. 99–110

  8. Khedr AM, Arif I, El-Bannany M, Alhashmi SM, Sreedharan M (2021) Cryptocurrency price prediction using traditional statistical and machine-learning techniques: a survey. Intell Syst Account Finance Manage 28(1):3–34

    Article  Google Scholar 

  9. LeCun Y, Bengio Y (1995) Convolutional networks for images, speech, and time series. The Handbook of Brain Theory and Neural Networks 3361(10):1995

    Google Scholar 

  10. Graves A, Fernández S, Schmidhuber J (2005) Bidirectional LSTM networks for improved phoneme classification and recognition in International Conference on Artificial Neural Networks. Springer pp. 799–804

  11. Sundermeyer M, Schlüter R, Ney H (2012) LSTM neural networks for language modeling in Thirteenth annual conference of the international speech communication association

  12. Shi X, Chen Z, Wang H, Yeung D-Y, Wong W-K, Woo W (2015) Convolutional LSTM network: a machine learning approach for precipitation nowcasting. Adv Neural Inform Process Syst 28

  13. Graves A, Jaitly N, Mohamed A (2013) Hybrid speech recognition with deep bidirectional LSTM. In 2013 IEEE workshop on automatic speech recognition and understanding. IEEE 273–278

  14. Roondiwala M, Patel H, Varma S (2017) Predicting stock prices using LSTM. International Journal of Science and Research (IJSR) 6(4):1754–1756

    Google Scholar 

  15. Selvin S, Vinayakumar R, Gopalakrishnan EA, Menon VK, Soman KP (2017) Stock price prediction using LSTM, RNN and CNN-sliding window model. In 2017 international conference on advances in computing, communications and informatics (icacci). IEEE 1643–1647

  16. Shah D, Campbell W, Zulkernine FH (2018) A comparative study of LSTM and DNN for stock market forecasting in 2018 IEEE International Conference on Big Data (Big Data). IEEE pp. 4148–4155

  17. Saad M, Choi J, Nyang D, Kim J, Mohaisen A (2019) Toward characterizing blockchain-based cryptocurrencies for highly accurate predictions. IEEE Syst J

  18. Chen Z, Li C, Sun W (2020) Bitcoin price prediction using machine learning: an approach to sample dimension engineering. J Comput Appl Math 365:112395

    Article  Google Scholar 

  19. Kim HY, Won CH (2018) Forecasting the volatility of stock price index: a hybrid model integrating LSTM with multiple GARCH-type models. Expert Syst Appl 103:25–37

    Article  Google Scholar 

  20. Lahmiri S, Bekiros S (2019) Cryptocurrency forecasting with deep learning chaotic neural networks. Chaos, Solitons Fractals 118:35–40

    Article  Google Scholar 

  21. Kim T, Kim HY (2019) Forecasting stock prices with a feature fusion LSTM-CNN model using different representations of the same data. PloS One 14(2)

  22. Ferdiansyah F, Othman S, Radzi RZRM, Stiawan D, Sazaki Y, Ependi U (2019) A LSTM-method for bitcoin price prediction: a case study Yahoo Finance stock market in 2019 International Conference on Electrical Engineering and Computer Science (ICECOS). IEEE  pp. 206–210

  23. Siami-Namini S, Tavakoli N, Namin AS (2019) The performance of LSTM and BiLSTM in forecasting time series in 2019 IEEE International Conference on Big Data (Big Data). IEEE pp. 3285–3292

  24. Eapen JJ (2019) Improving stock market index prediction using deep learning models with CNNs and various types of RNNs. California State University, Fullerton

    Google Scholar 

  25. Bisong E (2019) Introduction to scikit-learn in Building Machine Learning and Deep Learning Models on Google Cloud Platform. Springer pp. 215–229

  26. Géron A (2019) Hands-on machine learning with scikit-learn, Keras, and TensorFlow: concepts, tools, and techniques to build intelligent systems. O’Reilly Media

  27. Yang H, Luo L, Chueng LP, Ling D, Chin F (2019) Deep learning and its applications to natural language processing in Deep learning: Fundamentals, theory and applications. Springer pp. 89–109

  28. Hatami N, Gavet Y, Debayle J (2018) Classification of time-series images using deep convolutional neural networks.In Tenth international conference on machine vision (ICMV 2017). SPIE 242–249

  29. Le Guennec A, Malinowski S, Tavenard R (2016) Data augmentation for time series classification using convolutional neural networks in ECML/PKDD workshop on advanced analytics and learning on temporal data

  30. Collobert R, Weston J, Bottou L, Karlen M, Kavukcuoglu K, Kuksa P (2011) Natural language processing (almost) from scratch. J Mach Learn Res 12 pp. 2493–2537

  31. Gulli A, Pal S (2017) Deep learning with Keras. Packt Publishing Ltd

  32. Jin J, Dundar A, Culurciello E (2014) Flattened convolutional neural networks for feedforward acceleration arXiv preprint https://arxiv.org/abs/1412.5474

  33. Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780

    Article  Google Scholar 

  34. Bodapati S, Bandarupally H, Trupthi M (2020) COVID-19 time series forecasting of daily cases, deaths caused and recovered cases using long short term memory networks in 2020 IEEE 5th International Conference on Computing Communication and Automation (ICCCA). IEEE pp. 525–530

  35. Karim F, Majumdar S, Darabi H, Chen S (2017) LSTM fully convolutional networks for time series classification. IEEE Access 6:1662–1669

    Article  Google Scholar 

  36. Song X et al (2020) Time-series well performance prediction based on long short-term memory (LSTM) neural network model. J Petrol Sci Eng 186:106682

    Article  Google Scholar 

  37. Gers FA, Schmidhuber J, Cummins F (2000) Learning to forget: continual prediction with LSTM. Neural Comput 12(10):2451–2471

    Article  Google Scholar 

  38. Wang Z, Yan W, Oates T (2017) Time series classification from scratch with deep neural networks: a strong baseline. In 2017 International joint conference on neural networks (IJCNN). IEEE 1578–1585

  39. Niu Z, Zhong G, Yu H (2021) A review on the attention mechanism of deep learning. Neurocomputing 452:48–62

    Article  Google Scholar 

  40. Yuan Z, Yang Z, Ling Y, Wu C, Li C (2021) Spatiotemporal attention mechanism-based deep network for critical parameters prediction in chemical process. Process Saf Environ Prot 155:401–414

    Article  Google Scholar 

  41. Brownlee J (2018) What is the difference between a batch and an epoch in a neural network. Mach Learn Mastery 20

  42. Chai T, Draxler RR (2014) Root mean square error (RMSE) or mean absolute error (MAE)?–arguments against avoiding RMSE in the literature. Geoscientific model development 7(3):1247–1250

    Article  Google Scholar 

  43. Willmott CJ, Matsuura K (2005) Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Climate Res 30(1):79–82

    Article  Google Scholar 

  44. Song JY, Chang W, Song JW (2019) Cluster analysis on the structure of the cryptocurrency market via Bitcoin-Ethereum filtering. Physica A 527:121339

    Article  Google Scholar 

  45. Hansun S, Wicaksana A, Khaliq AQ (2022) Multivariate cryptocurrency prediction: comparative analysis of three recurrent neural networks approaches. J Big Data 9(1):1–15

    Article  Google Scholar 

  46. Awoke T, Rout M, Mohanty L, Satapathy SC (2021) Bitcoin price prediction and analysis using deep learning models in Communication Software and Networks. Springer pp. 631–640

  47. Tanwar S, Patel NP, Patel SN, Patel JR, Sharma G, Davidson IE (2021) Deep learning-based cryptocurrency price prediction scheme with inter-dependent relations. IEEE Access 9:138633–138646

    Article  Google Scholar 

  48. Livieris IE, Kiriakidou N, Stavroyiannis S, Pintelas P (2021) An advanced CNN-LSTM model for cryptocurrency forecasting. Electronics 10(3):287

    Article  Google Scholar 

  49. Derbentsev V, Matviychuk A, Soloviev VN (2020) Forecasting of cryptocurrency prices using machine learning in Advanced Studies of Financial Technologies and Cryptocurrency Markets. Springer pp. 211–231

  50. Tan X, Kashef R (2019) Predicting the closing price of cryptocurrencies: a comparative study in Proceedings of the Second International Conference on Data Science, E-Learning and Information Systems pp. 1–5

  51. Oyewola DO, Dada EG, Ndunagu JN (2022) A novel hybrid walk-forward ensemble optimization for time series cryptocurrency prediction. Heliyon 8(11)

  52. Amirshahi B, Lahmiri S (2023) Hybrid deep learning and GARCH-family models for forecasting volatility of cryptocurrencies. Machine Learning with Applications 12:100465

    Article  Google Scholar 

  53. Kang CY, Lee CP, Lim KM (2022) Cryptocurrency price prediction with convolutional neural network and stacked gated recurrent unit. Data 7(11):149

    Article  Google Scholar 

  54. Archak N, Ghose A, Ipeirotis PG (2011) Deriving the pricing power of product features by mining consumer reviews. Manage Sci 57(8):1485–1509

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Godfrey Joseph Saqware.

Ethics declarations

Competing Interests

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Saqware, G.J., B, I. Hybrid Deep Learning Model Integrating Attention Mechanism for the Accurate Prediction and Forecasting of the Cryptocurrency Market. Oper. Res. Forum 5, 19 (2024). https://doi.org/10.1007/s43069-024-00302-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s43069-024-00302-2

Keywords

Navigation