Predicting Bitcoin and Ethereum prices using long short-term memory and gated recurrent unit


  • M.H. Abdul Hadi Centre for Mathematical Science Universiti Malaysia Pahang Al-Sultan Abdullah, Lebuhraya Persiaran Tun Khalil Yaakob, 26300 Gambang, Pahang, Malaysia.
  • N.A. Ramli Centre for Mathematical Sciences, Universiti Malaysia Pahang Al-Sultan Abdullah, Lebuhraya Persiaran Tun Khalil Yaakob, 26300 Kuantan, Pahang, Malaysia
  • Q.U.I. Islam Department of Electrical and Computer Engineering College of Engineering, Dhofar University Salalah, Sultanate of Oman



Bitcoin, Ethereum, Long-Short Term Memory, Cryptocurrency, Predictive Modelling


Predicting future prices of cryptocurrencies, including Bitcoin and Ethereum, presents a formidable challenge owing to their inherent volatility. This study applies Long Short-Term Memory (LSTM), a well-established recurrent neural network for time series forecasting, to predict Bitcoin and Ethereum values. Historical price data for both cryptocurrencies, sourced from Yahoo Finance, serves as the basis for analysis. The dataset undergoes an 80% training and 20% testing partition. Subsequently, LSTM models are developed and trained on both datasets. In parallel, the gated recurrent unit (GRU), recognized as an advanced variant of the LSTM model, is explored for comparative purposes. Performance evaluation utilizes fundamental metrics, including root mean squared error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). The results reveal an intriguing trend: both models exhibit superior performance when applied to the Ethereum dataset compared to the Bitcoin dataset. This observation suggests the potential presence of Ethereum-specific features or patterns that align more effectively with deep learning model architectures. Notably, the GRU model consistently outperforms the LSTM model across RMSE, MAE, and MAPE. These outcomes underscore the GRU model’s capacity as a robust tool for cryptocurrency value prediction. In summary, this study tackles the challenge of cryptocurrency price prediction while emphasizing the promising role of advanced neural network architectures, such as GRU, in enhancing prediction accuracy, thus offering valuable insights into financial forecasting.


Ozturk Birim S. An analysis for cryptocurrency price prediction using LSTM, GRU, and the Bi-directional implications. Developments in Financial and Economic Fields at the National and Global Scale. 2022; 163-184.

Yao Y, Yi J, Zhai S, Lin Y, Kim T, Zhang G, Lee LY. Predictive analysis of cryptocurrency price using deep learning. International Journal of Engineering & Technology. 2018;7(3.27):258-64.

Salman MK, Ibrahim AA. Price prediction of different cryptocurrencies using technical trade indicators and machine learning. In: IOP Conference Series: Materials Science and Engineering 2020 Nov 1; 928(3): 032007.

Murugesan R, Shanmugaraja V, Vadivel A. Forecasting Bitcoin Price Using Interval Graph and ANN Model: A Novel Approach. SN Computer Science. 2022 Aug 2;3(5):411.

Lahmiri S, Saade RG, Morin D, Nebebe F. An artificial neural networks-based ensemble system to forecast bitcoin daily trading volume. In: 2020 5th International Conference on Cloud Computing and Artificial Intelligence: Technologies and Applications (CloudTech). 2020 Nov 24; pp. 1-4.

Singh A, Kumar A, Akhtar Z. Bitcoin price prediction: A deep learning approach. In: 2021 8th International Conference on Signal Processing and Integrated Networks (SPIN) 2021 Aug 26; pp. 1053-58.

Gauriau O, Galárraga L, Brun F, Termier A, Davadan L, Joudelat F. Comparing machine-learning models of different levels of complexity for crop protection: A look into the complexity-accuracy tradeoff. Smart Agricultural Technology. 2024 Mar 1;7:100380.

Gyamerah SA. Two-stage hybrid machine learning model for high-frequency intraday bitcoin price prediction based on technical indicators, variational mode decomposition, and support vector regression. Complexity. 2021 Dec 7;2021:1-5.

Ammer MA, Aldhyani TH. Deep learning algorithm to predict cryptocurrency fluctuation prices: Increasing investment awareness. Electronics. 2022 Jul 28;11(15):2349.

Sebastião H, Godinho P. Forecasting and trading cryptocurrencies with machine learning under changing market conditions. Financial Innovation. 2021 Dec;7(3):1-30.

Alahmari SA. Using machine learning ARIMA to predict the price of cryptocurrencies. The ISC International Journal of Information Security. 2019 Aug 1;11(3):139-44.

Fleischer JP, von Laszewski G, Theran C, Parra Bautista YJ. Time series analysis of cryptocurrency prices using long short-term memory. Algorithms. 2022 Jul 1;15(7):230.

Dimitriadou A, Gregoriou A. Predicting Bitcoin Prices Using Machine Learning. Entropy. 2023 May 10;25(5):777.

Shivam A. Bitcoin Mining: Everything You Need to Know! Retrieved from; 24 July 2023.

Yahoo! Finance. Cryptocurrency prices. Retrieved from; 17 March 2023.




How to Cite

Abdul Hadi, M. H., Ramli, N. A., & UI Islam, Q. (2023). Predicting Bitcoin and Ethereum prices using long short-term memory and gated recurrent unit. Data Analytics and Applied Mathematics (DAAM), 4(2), 8–17.



Research Articles