Table of Contents
Fetching ...

A Novel Hybrid Approach Using an Attention-Based Transformer + GRU Model for Predicting Cryptocurrency Prices

Esam Mahdi, C. Martin-Barreiro, X. Cabezas

TL;DR

The paper tackles the challenge of volatile cryptocurrency price forecasting by introducing a novel hybrid architecture that combines an attention-based Transformer encoder with a GRU decoder to model both long-range and short-term dependencies. The model is trained on Bitcoin and Ethereum data using features $P$, $V$, and the Fear and Greed Index $F$, and is evaluated against four baselines using metrics $MSE$, $RMSE$, $MAE$, and $MAPE$, supplemented by Friedman and Wilcoxon tests. The results show that the Transformer + GRU hybrid achieves superior accuracy across both assets, with substantial reductions in error metrics compared to RBFN, GRNN, BiGRU, and BiLSTM. The study demonstrates the potential of multi-scale hybrid architectures for real-time financial analytics in cryptocurrency markets, while noting limitations such as the focus on only two assets and a fixed lag structure, suggesting avenues for broader application and further optimization.

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 the 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 performance of the model 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 nonparametric Friedman test followed by a post hoc Wilcoxon signed rank test. The results demonstrate that our hybrid model consistently achieves superior accuracy, highlighting its effectiveness for financial prediction tasks. These findings provide valuable insights for improving real-time decision making in cryptocurrency markets and support the growing use of hybrid deep learning models in financial analytics.

A Novel Hybrid Approach Using an Attention-Based Transformer + GRU Model for Predicting Cryptocurrency Prices

TL;DR

The paper tackles the challenge of volatile cryptocurrency price forecasting by introducing a novel hybrid architecture that combines an attention-based Transformer encoder with a GRU decoder to model both long-range and short-term dependencies. The model is trained on Bitcoin and Ethereum data using features , , and the Fear and Greed Index , and is evaluated against four baselines using metrics , , , and , supplemented by Friedman and Wilcoxon tests. The results show that the Transformer + GRU hybrid achieves superior accuracy across both assets, with substantial reductions in error metrics compared to RBFN, GRNN, BiGRU, and BiLSTM. The study demonstrates the potential of multi-scale hybrid architectures for real-time financial analytics in cryptocurrency markets, while noting limitations such as the focus on only two assets and a fixed lag structure, suggesting avenues for broader application and further optimization.

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 the 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 performance of the model 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 nonparametric Friedman test followed by a post hoc Wilcoxon signed rank test. The results demonstrate that our hybrid model consistently achieves superior accuracy, highlighting its effectiveness for financial prediction tasks. These findings provide valuable insights for improving real-time decision making in cryptocurrency markets and support the growing use of hybrid deep learning models in financial analytics.

Paper Structure

This paper contains 10 sections, 17 equations, 9 figures, 5 tables.

Figures (9)

  • Figure 1: Architecture of a radial basis function network (RBFN).
  • Figure 2: Architecture of long-short-term memory (LSTM) network contains four interacting layers.
  • Figure 3: Architecture of gated recurrent unit (GRU) network.
  • Figure 4: Architecture of bidirectional gated recurrent unit (BiGRU).
  • Figure 5: Architecture of hybrid Transformer $+$ GRU model.
  • ...and 4 more figures