Submitted:
26 November 2025
Posted:
27 November 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
- A unified multivariate forecasting framework integrating numerous technical indicators derived from pandas_ta, enabling a richer and more representative feature space for cryptocurrency prediction.
- A systematic comparison of six deep learning architectures, covering both recurrent (LSTM) and transformer-based models (GPT-2, Informer, Autoformer, TFT, and Vanilla Transformer) under the same experimental conditions.
- An adaptation of GPT-2 for numerical time-series forecasting, demonstrating its potential beyond natural language processing tasks.
- An extensive evaluation of long-range dependency modeling using advanced transformer variants specifically designed for temporal sequences.
- A rigorous performance assessment through MSE, MAE, RMSE, MAPE, and R2, providing a multi-perspective understanding of forecasting accuracy.
- A detailed analysis of practical challenges related to data quality, normalization, missing-value handling, hyperparameter sensitivity, and computational complexity, offering guidance for future work.
2. Related Work
3. Materials and Methods
3.1. Dataset Description
3.2. Feature Engineering and Data Preprocessing
3.3. Model Architectures and Training Setup
3.3.1. LSTM
3.3.2. GPT-2
3.3.3. Informer
3.3.4. Autoformer
3.3.5. Temporal Fusion Transformer
3.3.6. Vanilla Transformer
3.4. Forecasting Pipeline
4. Experimental Results
- No single forecasting model is universally optimal across all assets, and performance differences are strongly asset-specific.
- Transformer-based models consistently outperform the LSTM baseline across all cryptocurrencies.
- Sparse-attention mechanisms, as implemented in Informer, offer substantial advantages in high-volatility environments.
- Decomposition-based architectures, such as Autoformer, are particularly effective when stable periodic structures are present in the data.
- Dynamic feature-weighting and gating, as employed by TFT, yield improved performance in markets characterised by regime shifts.
5. Discussion
6. Conclusions
- Transformer-based architectures capture long-range temporal dependencies more effectively than recurrent models.
- Sparse-attention and autoregressive mechanisms adapt well to asset-specific volatility structures.
- Weekly forecasting benefits from architectures that balance computational efficiency with contextual expressiveness.
- Early stopping and repeated temporal splits provide stable and unbiased evaluation.
- Multivariate feature construction enhances predictive signal density without inducing overfitting.
6.1. Research Limitations
6.2. Potential Future Research
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Chu, J.; Nadarajah, S.; Chan, S. Statistical analysis of cryptocurrencies using GARCH models. Physica A 2017, 492, 403–418. [Google Scholar]
- Poyser, O. Exploring the determinants of Bitcoin’s price: An application of Bayesian Structural Time Series. Finance Research Letters 2019, 29, 175–180. [Google Scholar]
- Corbet, S.; Hou, Y.; Hu, Y.; Oxley, L. Cryptocurrency volatility markets: An examination using high-frequency data. Research in International Business and Finance 2019, 49, 39–51. [Google Scholar]
- Fischer, T.; Krauss, C. Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research 2018, 270, 654–669. [Google Scholar] [CrossRef]
- Siami-Namini, S.; Tavakoli, N.; Siami Namin, A. A comparison of ARIMA and LSTM in forecasting time series. In Proceedings of the 2018 IEEE International Conference on Data Science and Advanced Analytics (DSAA), Turin, Italy; pp. 139–148.
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Advances in Neural Information Processing Systems, Long Beach, CA, USA; pp. 5998–6008.
- Zhou, H.; Zhang, S.; Peng, J.; Zhang, S.; Li, J.; Xiong, Q.; Zhang, W. Informer: Beyond efficient transformer for long sequence time-series forecasting. AAAI Conference on Artificial Intelligence 2021, 35, 11106–11115. [Google Scholar] [CrossRef]
- Lim, B.; Arik, S.Ö.; Loeff, N.; Pfister, T. Temporal Fusion Transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting 2021, 37, 1748–1764. [Google Scholar] [CrossRef]
- Wu, H.; Xiao, F.; Deng, Z.; Xu, M. Autoformer: Decomposition transformers with auto-correlation for long-term time series forecasting. NeurIPS 2021, 34, 22419–22430. [Google Scholar]
- Oreshkin, B.; Carpov, D.; Chapados, N.; Bengio, Y. N-BEATS: Neural basis expansion analysis for interpretable time series forecasting. ICLR 2020. [Google Scholar]
- Zhou, T.; Ma, Q.; Wen, Q.; Sun, L.; Jin, R.; Yang, F.; Zhou, J. FEDformer: Frequency enhanced decomposed transformer for long-term series forecasting. In Proceedings of the 39th International Conference on Machine Learning.
- Liu, W.; Wen, Q.; Zhou, T.; Yang, F.; Sun, L. Pyraformer: Low-complexity pyramidal attention for long-range time series modeling. International Conference on Learning Representations 2022. [Google Scholar]
- Alessandretti, L.; ElBahrawy, A.; Aiello, L.M.; Baronchelli, A. Anticipating cryptocurrency prices using machine learning. Complexity 2018, 2018, 1–16. [Google Scholar] [CrossRef]
- Shen, D.; Urquhart, A.; Wang, P. Bitcoin price forecasting using time series and machine learning models. Finance Research Letters 2020, 34, 101221. [Google Scholar]
- McNair, M.; Treleaven, P. GRU networks for cryptocurrency forecasting: An empirical study. Expert Systems 2021, 38, e12692. [Google Scholar]
- Atzori, M.; Di Tria, F.; Furfaro, A. A hybrid CNN–LSTM model for cryptocurrency forecasting. Expert Systems with Applications 2022, 187, 115922. [Google Scholar]
- Kim, J.; Lee, S.; Park, K. CryptoFormer: A transformer-based architecture for cryptocurrency price trend forecasting. IEEE Access 2023, 11, 35520–35533. [Google Scholar]
- Xu, Y.; Chen, J.; Li, Z. Long-horizon cryptocurrency forecasting using transformer-based financial sequence models. Applied Intelligence 2023, 53, 15411–15428. [Google Scholar]
- Wei, R.; Zhang, T.; Wang, K. Multi-market transformer for cross-cryptocurrency forecasting. Knowledge-Based Systems 2023, 259, 110087. [Google Scholar]
- Zhang, Y.; Li, F.; Chen, R. Graph-transformer networks for cryptocurrency movement prediction. Information Sciences 2024, 660, 119944. [Google Scholar]
- Wen, Q.; Zhou, T.; Zhang, C.; Chen, W.; Ma, Z.; Yang, F.; Sun, L. Transformers in time series: A survey. International Journal of Forecasting 2022, in press. [Google Scholar]
- Rasul, K.; Sheikh, A.S.; Schuster, I.; Bergmann, U.; Vollgraf, R. Autoregressive denoising diffusion models for multivariate probabilistic time series forecasting. ICML 2021. [Google Scholar]
- Zhang, Q.; Huang, M.; Deng, Z. Large language models for financial forecasting: A GPT-based approach. arXiv:2304.01255, arXiv:2304.01255.
- Mallqui, D.; Fernandes, R. Predicting cryptocurrency prices with machine learning and technical indicators. Financial Innovation 2019, 5, 1–20. [Google Scholar]
- Stefanini, L.; Ponzanelli, L.; Mocci, A. A multimodal deep learning approach for cryptocurrency trend prediction. Information Sciences 2022, 596, 15–32. [Google Scholar]
- Cao, Y.; Wang, H.; Ji, S. Enhancing Bitcoin price prediction with blockchain-based technical indicators. Finance Research Letters 2023, 56, 104178. [Google Scholar]
- Liu, H.; Sun, X.; Zhao, P. Hybrid metrics for cryptocurrency forecasting: Combining blockchain indicators and technical analysis. Expert Systems with Applications 2024, 237, 121744. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Computation 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Radford, A.; Wu, J.; Child, R.; Luan, D.; Amodei, D.; Sutskever, I. Language Models are Unsupervised Multitask Learners. OpenAI Technical Report 2019. [Google Scholar]



