Document Type : Research Article
Authors
1 Department of Mathematics, Faculty of Statistics, Mathematics and Computer Science, Allameh Tabataba'i University, Tehran, Iran
2 Department of Mathematics, Shahid Rajaee Teacher Training University, Tehran, Iran
Abstract
Predicting the price of Ethereum remains a significant challenge due to the extreme volatility and nonlinear dynamics inherent in the cryptocurrency market. This study proposes a novel hybrid model that integrates a Gated Recurrent Unit (GRU) with a Transformer Encoder to effectively capture both short-term and long-term temporal dependencies for enhanced Ethereum price forecasting. The model was trained on daily historical data from 2017 to 2023. The dataset, sourced from Yahoo Finance, includes Ethereums open, high, and low prices, along with its trading volume. Additionally, Bitcoins closing price and two technical indicators, On-Balance Volume (OBV) and Average True Range (ATR), were incorporated. Pearson and Spearman correlation analyses confirmed strong interdependencies among the selected features. The model underwent training for 90 epochs, utilizing the Mean Squared Error (MSE) as the loss function and the Adam optimizer. Under identical experimental conditions, the proposed hybrid model significantly outperformed several baseline architectures, including standalone GRU, Long Short-Term Memory (LSTM), Convolutional Neural Network (CNN), Transformer Encoder, and CNN–GRU hybrid models. Specifically, the model achieved a Mean Absolute Error (MAE) of 0.007199 (equivalent to $34.03), which is considerably lower than Ethereums average daily price fluctuation of $74.73. These findings demonstrate that the GRU–Transformer Encoder hybrid model is highly effective in extracting intricate patterns from volatile financial time series. Consequently, it can serve as a practical and robust tool for market trend analysis and risk management.
Keywords
LSTM–GRU, The Indonesian Journal of Computer Science, 13 (2024), no. 4.
[2] K. Cho, B. van Merrienboer, 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).
[3] 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).
[4] J. E. Granville, Granville’s New Key to Stock Market Profits, Pickle Partners Publishing,
2018.
[5] R. Kaur, M. Uppal, D. Gupta, S. Juneja, S. Y. Arafat, J. Rashid, J. Kim and R. Alroobaea, Development of a cryptocurrency price prediction model: leveraging GRU and
LSTM for Bitcoin, Litecoin and Ethereum, PeerJ Computer Science, 11 (2025), e2675.
[6] D. P. Kingma and J. Ba, Adam: A method for stochastic optimization, arXiv preprint
arXiv:1412.6980, (2014).
[7] M. C. Lee, Temporal Fusion Transformer-based trading strategy for multi-crypto assets using
on-chain and technical indicators, Systems, 13 (2025), no. 6, 474.
[8] E. Mahdi, C. Martin-Barreiro and X. Cabezas, A novel hybrid approach using an
attention-based Transformer+GRU model for predicting cryptocurrency prices, Mathematics,
13 (2025), no. 9, 1484.
[9] S. Monish, M. Mohta and S. Rangaswamy, Ethereum price prediction using machine
learning techniques – A comparative study, International Journal of Engineering Applied
Sciences and Technology, 7 (2022), 137–142.
[10] A. Mohammadjafari, Comparative study of Bitcoin price prediction, arXiv preprint
arXiv:2405.08089, (2024).
[11] K. Murray, A. Rossi, D. Carraro and A. Visentin, On forecasting cryptocurrency prices:
A comparison of machine learning, deep learning, and ensembles, Forecasting, 5 (2023), no. 1,
196–209.
[12] A. Saputra, A. N. Hidayat and D. Siahaan, Ethereum price prediction using LSTM
and GRU, Proc. 5th Int. Conf. on Computer and Communication Engineering Technology
(CCET), (2025).
[13] S. Siami-Namini and A. Siami Namin, Forecasting economics and financial time series:
ARIMA vs. LSTM, arXiv preprint arXiv:1803.06386, (2018).
[14] S. Tanwar, N. P. Patel, S. N. Patel, J. R. Patel, G. Sharma and I. E. Davidson, Deep
learning-based cryptocurrency price prediction scheme with inter-dependent relations, IEEE
Access, 9 (2021), 138633–138646.
[15] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser
and I. Polosukhin, Attention is all you need, Advances in Neural Information Processing
Systems, 30 (2017).
[16] J. W. Wilder Jr., New Concepts in Technical Trading Systems, Trend Research, Greensboro, NC, 1978.