Ethereum Price Prediction with a GRU--Transformer Encoder Hybrid Model
نویسندگان
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
3 Department of Mathematics, Shahid Rajaee Teacher Training University, Tehran, Iran
doi
10.22054/jmmf.2025.87542.1204چکیده
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.