Machine Learning Framework for Predicting Cryptocurrency Return Trends: A Comparative Study

Document Type : Original Article

Authors

1 Corresponding Author, Assistance Prof, Department of Industrial Engineering, Faculty of Engineering, Khatam University, Tehran, Iran. Email: p.peykani@khatam.ac.ir

2 MSc Student, Department of Industrial Engineering, Faculty of Engineering, Khatam University, Tehran, Iran. Email: daniyalsabour@gmail.com

Abstract

Cryptocurrency markets are highly volatile, making return forecasting both valuable and difficult. This study develops a machine learning framework for predicting cryptocurrency return trends, formulated as a three-class problem (negative, near-zero, and positive next-day returns) rather than the conventional binary one. XGBoost, Random Forest, and Support Vector Machine (SVM) were evaluated on Bitcoin, Ethereum, and Solana using daily data from December 2024 to July 2025. The features combined technical indicators with macroeconomic variables, and hyperparameters were tuned via Bayesian Optimization using the Optuna framework. Performance was assessed by classification accuracy and per-class precision, recall, and F1-score. Average accuracies generally exceeded 60%. SVM achieved the highest average accuracy, while XGBoost was the most stable across assets and return classes. Positive returns were predicted more reliably than near-zero and negative returns, though strong positive-class recall was not always matched by precision. The results suggest the potential of combining machine learning, technical indicators, and macroeconomic variables for return-trend prediction. As they derive from a single test window and three assets, they should be read as indicative rather than definitive.

Keywords

Main Subjects


