A Novel Hybrid Approach Using an Attention-Based Transformer + GRU Model for Predicting Cryptocurrency Prices
Esam Mahdi (),
Carlos Martin-Barreiro and
Xavier Cabezas
Additional contact information
Esam Mahdi: School of Mathematics and Statistics, Carleton University, Ottawa, ON K1S 5B6, Canada
Carlos Martin-Barreiro: Facultad de Ingeniería, Universidad Espíritu Santo, Samborondón 0901952, Ecuador
Xavier Cabezas: Facultad de Ciencias Naturales y Matemáticas, Escuela Superior Politécnica del Litoral ESPOL, Guayaquil 090902, Ecuador
Mathematics, 2025, vol. 13, issue 9, 1-19
Abstract:
In this article, we introduce a novel deep learning hybrid model that integrates attention Transformer and gated recurrent unit (GRU) architectures to improve the accuracy of cryptocurrency price predictions. By combining the Transformer’s strength in capturing long-range patterns with GRU’s ability to model short-term and sequential trends, the hybrid model provides a well-rounded approach to time series forecasting. We apply the model to predict the daily closing prices of Bitcoin and Ethereum based on historical data that include past prices, trading volumes, and the Fear and Greed Index. We evaluate the performance of our proposed model by comparing it with four other machine learning models, two are non-sequential feedforward models: radial basis function network (RBFN) and general regression neural network (GRNN), and two are bidirectional sequential memory-based models: bidirectional long short-term memory (BiLSTM) and bidirectional gated recurrent unit (BiGRU). The model’s performance is assessed using several metrics, including mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE), along with statistical validation through the non-parametric Friedman test followed by a post hoc Wilcoxon signed-rank test. Results demonstrate that our hybrid model consistently achieves superior accuracy, highlighting its effectiveness for financial prediction tasks. These findings provide valuable insights for enhancing real-time decision making in cryptocurrency markets and support the growing use of hybrid deep learning models in financial analytics.
Keywords: Bitcoin; cryptocurrencies; deep learning; Ethereum; Fear and Greed Index; gated recurrent unit; general regression neural network; long short-term memory; radial basis function network; transformer model (search for similar items in EconPapers)
JEL-codes: C (search for similar items in EconPapers)
Date: 2025
References: Add references at CitEc
Citations:
Downloads: (external link)
https://www.mdpi.com/2227-7390/13/9/1484/pdf (application/pdf)
https://www.mdpi.com/2227-7390/13/9/1484/ (text/html)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:gam:jmathe:v:13:y:2025:i:9:p:1484-:d:1646790
Access Statistics for this article
Mathematics is currently edited by Ms. Emma He
More articles in Mathematics from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().