A Comprehensive Analysis of Machine Learning Models for Algorithmic Trading of Bitcoin
Abdul Jabbar, Syed Qaisar Jalil
TL;DR
This work tackles the challenge of selecting effective ML models for Bitcoin algorithmic trading under volatile market conditions. It applies a comprehensive evaluation framework that combines ML performance metrics with trading outcomes, using backtesting, forward testing, and real-world data across 41 models (21 classifiers, 20 regressors) and rolling-window training. The main contributions include a flexible data pipeline with technical indicators and log-difference features, Optuna-driven hyperparameter optimization, and a thorough cross-phase analysis that reveals Random Forest and SGD-based models as the most profitable and risk-managed options. The results offer practical guidance for traders and researchers on model selection, robust evaluation, and deployment of ML-assisted cryptocurrency trading strategies.
Abstract
This study evaluates the performance of 41 machine learning models, including 21 classifiers and 20 regressors, in predicting Bitcoin prices for algorithmic trading. By examining these models under various market conditions, we highlight their accuracy, robustness, and adaptability to the volatile cryptocurrency market. Our comprehensive analysis reveals the strengths and limitations of each model, providing critical insights for developing effective trading strategies. We employ both machine learning metrics (e.g., Mean Absolute Error, Root Mean Squared Error) and trading metrics (e.g., Profit and Loss percentage, Sharpe Ratio) to assess model performance. Our evaluation includes backtesting on historical data, forward testing on recent unseen data, and real-world trading scenarios, ensuring the robustness and practical applicability of our models. Key findings demonstrate that certain models, such as Random Forest and Stochastic Gradient Descent, outperform others in terms of profit and risk management. These insights offer valuable guidance for traders and researchers aiming to leverage machine learning for cryptocurrency trading.