Akyildirim, E., Goncu, A., & Sensoy, A. (2021). Prediction of cryptocurrency returns using machine learning. Annals of Operations Research, 297(1–2), 3–36. https://doi.org/10.1007/s10479-020-03575-y
Almeida, J., & Gonçalves, T. C. (2023). Portfolio Diversification, Hedge and Safe-Haven Properties in Cryptocurrency Investments and Financial Economics: A Systematic Literature Review. Journal of Risk and Financial Management, 16(1). https://doi.org/10.3390/jrfm16010003
Andrianto, Y., & Diputra, Y. (2017). The Effect of Cryptocurrency on Investment Portfolio Effectiveness. Journal of Finance and Accounting, 5(6), 229. https://doi.org/10.11648/j.jfa.20170506.14
Baasher, A., & Fakhr, M. W. (2017). FOREX Trend Classification using Machine Learning Techniques. In Proceedings of the 11th WSEAS International Conference on Applied Computer Science, 1(1), 41–47.
Bischl, B., Binder, M., Lang, M., Pielok, T., Richter, J., Coors, S., Thomas, J., Ullmann, T., Becker, M., Boulesteix, A.-L., Deng, D., & Lindauer, M. (2023). Hyperparameter optimization: Foundations, algorithms, best practices, and open challenges. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 13(2), e1484. https://doi.org/10.1002/widm.1484
Bouri, E., Molnár, P., Azzi, G., Roubaud, D., & Hagfors, L. I. (2017). On the hedge and safe haven properties of Bitcoin : Is it really more than a diversifier? Finance Research Letters, 20, 192–198.
Breiman, L. (2001). Random Forests. Machine Learning, 45(1), 5–32.
Brière, M., Oosterlinck, K., & Szafarz, A. (2015). Virtual currency, tangible return: Portfolio diversification with bitcoin. Journal of Asset Management, 16(6), 365–373. https://doi.org/10.1057/jam.2015.5
Cavalli, S., & Amoretti, M. (2021). CNN-based multivariate data analysis for bitcoin trend prediction. Applied Soft Computing, 101(September). https://doi.org/10.1016/j.asoc.2020.107065
Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 13-17-Augu, 785–794. https://doi.org/10.1145/2939672.2939785
Chen, W., Zhang, H., Mehlawat, M. K., & Jia, L. (2021). Mean–variance portfolio optimization using machine learning-based stock price prediction. Applied Soft Computing, 100, 106943. https://doi.org/10.1016/j.asoc.2020.106943
Cherkassky, V., & Ma, Y. (2004). Practical selection of SVM parameters and noise estimation for SVM regression. Neural Networks, 17(1), 113–126. https://doi.org/10.1016/S0893-6080(03)00169-2
Chernova, N., Serhiienko, O., Bril, M., Bilotserkivskyi, O., & Kochorba, V. (2024). Investigation of Modern Investment Opportunities With Cryptocurrency Market: Optimization Aproach. Intellectual Economics, 18(1), 80–105. https://doi.org/10.13165/IE-24-18-1-04
Cortes, C., & Vapnik, V. (1995). Support-Vector Networks. Machine Learning, 20(3), 273–297.
Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270(2), 654–669.
Goodell, J. W., Kumar, S., Lim, W. M., & Pattnaik, D. (2021). Artificial intelligence and machine learning in finance: Identifying foundations, themes, and research clusters from bibliometric analysis. Journal of Behavioral and Experimental Finance, 32, 100577. https://doi.org/10.1016/j.jbef.2021.100577
Guesmi, K., Saadi, S., Abid, I., & Ftiti, Z. (2019). Portfolio diversification with virtual currency: Evidence from bitcoin. International Review of Financial Analysis, 63(2017), 431–437. https://doi.org/10.1016/j.irfa.2018.03.004
Henrique, B. M., Sobreiro, V. A., & Kimura, H. (2019). Literature review: Machine learning techniques applied to financial market prediction. Expert Systems With Applications, 124, 226–251. https://doi.org/10.1016/j.eswa.2019.01.012
Iqbal, M., Iqbal, A., Alshammari, A., Ali, I., Maghrabi, L. A., & Usman, N. (2024). Sell or HODL Cryptos: Cryptocurrency Short-to-Long Term Projection Using Simultaneous Classification-Regression Deep Learning Framework. IEEE Access, 12(June), 118169–118184. https://doi.org/10.1109/ACCESS.2024.3448234
Islam, M. S., Bashir, M., Rahman, S., Al Montaser, M. A., Bortty, J. C., Nishan, A., & Haque, M. R. (2025). Machine Learning-Based Cryptocurrency Prediction: Enhancing Market Forecasting with Advanced Predictive Models. Journal of Ecohumanism, 4(2). https://doi.org/10.62754/joe.v4i2.6663
Jabeur, S. Ben, Mefteh-Wali, S., & Viviani, J. L. (2024). Forecasting gold price with the XGBoost algorithm and SHAP interaction values. Annals of Operations Research. https://doi.org/10.1007/s10479-021-04187-w
Jahanbin, K., & Chahooki, M. A. Z. (2025). Cryptocurrency Trend Prediction Through Hybrid Deep Transfer Learning. International Journal of Intelligent Systems, 2025(1). https://doi.org/10.1155/int/4211799
Jensen, M. C. (1978). Some anomalous evidence regarding market efficiency. Journal of Financial Economics, 6(2–3), 95–101. https://doi.org/10.1016/0304-405X(78)90025-9
Klein, A., Falkner, S., Bartels, S., Hennig, P., & Hutter, F. (2017). Fast Bayesian optimization of machine learning hyperparameters on large datasets. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, AISTATS 2017, 54.
Kolm, P. N., Tütüncü, R., & Fabozzi, F. J. (2014). 60 Years of Portfolio Optimization: Practical Challenges and Current Trends. European Journal of Operational Research, 234(2), 356–371. https://doi.org/10.1016/j.ejor.2013.10.060
Kwon, D., Kim, J., Heo, J., Kim, C., & Han, Y. (2019). Time series classification of cryptocurrency price trend based on a recurrent LSTM neural network. Journal of Information Processing Systems, 15(3), 694–706.
Ma, Y., Ahmad, F., Liu, M., & Wang, Z. (2020). Portfolio optimization in the era of digital financialization using cryptocurrencies. Technological Forecasting and Social Change, 161, 120265.
Močkus, J. (1974). On Bayesian methods for seeking the extremum. IFIP Technical Conference on Optimization Techniques. Berlin, Heidelberg: Springer Berlin Heidelberg.
Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system.
Peykani, P., Mohammadi, E., Jabbarzadeh, A., Rostamy-Malkhalifeh, M., & Pishvaee, M. S. (2020). A novel two-phase robust portfolio selection and optimization approach under uncertainty: A case study of Tehran stock exchange. Plos One, 15(10), , e0239810. https://doi.org/10.1371/journal.pone.0239810
Peykani, P., Namakshenas, M., Nouri, M., Kavand, N., & Rostamy-Malkhalifeh, M. (2022). A possibilistic programming approach to portfolio optimization problem under fuzzy data. Advances in Econometrics, Operational Research, Data Science and Actuarial Studies: Techniques and Theories (pp. 377-387). Cham: Springer International Publishing. https://doi.org/10.1007/978-3-030-85254-2_23
Peykani, P., Nouri, M., Eshghi, F., Khamechian, M., & Farrokhi-Asl, H. (2021). A novel mathematical approach for fuzzy multi-period multi-objective portfolio optimization problem under uncertain environment and practical constraints. Journal of Fuzzy Extension and Applications, 2(3), 191-203. https://doi.org/10.22105/jfea.2021.287429.1150
Peykani, P., Nouri, M., Pishvaee, M. S., Oprean-stan, C., & Mohammadi, E. (2023). Credibilistic Multi-Period Mean-Entropy Rolling Portfolio Optimization Problem Based on Multi-Stage Scenario Tree. Mathematics, 11(18), 3889. https://doi.org/10.3390/math11183889
Sebastião, H., & Godinho, P. (2021). Forecasting and trading cryptocurrencies with machine learning under changing market conditions. Financial Innovation, 7(1), 3. https://doi.org/10.1186/s40854-020-00217-x
Shahzad, S. J. H., Bouri, E., Roubaud, D., Kristoufek, L., & Lucey, B. (2019). Is Bitcoin a better safe-haven investment than gold and commodities? International Review of Financial Analysis, 63, 322–330. https://doi.org/10.1016/j.irfa.2019.01.002
Snoek, J., Larochelle, H., & Adams, R. P. (2012). Practical Bayesian Optimization of Machine Learning Algorithms. Advances in Neural Information Processing Systems 25, 2951–2959.
Thu, T. N. T., & Xuan, V. D. (2018). Using support vector machine in FoRex predicting. 2018 IEEE International Conference on Innovative Research and Development, ICIRD 2018. https://doi.org/10.1109/ICIRD.2018.8376303
Valencia, F., Gómez-Espinosa, A., & Valdés-Aguirre, B. (2019). Price movement prediction of cryptocurrencies using sentiment analysis and machine learning. Entropy, 21(6). https://doi.org/10.3390/e21060589
Viéitez, A., Santos, M., & Naranjo, R. (2024). Machine learning Ethereum cryptocurrency prediction and knowledge-based investment strategies. Knowledge-Based Systems, 299(March). https://doi.org/10.1016/j.knosys.2024.112088
Yamin, M. A., & Chaudhry, M. (2023). Cryptocurrency market trend and direction prediction using Machine Learning: A Comprehensive Survey. Authorea Preprints.
Yang, L., & Shami, A. (2020). On hyperparameter optimization of machine learning algorithms: Theory and practice. Neurocomputing, 415, 295–316. https://doi.org/10.1016/j.neucom.2020.07.061
Youssefi, A. El, Hessane, A., Zeroual, I., & Farhaoui, Y. (2024). Utilizing Machine Learning and Deep Learning for Predicting Crypto-currency Trends. Salud, Ciencia y Tecnologia - Serie de Conferencias, 3, 1–14. https://doi.org/10.56294/sctconf2024638
Zarezade, R., Ghousi, R., Mohammadi, E., & Ghanbari, H. (2024). Chance-constrained programming for Cryptocurrency portfolio optimization using Conditional Drawdown at Risk. Journal of Industrial and Systems Engineering, 16(2), 130–153.