CRYPTOCURRENCY TIME SERIES FORECASTING MODEL USING GRU ALGORITHM BASED ON MACHINE LEARNING
Abstract
The cryptocurrency market is experiencing rapid growth in the world. The high fluctuation and volatility of cryptocurrency prices and the complexity of non-linear relationships in data patterns attract investors and researchers who want to develop accurate cryptocurrency price forecasting models. This research aims to build a cryptocurrency forecasting model with a machine learning-based time series approach using the gated recurrent units (GRU) algorithm. The dataset used is historical Bitcoin closing price data from January 1, 2017, to July 31, 2024. Based on the gap in previous research, the selected model is only based on the accuracy value. In this study, the chosen model must fulfill two criteria: the best-fitting model based on the learning curve diagnosis and the model with the best accuracy value. The selected model is used to forecast the test data. Model selection with these two criteria has resulted in high accuracy in model performance. This research was highly accurate for all tested models with MAPE < 10%. The GRU 30-50 model is best tested with MAE = 867.2598, RMSE = 1330.427, and MAPE = 1.95%. Applying the sliding window technique makes the model accurate and fast in learning the pattern of time series data, resulting in a best-fitting model based on the learning curve diagnosis.
Downloads
References
N. N. AlMadany, O. Hujran, G. Al Naymat, and A. Maghyereh, “FORECASTING CRYPTOCURRENCY RETURNS USING CLASSICAL STATISTICAL AND DEEP LEARNING TECHNIQUES,” Int. J. Inf. Manag. Data Insights, vol. 4, no. 2, p. 100251, 2024, doi: https://doi.org/10.1016/j.jjimei.2024.100251.
D. Chuen, L. Guo, and Y. Wang, “CRYPTOCURRENCY: A NEW INVESTMENT OPPORTUNITY?,” J. Altern. Investments, vol. 20, pp. 16–40, Dec. 2017, doi: https://doi.org/10.3905/jai.2018.20.3.016.
Y. Wei, Y. Wang, B. M. Lucey, and S. A. Vigne, “CRYPTOCURRENCY UNCERTAINTY AND VOLATILITY FORECASTING OF PRECIOUS METAL FUTURES MARKETS,” J. Commod. Mark., vol. 29, p. 100305, 2023, doi: https://doi.org/10.1016/j.jcomm.2022.100305.
Z. Umar, N. Trabelsi, and F. Alqahtani, “CONNECTEDNESS BETWEEN CRYPTOCURRENCY AND TECHNOLOGY SECTORS: INTERNATIONAL EVIDENCE,” Int. Rev. Econ. Financ., vol. 71, pp. 910–922, 2021, doi: https://doi.org/10.1016/j.iref.2020.10.021.
S. Corbet, B. Lucey, A. Urquhart, and L. Yarovaya, “CRYPTOCURRENCIES AS A FINANCIAL ASSET: A SYSTEMATIC ANALYSIS,” Int. Rev. Financ. Anal., vol. 62, pp. 182–199, 2019, doi: https://doi.org/10.1016/j.irfa.2018.09.003.
F. Iqbal, M. Zahid, and D. Koutmos, “CRYPTOCURRENCY TRADING AND DOWNSIDE RISK,” Risks, vol. 11, no. 7, pp. 1–18, 2023, doi: https://doi.org/10.3390/risks11070122.
L. R. Janjua, I. Gigauri, A. Wójcik-Czerniawska, and E. Pohulak-Żołędowska, “RISK MANAGEMENT IN THE AREA OF BITCOIN MARKET DEVELOPMENT: EXAMPLE FROM THE USA,” Risks, vol. 12, no. 4, pp. 1–21, 2024, doi: https://doi.org/10.3390/risks12040067.
G. Dudek, P. Fiszeder, P. Kobus, and W. Orzeszko, “FORECASTING CRYPTOCURRENCIES VOLATILITY USING STATISTICAL AND MACHINE LEARNING METHODS: A COMPARATIVE STUDY,” Appl. Soft Comput., vol. 151, p. 111132, 2024, doi: https://doi.org/10.1016/j.asoc.2023.111132.
C. Jin and Y. Li, “CRYPTOCURRENCY PRICE PREDICTION USING FREQUENCY DECOMPOSITION AND DEEP LEARNING,” Fractal Fract., vol. 7, no. 10, pp. 1–29, 2023, doi: https://doi.org/10.3390/fractalfract7100708.
Melina, Sukono, H. Napitupulu, and N. Mohamed, “A CONCEPTUAL MODEL OF INVESTMENT-RISK PREDICTION IN THE STOCK MARKET USING EXTREME VALUE THEORY WITH MACHINE LEARNING: A SEMISYSTEMATIC LITERATURE REVIEW,” Risks, vol. 11, no. 3, pp. 1–24, 2023, doi: https://doi.org/10.3390/risks11030060.
M. Melina, Sukono, H. Napitupulu, and N. Mohamed, “MODELING OF MACHINE LEARNING-BASED EXTREME VALUE THEORY IN STOCK INVESTMENT RISK PREDICTION: A SYSTEMATIC LITERATURE REVIEW,” Big Data, pp. 1–20, Jan. 2024, doi: https://doi.org/10.1089/big.2023.0004.
B. Amirshahi and S. Lahmiri, “HYBRID DEEP LEARNING AND GARCH-FAMILY MODELS FOR FORECASTING VOLATILITY OF CRYPTOCURRENCIES,” Mach. Learn. with Appl., vol. 12, p. 100465, 2023, doi: https://doi.org/10.1016/j.mlwa.2023.100465.
M. Melina et al., “COMPARATIVE ANALYSIS OF TIME SERIES FORECASTING MODELS USING ARIMA AND NEURAL NETWORK AUTOREGRESSION METHODS,” BAREKENG J. Ilmu Mat. dan Terap., vol. 18, no. 4, pp. 2563–2576, Oct. 2024, doi: 1 https://doi.org/10.30598/barekengvol18iss4pp2563-2576.
P. L. Seabe, C. R. Moutsinga, and E. Pindza, “FORECASTING CRYPTOCURRENCY PRICES USING LSTM, GRU, AND BI-DIRECTIONAL LSTM: A DEEP LEARNING APPROACH,” Fractal Fract., vol. 7, no. 2, pp. 1–18, 2023, doi: https://doi.org/10.3390/fractalfract7020203.
S. Hochreiter and J. Schmidhuber, “LONG SHORT-TERM MEMORY,” Neural Comput., vol. 9, no. 8, pp. 1735–1780, Nov. 1997, doi: https://doi.org/10.1162/neco.1997.9.8.1735.
J. A. Adisa, S. Ojo, P. A. Owolawi, A. Pretorius, and S. O. Ojo, “THE EFFECT OF IMBALANCED DATA AND PARAMETER SELECTION VIA GENETIC ALGORITHM LONG SHORT-TERM MEMORY (LSTM) FOR FINANCIAL DISTRESS PREDICTION,” IAENG Int. J. Appl. Math., vol. 53, no. 3, pp. 796–809, 2023.
I. Siregar, A. Nugraha, K. Notodiputro, Y. Angraini, and L. Mualifah, “THE COMPARISON OF LONG SHORT-TERM MEMORY AND BIDIRECTIONAL LONG SHORT-TERM MEMORY FOR FORECASTING COAL PRICE,” BAREKENG J. Ilmu Mat. dan Terap., vol. 19, no. 1 SE-Articles, Jan. 2025, doi: https://doi.org/10.30598/barekengvol19iss1pp245-258.
K. Cho et al., “LEARNING PHRASE REPRESENTATIONS USING RNN ENCODER-DECODER FOR STATISTICAL MACHINE TRANSLATION,” in Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing ({EMNLP}), A. Moschitti, B. Pang, and W. Daelemans, Eds., Doha, Qatar: Association for Computational Linguistics, Oct. 2014, pp. 1724–1734. doi: https://doi.org/10.3115/v1/D14-1179.
M. F. Rizkilloh and S. Widiyanesti, “PREDIKSI HARGA CRYPTOCURRENCY MENGGUNAKAN ALGORITMA LONG SHORT TERM MEMORY (LSTM),” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 6, no. 1, pp. 25–31, Feb. 2022, doi: https://doi.org/10.29207/resti.v6i1.3630.
M. A. Maliki, I. Cholissodin, and N. Yudistira, “PREDIKSI PERGERAKAN HARGA CRYPTOCURRENCY BITCOIN TERHADAP MATA UANG RUPIAH MENGGUNAKAN ALGORITME LSTM,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 6, no. 7, pp. 3259–3268, Aug. 2022.
Y. Wang, G. Andreeva, and B. Martin-Barragan, “MACHINE LEARNING APPROACHES TO FORECASTING CRYPTOCURRENCY VOLATILITY: CONSIDERING INTERNAL AND EXTERNAL DETERMINANTS,” Int. Rev. Financ. Anal., vol. 90, p. 102914, 2023, doi: https://doi.org/10.1016/j.irfa.2023.102914.
A. Bouteska, M. Z. Abedin, P. Hajek, and K. Yuan, “CRYPTOCURRENCY PRICE FORECASTING – A COMPARATIVE ANALYSIS OF ENSEMBLE LEARNING AND DEEP LEARNING METHODS,” Int. Rev. Financ. Anal., vol. 92, p. 103055, 2024, doi: https://doi.org/10.1016/j.irfa.2023.103055.
K. E. ArunKumar, D. V Kalaga, C. Mohan Sai Kumar, M. Kawaji, and T. M. Brenza, “COMPARATIVE ANALYSIS OF GATED RECURRENT UNITS (GRU), LONG SHORT-TERM MEMORY (LSTM) CELLS, AUTOREGRESSIVE INTEGRATED MOVING AVERAGE (ARIMA), SEASONAL AUTOREGRESSIVE INTEGRATED MOVING AVERAGE (SARIMA) FOR FORECASTING COVID-19 TRENDS,” Alexandria Eng. J., vol. 61, no. 10, pp. 7585–7603, 2022, doi: https://doi.org/10.1016/j.aej.2022.01.011.
A. Viéitez, M. Santos, and R. Naranjo, “MACHINE LEARNING ETHEREUM CRYPTOCURRENCY PREDICTION AND KNOWLEDGE-BASED INVESTMENT STRATEGIES,” Knowledge-Based Syst., vol. 299, p. 112088, 2024, doi: https://doi.org/10.1016/j.knosys.2024.112088.
P. Jaquart, S. Köpke, and C. Weinhardt, “MACHINE LEARNING FOR CRYPTOCURRENCY MARKET PREDICTION AND TRADING,” J. Financ. Data Sci., vol. 8, pp. 331–352, 2022, doi: https://doi.org/10.1016/j.jfds.2022.12.001.
Sukono et al., “MODELING OF MEAN-VALUE-AT-RISK INVESTMENT PORTFOLIO OPTIMIZATION CONSIDERING LIABILITIES AND RISK-FREE ASSETS,” Computation, vol. 12, no. 6, pp. 1–18, 2024, doi: https://doi.org/10.3390/computation12060120.
J. H. Lee and J. K. Hong, “COMPARATIVE PERFORMANCE ANALYSIS OF VIBRATION PREDICTION USING RNN TECHNIQUES,” Electron., vol. 11, no. 21, p. 3619, 2022, doi: https://doi.org/10.3390/electronics11213619.
Y. Su and C.-C. J. Kuo, “ON EXTENDED LONG SHORT-TERM MEMORY AND DEPENDENT BIDIRECTIONAL RECURRENT NEURAL NETWORK,” Neurocomputing, vol. 356, pp. 151–161, 2019, doi: https://doi.org/10.1016/j.neucom.2019.04.044.
M. Melina, Sukono, H. Napitupulu, and N. Mohamed, “INVESTMENT RISK FORECASTING MODEL USING EXTREME VALUE THEORY APPROACH COMBINED WITH MACHINE LEARNING,” AIMS Math., vol. 9, no. 11, pp. 33314–33352, 2024, doi: https://doi.org/10.3934/math.20241590.
A. Rahmadeyan and Mustakim, “LONG SHORT-TERM MEMORY AND GATED RECURRENT UNIT FOR STOCK PRICE PREDICTION,” Procedia Comput. Sci., vol. 234, pp. 204–212, 2024, doi: https://doi.org/10.1016/j.procs.2024.02.167.
M. S. Alam, M. Murshed, P. Manigandan, D. Pachiyappan, and S. Z. Abduvaxitovna, “FORECASTING OIL, COAL, AND NATURAL GAS PRICES IN THE PRE-AND POST-COVID SCENARIOS: CONTEXTUAL EVIDENCE FROM INDIA USING TIME SERIES FORECASTING TOOLS,” Resour. Policy, vol. 81, p. 103342, 2023, doi: https://doi.org/10.1016/j.resourpol.2023.103342.
H. Ihsan, I. Irwan, and A. Nensi, “IMPLEMENTATION OF BACKPROPAGATION AND HYBRID ARIMA-NN METHODS IN PREDICTING ACCURACY LEVELS OF RAINFALL IN MAKASSAR CITY,” BAREKENG J. Ilmu Mat. dan Terap., vol. 18, no. 4, pp. 2435–2448, Oct. 2024, doi: https://doi.org/10.30598/barekengvol18iss4pp2435-2448.
R. Wasono, Y. Fitri, and M. Haris, “FORECASTING THE NUMBER OF AIRPLANE PASSENGERS USING HOLT WINTER’S EXPONENTIAL SMOOTHING METHOD AND EXTREME LEARNING MACHINE METHOD,” BAREKENG J. Ilmu Mat. dan Terap., vol. 18, no. 1, pp. 427–436, 2024, doi: https://doi.org/10.30598/barekengvol18iss1pp0427-0436.
C. C. Aggarwal, NEURAL NETWORKS AND DEEP LEARNING. Cham: Springer International Publishing, 2018.
Z. Zhan and S.-K. Kim, “VERSATILE TIME-WINDOW SLIDING MACHINE LEARNING TECHNIQUES FOR STOCK MARKET FORECASTING,” Artif. Intell. Rev., vol. 57, no. 8, p. 209, 2024, doi: https://doi.org/10.1007/s10462-024-10851-x.
Copyright (c) 2025 Melina Melina, Sukono Sukono, Herlina Napitupulu, Norizan Mohamed, Yulison Herry Chrisnanto, Asep ID Hadiana, Valentina Adimurti Kusumaningtyas

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this Journal agree to the following terms:
- Author retain copyright and grant the journal right of first publication with the work simultaneously licensed under a creative commons attribution license that allow others to share the work within an acknowledgement of the work’s authorship and initial publication of this journal.
- Authors are able to enter into separate, additional contractual arrangement for the non-exclusive distribution of the journal’s published version of the work (e.g. acknowledgement of its initial publication in this journal).
- Authors are permitted and encouraged to post their work online (e.g. in institutional repositories or on their websites) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published works.