| Indicator | Description |
|---|---|
| MA | Moving average capturing long-term trend direction. |
| EMA | Exponential moving average emphasizing recent changes. |
| RSI | Oscillator identifying overbought/oversold regimes. |
| MACD | EMA-based momentum indicator signaling trend shifts. |
| BBANDS | Bollinger Bands quantifying relative price volatility. |
| ATR | Volatility measure based on intra-period range. |
| CCI | Statistical deviation of price from its mean. |
| STOCH | Stochastic oscillator (k, d) comparing close to range. |
| WILLR | Williams %R momentum reversal indicator. |
| ROC | Rate-of-change momentum metric. |
| CMF | Chaikin Money Flow combining price with volume. |
| MOM | Momentum based on price differences. |
| OBV | Volume accumulation/distribution measure. |
| AD | Indicator mixing volume with price directionality. |
| PSAR | Trend-following Parabolic SAR highlighting reversals. |
| Model | Layers | Hidden/ | Heads | Seq. | Batch | LR | Epochs |
|---|---|---|---|---|---|---|---|
| LSTM | 2 LSTM + dense | 64 | – | L | 64 | 100 | |
| GPT-2 | 4 dec. blocks | 128 | 4 | L | 64 | 100 | |
| Informer | 2 enc. + 1 dec. | 128 | 4 | L | 64 | 100 | |
| Autoformer | 2 enc. + 1 dec. | 128 | 4 | L | 64 | 100 | |
| TFT | recur. + gating | 64 | 4 | L | 64 | 100 | |
| Vanilla TF | 2 enc. blocks | 128 | 4 | L | 64 | 100 |
| Asset | Model | MSE | RMSE | MAE | MAPE | |
|---|---|---|---|---|---|---|
| BTC | LSTM | 0.0016 | 0.0398 | 0.0292 | 0.0563 | 0.9671 |
| BTC | GPT-2 | 0.0007 | 0.0271 | 0.0172 | 0.0289 | 0.9773 |
| BTC | Informer | 0.0055 | 0.0741 | 0.0567 | 0.1299 | 0.8301 |
| BTC | Autoformer | 0.0070 | 0.0837 | 0.0499 | 0.1233 | 0.7849 |
| BTC | TFT | 0.0049 | 0.0700 | 0.0449 | 0.0830 | 0.8445 |
| BTC | Vanilla TF | 0.0010 | 0.0318 | 0.0178 | 0.0433 | 0.9572 |
| ETH | LSTM | 0.0003 | 0.0180 | 0.0118 | 0.0729 | 0.8428 |
| ETH | GPT-2 | 0.0008 | 0.0285 | 0.0175 | 0.0497 | 0.9365 |
| ETH | Informer | 0.0003 | 0.0171 | 0.0106 | 0.0395 | 0.8467 |
| ETH | Autoformer | 0.0006 | 0.0257 | 0.0118 | 0.0198 | 0.8905 |
| ETH | TFT | 0.0004 | 0.0191 | 0.0129 | 0.0485 | 0.8207 |
| ETH | Vanilla TF | 0.0006 | 0.0261 | 0.0175 | 0.1229 | 0.8843 |
| XRP | LSTM | 0.0007 | 0.0258 | 0.0212 | 0.1127 | 0.8979 |
| XRP | GPT-2 | 0.0003 | 0.0180 | 0.0125 | 0.0637 | 0.9243 |
| XRP | Informer | 0.0001 | 0.0116 | 0.0090 | 0.0418 | 0.9576 |
| XRP | Autoformer | 0.0028 | 0.0528 | 0.0203 | 0.1176 | 0.8359 |
| XRP | TFT | 0.0011 | 0.0327 | 0.0228 | 0.0702 | 0.8232 |
| XRP | Vanilla TF | 0.0012 | 0.0332 | 0.0235 | 0.1081 | 0.7527 |
| XLM | LSTM | 0.0002 | 0.0131 | 0.0122 | 0.0623 | 0.9011 |
| XLM | GPT-2 | 0.0004 | 0.0205 | 0.0154 | 0.0564 | 0.9076 |
| XLM | Informer | 0.0001 | 0.0120 | 0.0095 | 0.0469 | 0.9648 |
| XLM | Autoformer | 0.0011 | 0.0327 | 0.0221 | 0.0608 | 0.8293 |
| XLM | TFT | 0.0009 | 0.0317 | 0.0182 | 0.0758 | 0.8360 |
| XLM | Vanilla TF | 0.0008 | 0.0282 | 0.0140 | 0.0478 | 0.8735 |
| SOL | LSTM | 0.0002 | 0.0152 | 0.0124 | 0.0980 | 0.8788 |
| SOL | GPT-2 | 0.0002 | 0.0186 | 0.0109 | 0.0748 | 0.9370 |
| SOL | Informer | 0.0013 | 0.0368 | 0.0229 | 0.2103 | 0.8405 |
| SOL | Autoformer | 0.0020 | 0.0443 | 0.0199 | 0.1846 | 0.7495 |
| SOL | TFT | 0.0008 | 0.0277 | 0.0166 | 0.0578 | 0.9023 |
| SOL | Vanilla TF | 0.0002 | 0.0142 | 0.0102 | 0.1562 | 0.7247 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).