Forecasting Bitcoin Prices: A Comparative Study of Machine Learning and Deep Learning Algorithms | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Forecasting Bitcoin Prices: A Comparative Study of Machine Learning and Deep Learning Algorithms Hamed Alizadegan, Arian Radmehr, Mohsen Asghari Ilani This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-4390390/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract The cryptocurrency market, particularly Bitcoin, has witnessed significant volatility, making accurate price prediction a challenging yet crucial task. This research explores the application of four powerful machine learning algorithms), Light Gradient Boosting Machine (LightGBM , Long Short Term Memory (LSTM), Bidirectional Long Short Term Memory (BiLSTM) and Extreme Gradient Boosting (XGBoost), for forecasting Bitcoin prices. The study focuses on evaluating the predictive performance using Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) as the evaluation metrics. The LSTM and Bi-LSTM, a type of recurrent neural network (RNN), are known for that ability to capture long-term dependencies in time series data. On the other hand, LightGBM and XGBoost, a gradient boosting framework, excels in handling large datasets efficiently and delivering accurate predictions. By employing these algorithms, this research aims to enhance the accuracy of Bitcoin price predictions compared to traditional methods. The experimental setup involves training and validating the models on historical Bitcoin price data. The MAE and RMSE metrics are utilized to assess the models' predictive accuracy, providing a comprehensive evaluation of their performance. The comparative analysis of machine learning models sheds light on their strengths and weaknesses in the context of cryptocurrency price prediction. The results showcase the importance of employing advanced machine learning techniques in forecasting financial time series, highlighting the potential for improved decision-making in cryptocurrency trading and investment strategies. Finance Time series forecasting LSTM Bi-LSTM Deep learning ML LGBM XGBoost BTC cryptocurrency RNN. Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Introduction The cryptocurrency market has emerged as a dynamic and intricate financial landscape, characterized by its inherent volatility and unpredictability. Among the myriad of digital assets, Bitcoin stands as a prominent and influential player, captivating the attention of investors, traders, and researchers alikeon tethenical(Ortu et al., 2022 ). The unprecedented surge in interest surrounding Bitcoin has led to an increasing need for accurate and reliable methods of price prediction to inform investment decisions and risk management strategies. The cryptocurrency market represents a complex and dynamic financial ecosystem characterized by its inherent volatility and unpredictability. Within this landscape, Bitcoin emerges as a prominent and influential digital asset, attracting the attention of investors, traders, and researchers. The surge in interest surrounding Bitcoin necessitates accurate methods for price prediction to guide investment decisions and risk management strategies. Cryptocurrencies rely on Blockchain, a digital ledger system, for transactions. While Blockchain ensures privacy and security, its inherent limitations in data formatting hinder efficient search queries. Cryptocurrencies, independent of traditional banks, offer secure peer-to-peer transactions, but their Proof-of-Work mechanism demands significant energy consumption, posing sustainability challenges. Bitcoin operates on a decentralized peer-to-peer network, enabling currency creation and transaction management without central authority control. BTC remains the most recognized cryptocurrency, with Ethereum, Litecoin, and Ripple as notable alternatives. The competition among cryptocurrencies drives technological advancements within the industry. However, its high volatility challenges its role as a store of value and transaction medium. Efforts to predict Bitcoin prices often involve analyzing correlations with other commodities, yet past studies indicate weak correlations with assets like gold and stock market indices. Another research direction involves leveraging AI algorithms and computational power to forecast Bitcoin prices (Rathore et al., 2023 ). Machine learning, particularly LSTM and Bi-LSTM models, has gained traction in various financial markets(Patel et al., 2020 ). This paper aims to explore deep learning and machine learning applications in time series forecasting by employing LSTM, Bi-LSTM signals, LGBTM an XGBoost in algorithmic investment strategies for Bitcoin(Ren et al., 2022 ). Our study proposes deep learning and machine learning models for price prediction, focusing on machine learning techniques in algorithmic investment strategies applied to BTC cryptocurrencies. deep learning and machine learning algorithms facilitate cryptocurrency price predictions despite their nonlinear behavior. We evaluate prediction performance using metrics like RMSE and MAE. Related Works In recent years, there has been a surge in research endeavors aimed at harnessing machine learning techniques to predict cryptocurrency prices, particularly focusing on Bitcoin (BTC), Ethereum (ETH), and Litecoin (LTC). A variety of models have been explored for this purpose, ranging from traditional statistical methods to advanced deep learning architectures. LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit) models have emerged as popular choices due to their ability to capture temporal dependencies in sequential data. For instance, Kim et al. (Kim et al., 2021 ) compares LSTM and GRU models for BTC, ETH, and LTC price predictions, revealing that GRU outperforms LSTM during downward trends in BTC and ETH, while LSTM fares better during upward trends. Moreover, GRU exhibits superior performance for LTC in specific scenarios. Similarly, Seabe et al. (Seabe et al., 2023 ) introduces LSTM, GRU, and Bi-LSTM models for price predictions, with Bi-LSTM demonstrating the highest accuracy among the models considered. Furthermore, researchers have explored the application of LSTM specifically in forecasting cryptocurrency prices against traditional financial indicators. Michańków et al. (Michańków et al., 2022 ) employs LSTM networks to forecast BTC and S&P500 index values, highlighting the importance of innovative loss functions and meticulous data preprocessing in enhancing forecasting accuracy. Additionally, Wu et al. (Wu et al., 2018a ) proposes LSTM models for daily Bitcoin price forecasting, introducing an LSTM with AR(2) model that outperforms conventional LSTM approaches. These studies contribute novel frameworks adaptable to various cryptocurrencies and financial time-series data, as shown in Fig. 1 (a-d) . Moreover, machine learning-based approaches beyond LSTM have also shown promise. Chen et al. (Chen, 2023 ) evaluates regression models' performance for minute-interval Bitcoin price predictions, achieving high accuracy with low Mean Squared Error (MSE) and high R-squared (R2) values. These studies collectively underscore the growing interest and advancements in leveraging machine learning for cryptocurrency price prediction, offering valuable insights for investors, traders, and researchers alike. The collective findings of recent studies underscore the pivotal role of employing cutting-edge deep learning algorithms and advanced machine learning techniques in accurately predicting cryptocurrency prices. These insights are not only invaluable for researchers seeking to understand market dynamics but also for investors and traders navigating the volatile landscape of the cryptocurrency market. Motivated by this burgeoning field of research and the practical implications for investment strategies, our study aims to leverage cryptocurrency datasets, augmented from reputable sources such as Binance, to predict Bitcoin prices. By drawing upon the latest advancements showcased in recent publications, we aim to enhance the reliability and confidentiality of our results. Moreover, our approach focuses on comparing the efficacy of four powerful algorithms, LSTM Bi-LSTM, LGBM and XGBoost, renowned for their predictive capabilities in financial forecasting. One of the key advantages of our methodology lies in its accessibility and ease of use, making it accessible not only to seasoned researchers but also to investors seeking actionable insights. By providing a streamlined prediction procedure applicable across various cryptocurrencies, our approach eliminates the need for extensive manual analysis, thereby saving valuable time and resources. This cost-effective solution is tailored to real-world datasets, ensuring its relevance and applicability in dynamic market conditions. our study aims to empower investors and traders with a robust predictive framework that can navigate the complexities of cryptocurrency markets with confidence. By harnessing the power of advanced machine learning techniques, we strive to offer a comprehensive solution that transcends traditional barriers, facilitating informed decision-making and maximizing returns in the exciting world of cryptocurrency investment. Methodology Data collection The data used in this study comprises Bitcoin price data obtained from the Binance exchange relative to the Tether (USDT) cryptocurrency. The dataset spans from October 1, 2019, to September 30, 2023, capturing daily price observations over this period. The choice of Binance exchange for data collection is motivated by its status as one of the leading cryptocurrency exchanges globally, known for its liquidity and extensive trading volume. Additionally, the use of Tether (USDT) as the reference currency provides stability and consistency in price comparisons due to its peg to the US dollar. The daily timeframe was selected to provide sufficient granularity for analysis while avoiding excessive noise associated with shorter time intervals. By aggregating price data on a daily basis, we aim to capture overarching trends and patterns in Bitcoin price movements over the specified timeframe. Datasets the features and target variable are depicted in Fig. 2 The depicted features are associated with their respective Fisher's scores. Fisher's score is a statistical measure used for feature selection in machine learning and predictive modeling tasks. It quantifies the discriminatory power of each feature by assessing its ability to differentiate between different classes or categories within the dataset. Specifically, Fisher's score evaluates the separation between the means of different classes relative to the variance within each class. Features with higher Fisher's scores indicate greater discriminatory power, suggesting that they are more informative and relevant for predicting the target variable. The term "Close" refers to the closing price of Bitcoin, which serves as our target variable. Our objective involves predicting future closing prices based on a range of relevant features extracted from the dataset. In our feature set, we have included several date-related features extracted from the timestamp of each data point. These features provide additional temporal context to the dataset and help capture potential seasonal or periodic patterns in Bitcoin's price movements. Here's a brief explanation of each date-related feature: Month: This feature represents the month component of the timestamp, indicating the calendar month in which the data point was recorded. Year: The year feature denotes the calendar year associated with each data point, providing a broader temporal context to the dataset. Day of Year: This feature represents the ordinal day of the year (ranging from 1 to 365 or 366), capturing the annual progression of time. Day of Month: Similar to the day of year, this feature indicates the specific day within the calendar month, ranging from 1 to 31. Day of Week: This feature denotes the day of the week (e.g., Monday, Tuesday, etc.) associated with each data point, allowing for the capture of potential weekly patterns in Bitcoin's price dynamics. Sin(DayofYear) and Cos(DayofYear): These features encode the cyclical nature of the day of the year using sine and cosine transformations, respectively. By representing the day of the year as a continuous cycle rather than a linear progression, these features help capture seasonal patterns and periodic fluctuations in Bitcoin prices more effectively. Incorporating these date-related features into our predictive models enhances their ability to capture temporal dependencies and seasonal variations in Bitcoin's price movements, thereby improving the accuracy of our forecasting models. The graphical representation in Fig. 3 depicts the trend of Bitcoin's closing prices over the analyzed time period. As observed, the Bitcoin price exhibits notable fluctuations and volatility, characterized by periodic peaks and troughs. This dynamic price behavior is indicative of the inherent volatility and speculative nature of the cryptocurrency market. In the presented graphical representation in Fig. 4 , we observe the trading volume associated with Bitcoin transactions over the specified duration. The trading volume reflects the total number of Bitcoin units traded within a given timeframe, typically measured in terms of the number of coins exchanged or the equivalent value in fiat currency. The depicted volume graph showcases fluctuations in trading activity, with periods of heightened trading volume often coinciding with significant price movements or market events. This dynamic interplay between trading volume and price movements underscores the importance of market liquidity and investor sentiment in shaping the dynamics of the Bitcoin market. The scatter plot depicted in Fig. 5 depicts the relationship between Bitcoin's closing price and trading volume. Each data point on the scatter plot represents a specific observation, with the x-axis corresponding to the closing price of Bitcoin and the y-axis representing the corresponding trading volume. The scatter plot allows for visual examination of any potential correlations or patterns between price movements and trading activity. By analyzing the distribution of data points, we can discern trends, identify outliers, and assess the strength of the price-volume relationship. We utilized a heatmap visualization in Fig. 6 to explore the correlations among various features extracted from the cryptocurrency market dataset obtained from Binance. The heatmap provides a visual representation of the pairwise correlation coefficients between different variables, offering insights into the interrelationships within the dataset. The heatmap analysis revealed significant correlations between certain market indicators and Bitcoin price movements. We observed a strong positive correlation between Bitcoin's price and trading volume, indicating that higher trading activity tends to coincide with price increases. Furthermore, the heatmap allowed us to identify potential multicollinearity issues among predictor variables, which could affect the robustness of predictive models. By examining the correlation matrix, we were able to discern redundant or highly correlated features, enabling us to refine the feature selection process and improve the model's predictive performance. In this experiment, we adopted a standard train-test split approach, where 90% of the dataset was reserved for training the predictive models, and the remaining 10% was set aside for testing purposes. The division of the dataset into training and testing subsets ensures that the models are evaluated on unseen data, thereby providing a reliable assessment of their generalization performance. As illustrated in Fig. 7 , the training data (depicted in blue) encompasses 90% of the total dataset and is utilized to train the machine learning and deep learning models. This portion of the dataset includes historical Bitcoin price data, along with relevant market indicators and trading volume, spanning a period of four years. Conversely, the testing data (depicted in orange) constitutes the remaining 10% of the dataset and is held out for model evaluation. This independent subset of the data allows us to assess the models' predictive performance on unseen instances, thereby gauging their ability to generalize to new data and make accurate forecasts. By delineating the training and testing data in this manner, we ensure a rigorous evaluation of the predictive models' efficacy in forecasting Bitcoin prices. Additionally, this approach mitigates the risk of overfitting, as the models are assessed on data that they have not been exposed to during the training phase. ML Model Machine learning, a subset of artificial intelligence (AI), empowers computers to learn from data and make predictions or decisions without explicit programming. In the context of the referenced article, machine learning algorithms are harnessed to analyze historical Bitcoin price data, uncovering patterns or relationships that inform predictions of future price movements. By learning from past data, these algorithms forecast future data points, providing investors and researchers with insights into potential trends in the cryptocurrency market. The study employs diverse machine learning models, including deep learning, ensemble methods, and time series forecasting algorithms, each offering distinct advantages and capabilities for analyzing intricate financial data. LSTM (Long Short-Term Memory) Long Short-Term Memory (LSTM) represents a specialized recurrent neural network (RNN) architecture meticulously crafted to grasp and model long-term dependencies inherent in sequential data(Christoforou et al., 2020 ). Unlike conventional RNNs, LSTM networks integrate dedicated memory cells and gating mechanisms, addressing the prevalent issue of vanishing gradients that often obstructs deep neural network training on lengthy sequences. Comprising multiple LSTM units, each unit encompasses three pivotal components: the input gate, the forget gate, and the output gate. The input gate orchestrates information influx into the memory cell, determining the relevance of data to update and retain. Conversely, the forget gate governs the retention or removal of irrelevant data from previous time steps, enhancing network adaptability. The output gate regulates the information flow from the memory cell to the output, discerning pertinent data for prediction. Central to LSTM architecture is the memory cell, acting as a cornerstone component by upholding a persistent internal state capable of storing information across extensive periods. This cell state undergoes updates via a blend of element-wise operations and activation functions, facilitating selective information retention or discarding based on relevance (Nasirtafreshi, 2022 ). During training, LSTM networks undergo optimization via backpropagation through time (BPTT), a variant of the backpropagation algorithm tailored for sequential data. The network refines its parameters (weights and biases) by minimizing a predefined loss function, commonly quantified in terms of prediction error such as Mean Squared Error (MSE) or Mean Absolute Error (MAE). LSTM networks excel in modeling and predicting time series data laden with long-term dependencies, rendering them particularly adept for tasks like speech recognition, language modeling, and financial forecasting. Leveraging LSTM's prowess in capturing and preserving information across extended sequences empowers it to discern intricate patterns and dynamics inherent in sequential data, including Bitcoin price fluctuations. In the realm of Bitcoin price prediction, LSTM networks analyze historical price data to forecast future price movements. Harnessing the network's capacity to discern temporal dependencies, LSTM models can potentially uncover recurring patterns, trends, and anomalies in Bitcoin price dynamics, thus assisting traders and investors in decision-making endeavors. Despite their efficacy, LSTM networks may encounter challenges such as overfitting, especially when trained on limited or noisy datasets. Rigorous hyperparameter tuning, incorporation of regularization techniques, and robust model validation are imperative to alleviate these challenges and ensure the reliability and generalization capability of LSTM-based predictions. Bidirectional Long Short-Term Memory (Bi-LSTM) Bidirectional Long Short-Term Memory (Bi-LSTM) represents an advancement over the conventional LSTM architecture by integrating bidirectional processing. Unlike standard LSTM models, which solely handle input sequences in one direction (i.e., from past to future), Bi-LSTM concurrently processes sequences in both directions. This bidirectional approach empowers the model to grasp not only past dependencies but also future context, thereby facilitating more informed predictions based on a comprehensive understanding of the input data. In Bi-LSTM, the input sequence is fed into two distinct LSTM layers: one processes the sequence in the forward direction, while the other processes it in the reverse direction. Subsequently, the hidden states of these two LSTM layers are either concatenated or merged at each time step, yielding a representation that amalgamates information from both past and future contexts(Huang et al., 2022 ). This bidirectional processing mechanism enables Bi-LSTM models to better comprehend the temporal dynamics inherent in the input data, consequently enabling them to capture intricate patterns that might elude unidirectional models. Light Gradient Boosting Machine (LGBM) LightGBM stands out as a robust gradient boosting framework celebrated for its efficiency, scalability, and exceptional performance when dealing with extensive datasets and intricate feature spaces. Originating from Microsoft, LightGBM introduces a novel gradient-based approach to decision tree boosting, enabling swift and accurate predictions across diverse machine learning tasks like regression, classification, and ranking. Belonging to the gradient boosting machines family, LightGBM iteratively constructs an ensemble of weak learners, typically decision trees, to collectively enhance predictive capabilities. Unlike conventional gradient boosting algorithms, LightGBM adopts a leaf-wise tree growth strategy, prioritizing nodes for splitting based on maximum reduction in the objective function's gradient. Its efficiency in model training owes to an innovative histogram-based algorithm for computing gradients and identifying optimal split points. By discretizing feature values into bins and constructing histograms, LightGBM effectively reduces memory usage and computational overhead, rendering it well-suited for large datasets with millions of samples and high-dimensional feature spaces. Notably, LightGBM seamlessly handles categorical features, employing techniques like one-hot encoding or ordinal encoding while preserving their semantic meaning for efficient computation during training. With an array of hyperparameters available for controlling model complexity, regularization, and optimization objectives, LightGBM incorporates regularization techniques such as shrinkage and feature sub-sampling to prevent overfitting and enhance generalization. Further optimization through techniques like grid search, random search, or Bayesian optimization aids in finding the optimal configuration for specific datasets and tasks. Its proficiency in balancing computational efficiency and predictive accuracy makes LightGBM a preferred choice for large-scale machine learning tasks across industries. Its capacity to handle categorical features, coupled with memory-efficient implementation and scalability to distributed computing environments, underscores its widespread adoption. In the realm of Bitcoin price prediction, LightGBM proves invaluable in modeling intricate relationships among market indicators, sentiment analysis, and external factors influencing Bitcoin prices. Leveraging its efficient training process and robust performance, LightGBM facilitates accurate forecasts of Bitcoin price movements, empowering traders, investors, and analysts to make well-informed decisions. eXtreme Gradient Boosting (XGBoost) XGBoost, an abbreviation for eXtreme Gradient Boosting, represents a potent machine learning algorithm within the ensemble learning family, specifically residing in gradient boosting frameworks. It has garnered acclaim for its remarkable performance across a broad spectrum of predictive modeling endeavors, spanning regression, classification, and ranking tasks. XGBoost operates by iteratively amalgamating multiple weak learners, commonly decision trees, to construct a robust predictive model. Each subsequent tree in the ensemble is trained to rectify the errors of its predecessors, culminating in a final model of high accuracy and resilience. A noteworthy advantage of XGBoost lies in its adeptness at efficiently handling intricate datasets. Leveraging gradient boosting, it optimizes the loss function by iteratively fitting new models to the residuals of preceding ones (Zhai et al., 2020 ). This distinctive approach empowers XGBoost to discern subtle patterns and relationships within the data, rendering it particularly well-suited for tasks entailing structured data or high-dimensional feature spaces. Model Evaluation Model evaluation is a critical step in assessing the predictive accuracy and reliability of LSTM and LightGBM models for Bitcoin price prediction. Various performance metrics are utilized to quantify the discrepancy between predicted and actual prices. MAE (Mean Absolute Error) measures the average absolute difference between the predicted and actual prices over the entire test dataset. Mathematically, MAE is calculated as: MAE = \(\frac{1}{t}{\sum }_{t=1}^{T}|{y}_{t}-{y}_{t}^{{\prime }}|\) RMSE is another commonly used metric that penalizes larger prediction errors more heavily than smaller errors. It is calculated as the square root of the average of the squared differences between the predicted and actual prices(Wu et al., 2018b ): RMSE = \(\sqrt{\frac{1}{t}{\sum }_{t=1}^{T}{({y}_{t}-{y}_{t}^{{\prime }})}^{2} }\) Where, \({y}_{t}\) represent the true price of Bitcoin, \({y}_{t}^{{\prime }}\) denote the predicted price of Bitcoin, and T indicate the specific period for prediction. The coefficient of determination, commonly denoted as R-squared ( \({R}^{2}\) ), quantifies the proportion of variance in the dependent variable (actual prices) that is accounted for by the independent variables (predicted prices). Ranging between 0 and 1, higher values signify a stronger alignment of the model with the observed data. LSTM and LightGBM models are evaluated using the aforementioned performance metrics on the testing dataset. The results are compared to determine which model exhibits superior predictive accuracy and generalization capability for Bitcoin price prediction. The interpretation of evaluation results involves understanding not only the absolute performance metrics but also the practical implications of model predictions for real-world applications. Insights gained from the evaluation process inform decision-making processes for traders, investors, and stakeholders in the cryptocurrency market. Results and discussion The performance of various machine learning models in predicting Bitcoin prices was assessed using diverse evaluation metrics. Results from the Long Short-Term Memory (LSTM) model indicate the following: Mean Absolute Error (MAE) on test data was 0.0106, Root Mean Squared Error (RMSE) was 0.0158, and the R-squared value was 0.6787. Conversely, the Bidirectional LSTM (Bi-LSTM) model displayed improved performance with MAE of 0.0096, RMSE of 0.0146, and R-squared of 0.7252. Furthermore, the LightGBM (LGBM) model surpassed both LSTM and Bi-LSTM, exhibiting significantly lower MAE (0.0082) and RMSE (0.0106), along with a higher R-squared value (0.854). Lastly, the XGBoost model achieved MAE of 0.0109, RMSE of 0.0136, and R-squared of 0.7587, positioning it as a competitive alternative to LSTM-based approaches. These findings suggest that LGBM offers superior predictive accuracy compared to LSTM, Bi-LSTM, and XGBoost models. The lower MAE and RMSE values imply that LGBM provides more precise Bitcoin price predictions, while the higher R-squared value indicates better overall fit to the test data. This performance superiority may be attributed to LGBM's inherent characteristics, such as efficient handling of large datasets and capturing complex nonlinear relationships within the data. Additionally, it is noteworthy that Bi-LSTM outperformed LSTM, underscoring the potential advantages of bidirectional architectures in capturing temporal dependencies in time series data. However, both LSTM and Bi-LSTM models lag behind LGBM and XGBoost in terms of predictive accuracy and overall performance. Overall, these results underscore the significance of selecting appropriate machine learning algorithms for cryptocurrency price prediction tasks. While LSTM and Bi-LSTM exhibit predictive capability, LGBM emerges as a more reliable and accurate choice for forecasting Bitcoin prices based on the evaluation metrics considered in this study. The loss curve for both training and validation datasets over epochs is illustrated in Fig. 8 . This curve provides insights into the convergence of the models during the training process. Both training and validation loss curves are evaluated to ensure that the models are learning effectively without overfitting or underfitting. The actual vs predicted values for the test dataset are presented in Fig. 9 . This visualization allows us to assess the predictive accuracy of each model by comparing the predicted values with the ground truth. The closer the predicted values are to the actual values, the higher the predictive accuracy of the model. The daily price trend is depicted in Fig. 10 showcasing the conformity of different models' predictions with the actual price data. Models such as LGBM, Bi-LSTM, LSTM, and XGBoost are compared to determine which one exhibits the highest level of agreement with the actual price trends over time. In the analysis, a comparative view of key evaluation metrics, including Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R-Squared, across different models is presented in Fig. 11 . Additionally, Table 1 provides a tabulated summary of these evaluation metrics for each model, allowing for a detailed comparison of their performance. Various evaluation metrics are displayed in a linear graph in Fig. 12 , providing a comprehensive overview of the performance of each model. This visualization enables us to identify trends and patterns in the performance of different models across different evaluation metrics. Overall, the combination of visualizations and tabulated results facilitates a comprehensive analysis of the performance of machine learning models in predicting Bitcoin prices. A detailed summary of the evaluation metrics associated with each model is provided in Table 1 . It includes metrics such as Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R-Squared (R^2) for each model, offering insights into their performance in predicting Bitcoin prices. Table 1 Summary of Performance Metrics Model/Metric MAE RMSE R-Squared LSTM 0.0101 0.0156 0.68 BI-LSTM 0.0096 0.0145 0.72 LGBM 0.0081 0.0105 0.85 XGBoost 0.0108 0.0136 0.75 Conclusion In conclusion, our study explored the effectiveness of various machine learning models in predicting Bitcoin prices using historical data. Through rigorous experimentation and analysis, we evaluated the performance of models such as LSTM, Bi-LSTM, LGBM, and XGBoost, considering key evaluation metrics including MAE, RMSE, and R-Squared.The results demonstrated that machine learning models, particularly LGBM, exhibit promising predictive capabilities in forecasting Bitcoin prices. LGBM outperformed other models in terms of accuracy and efficiency, showcasing its potential as a robust tool for cryptocurrency price prediction. Overall, our findings contribute to the growing body of literature on cryptocurrency price prediction, offering practical implications for stakeholders in the cryptocurrency market. As the cryptocurrency landscape continues to evolve, further research and development in machine learning-based forecasting techniques are warranted to enhance our understanding and predictive capabilities in this domain. References Chen, J., 2023. Analysis of Bitcoin Price Prediction Using Machine Learning. Journal of Risk and Financial Management 2023, Vol. 16, Page 51 16, 51. https://doi.org/10.3390/JRFM16010051 Christoforou, E., Emiris, I.Z., Florakis, A., 2020. Neural Networks for Cryptocurrency Evaluation and Price Fluctuation Forecasting. Springer Proceedings in Business and Economics 133–149. https://doi.org/10.1007/978-3-030-37110-4_10/COVER Huang, X., Li, Q., Tai, Y., Chen, Z., Liu, J., Shi, J., Liu, W., 2022. Time series forecasting for hourly photovoltaic power using conditional generative adversarial network and Bi-LSTM. Energy 246, 123403. https://doi.org/10.1016/J.ENERGY.2022.123403 Kim, J., Kim, S., Wimmer, H., Liu, H., 2021. A Cryptocurrency Prediction Model Using LSTM and GRU Algorithms. Proceedings - 2021 IEEE/ACIS 6th International Conference on Big Data, Cloud Computing, and Data Science, BCD 2021 37–44. https://doi.org/10.1109/BCD51206.2021.9581397 Michańków, J., Sakowski, P., Ślepaczuk, R., 2022. LSTM in Algorithmic Investment Strategies on BTC and S&P500 Index. Sensors 2022, Vol. 22, Page 917 22, 917. https://doi.org/10.3390/S22030917 Nasirtafreshi, I., 2022. Forecasting cryptocurrency prices using Recurrent Neural Network and Long Short-term Memory. Data Knowl Eng 139, 102009. https://doi.org/10.1016/J.DATAK.2022.102009 Ortu, M., Uras, N., Conversano, C., Bartolucci, S., Destefanis, G., 2022. On technical trading and social media indicators for cryptocurrency price classification through deep learning. Expert Syst Appl 198, 116804. https://doi.org/10.1016/J.ESWA.2022.116804 Patel, M.M., Tanwar, S., Gupta, R., Kumar, N., 2020. A Deep Learning-based Cryptocurrency Price Prediction Scheme for Financial Institutions. Journal of Information Security and Applications 55, 102583. https://doi.org/10.1016/J.JISA.2020.102583 Rathore, M.M., Chaurasia, S., Shukla, D., Anand, P., 2023. Detection of Fraudulent Entities in Ethereum Cryptocurrency: A Boosting-based Machine Learning Approach. GLOBECOM 2023 - 2023 IEEE Global Communications Conference 6444–6449. https://doi.org/10.1109/GLOBECOM54140.2023.10437184 Ren, Y.S., Ma, C.Q., Kong, X.L., Baltas, K., Zureigat, Q., 2022. Past, present, and future of the application of machine learning in cryptocurrency research. Res Int Bus Finance 63, 101799. https://doi.org/10.1016/J.RIBAF.2022.101799 Seabe, P.L., Moutsinga, C.R.B., Pindza, E., 2023. Forecasting Cryptocurrency Prices Using LSTM, GRU, and Bi-Directional LSTM: A Deep Learning Approach. Fractal and Fractional 2023, Vol. 7, Page 203 7, 203. https://doi.org/10.3390/FRACTALFRACT7020203 Wu, C.H., Lu, C.C., Ma, Y.F., Lu, R.S., 2018a. A new forecasting framework for bitcoin price with LSTM. IEEE International Conference on Data Mining Workshops, ICDMW 2018-November, 168–175. https://doi.org/10.1109/ICDMW.2018.00032 Wu, C.H., Lu, C.C., Ma, Y.F., Lu, R.S., 2018b. A new forecasting framework for bitcoin price with LSTM. IEEE International Conference on Data Mining Workshops, ICDMW 2018-November, 168–175. https://doi.org/10.1109/ICDMW.2018.00032 Zhai, N., Yao, P., Zhou, X., 2020. Multivariate time series forecast in industrial process based on XGBoost and GRU 1397–1400. https://doi.org/10.1109/ITAIC49862.2020.9338878 Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-4390390","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":300273177,"identity":"faf5ce94-ff61-468b-92fd-5b1eeef7b726","order_by":0,"name":"Hamed Alizadegan","email":"","orcid":"","institution":"Qazvin Branch, Islamic Azad University","correspondingAuthor":false,"prefix":"","firstName":"Hamed","middleName":"","lastName":"Alizadegan","suffix":""},{"id":300273178,"identity":"42a26a61-3cfd-4f8c-8124-466061d02275","order_by":1,"name":"Arian Radmehr","email":"","orcid":"","institution":"Islamic Azad University, South Tehran Branch","correspondingAuthor":false,"prefix":"","firstName":"Arian","middleName":"","lastName":"Radmehr","suffix":""},{"id":300273179,"identity":"d03b3550-6d0d-4041-aebf-6ec2aae1104c","order_by":2,"name":"Mohsen Asghari Ilani","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA90lEQVRIiWNgGAWjYBACNnYgkQBiMTMffJBQAWY04NfCDNPCzpZs8OEMSAsjfi0MzDAGP4+Z5Mw2EIuAFj5m5mcPHjDYMeg285hJ886rjeZvB2r5UbENj8PYzA0SGJIZzA6zFVvzbjueO+MwYwNjz5nb+PxiJpEAdJ7ZYeaNt3m3HcttAGphZmzDp4X9G1BLPVALg4E075xjufMJa+EB2XIYqIXFSHJmQ03uBiK0lEkkGBznAfoFGMjHDuRuBGo5iM8v8u3t2yR/VFTLmZ0/DIzKmrrceSDGjwrcWiDAgIEHyjoMJg8QUI8C6khRPApGwSgYBSMEAABnSlBcpLCa2wAAAABJRU5ErkJggg==","orcid":"https://orcid.org/0000-0003-0189-6956","institution":"University of Tehran","correspondingAuthor":true,"prefix":"","firstName":"Mohsen","middleName":"Asghari","lastName":"Ilani","suffix":""}],"badges":[],"createdAt":"2024-05-08 15:44:54","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-4390390/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-4390390/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":56166404,"identity":"7441999f-0e8f-43c0-aeaf-54b6a06c90c6","added_by":"auto","created_at":"2024-05-09 10:39:10","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":156358,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003e(a) \u003c/strong\u003eloss function history of LSTM Model in train \u0026amp; test, (b) loss function history of LSTM with Autoregressive Model in train \u0026amp; test, (c) LSTM Model 1 prediction result and (d) LSTM with Autoregressive Model prediction result (Wu et al., 2018a)\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/374186ed6ebfc2ccdb32966d.png"},{"id":56166444,"identity":"35279dd1-a1ed-4a1a-b0df-2c0e407a4dbc","added_by":"auto","created_at":"2024-05-09 10:39:27","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":42492,"visible":true,"origin":"","legend":"\u003cp\u003eFisher’s Score\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/e29deb8a574e4a4a1348571f.png"},{"id":56167068,"identity":"c379a17f-a7b9-419d-84b3-d557b9858d9c","added_by":"auto","created_at":"2024-05-09 10:47:23","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":65959,"visible":true,"origin":"","legend":"\u003cp\u003eHistorical Bitcoin price\u003c/p\u003e","description":"","filename":"3.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/921ceec319770fcf10df806c.png"},{"id":56166424,"identity":"8a6a4e17-7311-4965-a1b1-2834128095ac","added_by":"auto","created_at":"2024-05-09 10:39:18","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":83376,"visible":true,"origin":"","legend":"\u003cp\u003eBitcoin trade volume\u003c/p\u003e","description":"","filename":"4.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/9c762fcbfff9418de7430aaa.png"},{"id":56166447,"identity":"7ab62dbd-9e6d-4131-85fa-fb2bf11ef3c8","added_by":"auto","created_at":"2024-05-09 10:39:31","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":80299,"visible":true,"origin":"","legend":"\u003cp\u003eScatter Plot of Bitcoin Price vs. Trading Volume\u003c/p\u003e","description":"","filename":"5.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/26f2c4c27b1e383cdbbfd5e8.png"},{"id":56166446,"identity":"17e2e19c-d6bf-423d-b025-6fc5857cbba7","added_by":"auto","created_at":"2024-05-09 10:39:29","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":201999,"visible":true,"origin":"","legend":"\u003cp\u003eHeatmap plot\u003c/p\u003e","description":"","filename":"6.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/72543216d6abbd1aac44beed.png"},{"id":56166427,"identity":"e3a8d7e2-839d-486f-8b26-6abb4ac080b1","added_by":"auto","created_at":"2024-05-09 10:39:22","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":84268,"visible":true,"origin":"","legend":"\u003cp\u003eTrain and Test plot\u003c/p\u003e","description":"","filename":"7.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/87461a66559197c2852762d2.png"},{"id":56166445,"identity":"747a59fa-7f0f-4c32-aecb-b12c84adad5d","added_by":"auto","created_at":"2024-05-09 10:39:28","extension":"png","order_by":8,"title":"Figure 8","display":"","copyAsset":false,"role":"figure","size":82507,"visible":true,"origin":"","legend":"\u003cp\u003eloss train/validation of (a) LSTM Model, (b) Bi-LSTM Model, (c) LGBM Model, and (d) XGBoost Model\u003c/p\u003e","description":"","filename":"8.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/92f4f7efbd13f5ab5bb0d253.png"},{"id":56166441,"identity":"3ab6b419-d89b-45b1-acd7-08bfcca2fde8","added_by":"auto","created_at":"2024-05-09 10:39:25","extension":"png","order_by":9,"title":"Figure 9","display":"","copyAsset":false,"role":"figure","size":124900,"visible":true,"origin":"","legend":"\u003cp\u003eActual vs Predicted targets of (a) LSTM Model, (b) Bi-LSTM Model, (c) LGBM Model, and (d) XGBoost Model\u003c/p\u003e","description":"","filename":"9.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/57dbd1fed0b0e1951c80d963.png"},{"id":56166426,"identity":"4163ace8-5932-4b9f-9af1-61b0b3d71017","added_by":"auto","created_at":"2024-05-09 10:39:20","extension":"png","order_by":10,"title":"Figure 10","display":"","copyAsset":false,"role":"figure","size":126814,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003ecompare actual and Predicted targets\u003c/em\u003e\u003c/p\u003e","description":"","filename":"10.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/f3a33402cfc11a0851f04ddd.png"},{"id":56167078,"identity":"520bc2c9-0fc9-4e1e-b988-1099cfc7e71e","added_by":"auto","created_at":"2024-05-09 10:47:26","extension":"png","order_by":11,"title":"Figure 11","display":"","copyAsset":false,"role":"figure","size":29684,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003ecompare Model metrics\u003c/em\u003e\u003c/p\u003e","description":"","filename":"11.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/5e69adc7916c6abbdb58c9d5.png"},{"id":56166419,"identity":"16364a6e-c58a-48e2-8fe6-040534182491","added_by":"auto","created_at":"2024-05-09 10:39:17","extension":"png","order_by":12,"title":"Figure 12","display":"","copyAsset":false,"role":"figure","size":40376,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003eshow all metrics in one plot\u003c/em\u003e\u003c/p\u003e","description":"","filename":"12.png","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/cddfd9513c61f6ac3de2b9a3.png"},{"id":56167084,"identity":"b11a17eb-2f8e-4f3f-82a1-bca98b1b27ad","added_by":"auto","created_at":"2024-05-09 10:47:34","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1434850,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-4390390/v1/3d260b92-c6c4-42e5-b508-da6ae5a661a7.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003e\u003cstrong\u003eForecasting Bitcoin Prices: A Comparative Study of Machine Learning and Deep Learning Algorithms\u003c/strong\u003e\u003c/p\u003e","fulltext":[{"header":"Introduction","content":"\u003cp\u003eThe cryptocurrency market has emerged as a dynamic and intricate financial landscape, characterized by its inherent volatility and unpredictability. Among the myriad of digital assets, Bitcoin stands as a prominent and influential player, captivating the attention of investors, traders, and researchers alikeon tethenical(Ortu et al., \u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). The unprecedented surge in interest surrounding Bitcoin has led to an increasing need for accurate and reliable methods of price prediction to inform investment decisions and risk management strategies. The cryptocurrency market represents a complex and dynamic financial ecosystem characterized by its inherent volatility and unpredictability. Within this landscape, Bitcoin emerges as a prominent and influential digital asset, attracting the attention of investors, traders, and researchers. The surge in interest surrounding Bitcoin necessitates accurate methods for price prediction to guide investment decisions and risk management strategies. Cryptocurrencies rely on Blockchain, a digital ledger system, for transactions. While Blockchain ensures privacy and security, its inherent limitations in data formatting hinder efficient search queries. Cryptocurrencies, independent of traditional banks, offer secure peer-to-peer transactions, but their Proof-of-Work mechanism demands significant energy consumption, posing sustainability challenges. Bitcoin operates on a decentralized peer-to-peer network, enabling currency creation and transaction management without central authority control. BTC remains the most recognized cryptocurrency, with Ethereum, Litecoin, and Ripple as notable alternatives. The competition among cryptocurrencies drives technological advancements within the industry. However, its high volatility challenges its role as a store of value and transaction medium. Efforts to predict Bitcoin prices often involve analyzing correlations with other commodities, yet past studies indicate weak correlations with assets like gold and stock market indices. Another research direction involves leveraging AI algorithms and computational power to forecast Bitcoin prices (Rathore et al., \u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Machine learning, particularly LSTM and Bi-LSTM models, has gained traction in various financial markets(Patel et al., \u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e2020\u003c/span\u003e). This paper aims to explore deep learning and machine learning applications in time series forecasting by employing LSTM, Bi-LSTM signals, LGBTM an XGBoost in algorithmic investment strategies for Bitcoin(Ren et al., \u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). Our study proposes deep learning and machine learning models for price prediction, focusing on machine learning techniques in algorithmic investment strategies applied to BTC cryptocurrencies. deep learning and machine learning algorithms facilitate cryptocurrency price predictions despite their nonlinear behavior. We evaluate prediction performance using metrics like RMSE and MAE.\u003c/p\u003e \u003cp\u003eRelated Works\u003c/p\u003e \u003cp\u003eIn recent years, there has been a surge in research endeavors aimed at harnessing machine learning techniques to predict cryptocurrency prices, particularly focusing on Bitcoin (BTC), Ethereum (ETH), and Litecoin (LTC). A variety of models have been explored for this purpose, ranging from traditional statistical methods to advanced deep learning architectures. LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit) models have emerged as popular choices due to their ability to capture temporal dependencies in sequential data. For instance, Kim et al. (Kim et al., \u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e2021\u003c/span\u003e) compares LSTM and GRU models for BTC, ETH, and LTC price predictions, revealing that GRU outperforms LSTM during downward trends in BTC and ETH, while LSTM fares better during upward trends. Moreover, GRU exhibits superior performance for LTC in specific scenarios. Similarly, Seabe et al. (Seabe et al., \u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e2023\u003c/span\u003e) introduces LSTM, GRU, and Bi-LSTM models for price predictions, with Bi-LSTM demonstrating the highest accuracy among the models considered.\u003c/p\u003e \u003cp\u003eFurthermore, researchers have explored the application of LSTM specifically in forecasting cryptocurrency prices against traditional financial indicators. Michańk\u0026oacute;w et al. (Michańk\u0026oacute;w et al., \u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e2022\u003c/span\u003e) employs LSTM networks to forecast BTC and S\u0026amp;P500 index values, highlighting the importance of innovative loss functions and meticulous data preprocessing in enhancing forecasting accuracy. Additionally, Wu et al. (Wu et al., \u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e2018a\u003c/span\u003e) proposes LSTM models for daily Bitcoin price forecasting, introducing an LSTM with AR(2) model that outperforms conventional LSTM approaches. These studies contribute novel frameworks adaptable to various cryptocurrencies and financial time-series data, as shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e \u003cb\u003e(a-d)\u003c/b\u003e. Moreover, machine learning-based approaches beyond LSTM have also shown promise. Chen et al. (Chen, \u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e2023\u003c/span\u003e) evaluates regression models' performance for minute-interval Bitcoin price predictions, achieving high accuracy with low Mean Squared Error (MSE) and high R-squared (R2) values.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eThese studies collectively underscore the growing interest and advancements in leveraging machine learning for cryptocurrency price prediction, offering valuable insights for investors, traders, and researchers alike.\u003c/p\u003e \u003cp\u003eThe collective findings of recent studies underscore the pivotal role of employing cutting-edge deep learning algorithms and advanced machine learning techniques in accurately predicting cryptocurrency prices. These insights are not only invaluable for researchers seeking to understand market dynamics but also for investors and traders navigating the volatile landscape of the cryptocurrency market. Motivated by this burgeoning field of research and the practical implications for investment strategies, our study aims to leverage cryptocurrency datasets, augmented from reputable sources such as Binance, to predict Bitcoin prices. By drawing upon the latest advancements showcased in recent publications, we aim to enhance the reliability and confidentiality of our results. Moreover, our approach focuses on comparing the efficacy of four powerful algorithms, LSTM Bi-LSTM, LGBM and XGBoost, renowned for their predictive capabilities in financial forecasting. One of the key advantages of our methodology lies in its accessibility and ease of use, making it accessible not only to seasoned researchers but also to investors seeking actionable insights. By providing a streamlined prediction procedure applicable across various cryptocurrencies, our approach eliminates the need for extensive manual analysis, thereby saving valuable time and resources. This cost-effective solution is tailored to real-world datasets, ensuring its relevance and applicability in dynamic market conditions. our study aims to empower investors and traders with a robust predictive framework that can navigate the complexities of cryptocurrency markets with confidence. By harnessing the power of advanced machine learning techniques, we strive to offer a comprehensive solution that transcends traditional barriers, facilitating informed decision-making and maximizing returns in the exciting world of cryptocurrency investment.\u003c/p\u003e"},{"header":"Methodology","content":"\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e \u003ch2\u003eData collection\u003c/h2\u003e \u003cp\u003eThe data used in this study comprises Bitcoin price data obtained from the Binance exchange relative to the Tether (USDT) cryptocurrency. The dataset spans from October 1, 2019, to September 30, 2023, capturing daily price observations over this period. The choice of Binance exchange for data collection is motivated by its status as one of the leading cryptocurrency exchanges globally, known for its liquidity and extensive trading volume. Additionally, the use of Tether (USDT) as the reference currency provides stability and consistency in price comparisons due to its peg to the US dollar. The daily timeframe was selected to provide sufficient granularity for analysis while avoiding excessive noise associated with shorter time intervals. By aggregating price data on a daily basis, we aim to capture overarching trends and patterns in Bitcoin price movements over the specified timeframe.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec4\" class=\"Section2\"\u003e \u003ch2\u003eDatasets\u003c/h2\u003e \u003cp\u003ethe features and target variable are depicted in Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e The depicted features are associated with their respective Fisher's scores. Fisher's score is a statistical measure used for feature selection in machine learning and predictive modeling tasks. It quantifies the discriminatory power of each feature by assessing its ability to differentiate between different classes or categories within the dataset. Specifically, Fisher's score evaluates the separation between the means of different classes relative to the variance within each class. Features with higher Fisher's scores indicate greater discriminatory power, suggesting that they are more informative and relevant for predicting the target variable. The term \"Close\" refers to the closing price of Bitcoin, which serves as our target variable. Our objective involves predicting future closing prices based on a range of relevant features extracted from the dataset. In our feature set, we have included several date-related features extracted from the timestamp of each data point. These features provide additional temporal context to the dataset and help capture potential seasonal or periodic patterns in Bitcoin's price movements. Here's a brief explanation of each date-related feature:\u003c/p\u003e \u003cp\u003e \u003cul\u003e \u003cli\u003e \u003cp\u003eMonth: This feature represents the month component of the timestamp, indicating the calendar month in which the data point was recorded.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eYear: The year feature denotes the calendar year associated with each data point, providing a broader temporal context to the dataset.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eDay of Year: This feature represents the ordinal day of the year (ranging from 1 to 365 or 366), capturing the annual progression of time.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eDay of Month: Similar to the day of year, this feature indicates the specific day within the calendar month, ranging from 1 to 31.\u003c/p\u003e \u003c/li\u003e \u003cli\u003e \u003cp\u003eDay of Week: This feature denotes the day of the week (e.g., Monday, Tuesday, etc.) associated with each data point, allowing for the capture of potential weekly patterns in Bitcoin's price dynamics.\u003c/p\u003e \u003c/li\u003e \u003c/ul\u003e \u003c/p\u003e \u003cp\u003eSin(DayofYear) and Cos(DayofYear): These features encode the cyclical nature of the day of the year using sine and cosine transformations, respectively. By representing the day of the year as a continuous cycle rather than a linear progression, these features help capture seasonal patterns and periodic fluctuations in Bitcoin prices more effectively.\u003c/p\u003e \u003cp\u003eIncorporating these date-related features into our predictive models enhances their ability to capture temporal dependencies and seasonal variations in Bitcoin's price movements, thereby improving the accuracy of our forecasting models.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eThe graphical representation in Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e depicts the trend of Bitcoin's closing prices over the analyzed time period. As observed, the Bitcoin price exhibits notable fluctuations and volatility, characterized by periodic peaks and troughs. This dynamic price behavior is indicative of the inherent volatility and speculative nature of the cryptocurrency market.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eIn the presented graphical representation in Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e, we observe the trading volume associated with Bitcoin transactions over the specified duration. The trading volume reflects the total number of Bitcoin units traded within a given timeframe, typically measured in terms of the number of coins exchanged or the equivalent value in fiat currency. The depicted volume graph showcases fluctuations in trading activity, with periods of heightened trading volume often coinciding with significant price movements or market events. This dynamic interplay between trading volume and price movements underscores the importance of market liquidity and investor sentiment in shaping the dynamics of the Bitcoin market.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eThe scatter plot depicted in Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e depicts the relationship between Bitcoin's closing price and trading volume. Each data point on the scatter plot represents a specific observation, with the x-axis corresponding to the closing price of Bitcoin and the y-axis representing the corresponding trading volume. The scatter plot allows for visual examination of any potential correlations or patterns between price movements and trading activity. By analyzing the distribution of data points, we can discern trends, identify outliers, and assess the strength of the price-volume relationship.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eWe utilized a heatmap visualization in Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e6\u003c/span\u003e to explore the correlations among various features extracted from the cryptocurrency market dataset obtained from Binance. The heatmap provides a visual representation of the pairwise correlation coefficients between different variables, offering insights into the interrelationships within the dataset. The heatmap analysis revealed significant correlations between certain market indicators and Bitcoin price movements. We observed a strong positive correlation between Bitcoin's price and trading volume, indicating that higher trading activity tends to coincide with price increases. Furthermore, the heatmap allowed us to identify potential multicollinearity issues among predictor variables, which could affect the robustness of predictive models. By examining the correlation matrix, we were able to discern redundant or highly correlated features, enabling us to refine the feature selection process and improve the model's predictive performance.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eIn this experiment, we adopted a standard train-test split approach, where 90% of the dataset was reserved for training the predictive models, and the remaining 10% was set aside for testing purposes. The division of the dataset into training and testing subsets ensures that the models are evaluated on unseen data, thereby providing a reliable assessment of their generalization performance. As illustrated in Fig.\u0026nbsp;\u003cspan refid=\"Fig7\" class=\"InternalRef\"\u003e7\u003c/span\u003e, the training data (depicted in blue) encompasses 90% of the total dataset and is utilized to train the machine learning and deep learning models. This portion of the dataset includes historical Bitcoin price data, along with relevant market indicators and trading volume, spanning a period of four years. Conversely, the testing data (depicted in orange) constitutes the remaining 10% of the dataset and is held out for model evaluation. This independent subset of the data allows us to assess the models' predictive performance on unseen instances, thereby gauging their ability to generalize to new data and make accurate forecasts. By delineating the training and testing data in this manner, we ensure a rigorous evaluation of the predictive models' efficacy in forecasting Bitcoin prices. Additionally, this approach mitigates the risk of overfitting, as the models are assessed on data that they have not been exposed to during the training phase.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cdiv id=\"Sec5\" class=\"Section3\"\u003e \u003ch2\u003eML Model\u003c/h2\u003e \u003cp\u003eMachine learning, a subset of artificial intelligence (AI), empowers computers to learn from data and make predictions or decisions without explicit programming. In the context of the referenced article, machine learning algorithms are harnessed to analyze historical Bitcoin price data, uncovering patterns or relationships that inform predictions of future price movements. By learning from past data, these algorithms forecast future data points, providing investors and researchers with insights into potential trends in the cryptocurrency market. The study employs diverse machine learning models, including deep learning, ensemble methods, and time series forecasting algorithms, each offering distinct advantages and capabilities for analyzing intricate financial data.\u003c/p\u003e \u003c/div\u003e \u003c/div\u003e \u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003eLSTM (Long Short-Term Memory)\u003c/h2\u003e \u003cp\u003eLong Short-Term Memory (LSTM) represents a specialized recurrent neural network (RNN) architecture meticulously crafted to grasp and model long-term dependencies inherent in sequential data(Christoforou et al., \u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2020\u003c/span\u003e). Unlike conventional RNNs, LSTM networks integrate dedicated memory cells and gating mechanisms, addressing the prevalent issue of vanishing gradients that often obstructs deep neural network training on lengthy sequences. Comprising multiple LSTM units, each unit encompasses three pivotal components: the input gate, the forget gate, and the output gate. The input gate orchestrates information influx into the memory cell, determining the relevance of data to update and retain. Conversely, the forget gate governs the retention or removal of irrelevant data from previous time steps, enhancing network adaptability. The output gate regulates the information flow from the memory cell to the output, discerning pertinent data for prediction. Central to LSTM architecture is the memory cell, acting as a cornerstone component by upholding a persistent internal state capable of storing information across extensive periods. This cell state undergoes updates via a blend of element-wise operations and activation functions, facilitating selective information retention or discarding based on relevance (Nasirtafreshi, \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). During training, LSTM networks undergo optimization via backpropagation through time (BPTT), a variant of the backpropagation algorithm tailored for sequential data. The network refines its parameters (weights and biases) by minimizing a predefined loss function, commonly quantified in terms of prediction error such as Mean Squared Error (MSE) or Mean Absolute Error (MAE).\u003c/p\u003e \u003cp\u003eLSTM networks excel in modeling and predicting time series data laden with long-term dependencies, rendering them particularly adept for tasks like speech recognition, language modeling, and financial forecasting. Leveraging LSTM's prowess in capturing and preserving information across extended sequences empowers it to discern intricate patterns and dynamics inherent in sequential data, including Bitcoin price fluctuations. In the realm of Bitcoin price prediction, LSTM networks analyze historical price data to forecast future price movements. Harnessing the network's capacity to discern temporal dependencies, LSTM models can potentially uncover recurring patterns, trends, and anomalies in Bitcoin price dynamics, thus assisting traders and investors in decision-making endeavors. Despite their efficacy, LSTM networks may encounter challenges such as overfitting, especially when trained on limited or noisy datasets. Rigorous hyperparameter tuning, incorporation of regularization techniques, and robust model validation are imperative to alleviate these challenges and ensure the reliability and generalization capability of LSTM-based predictions.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec7\" class=\"Section2\"\u003e \u003ch2\u003eBidirectional Long Short-Term Memory (Bi-LSTM)\u003c/h2\u003e \u003cp\u003eBidirectional Long Short-Term Memory (Bi-LSTM) represents an advancement over the conventional LSTM architecture by integrating bidirectional processing. Unlike standard LSTM models, which solely handle input sequences in one direction (i.e., from past to future), Bi-LSTM concurrently processes sequences in both directions. This bidirectional approach empowers the model to grasp not only past dependencies but also future context, thereby facilitating more informed predictions based on a comprehensive understanding of the input data. In Bi-LSTM, the input sequence is fed into two distinct LSTM layers: one processes the sequence in the forward direction, while the other processes it in the reverse direction. Subsequently, the hidden states of these two LSTM layers are either concatenated or merged at each time step, yielding a representation that amalgamates information from both past and future contexts(Huang et al., \u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). This bidirectional processing mechanism enables Bi-LSTM models to better comprehend the temporal dynamics inherent in the input data, consequently enabling them to capture intricate patterns that might elude unidirectional models.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec8\" class=\"Section2\"\u003e \u003ch2\u003eLight Gradient Boosting Machine (LGBM)\u003c/h2\u003e \u003cp\u003eLightGBM stands out as a robust gradient boosting framework celebrated for its efficiency, scalability, and exceptional performance when dealing with extensive datasets and intricate feature spaces. Originating from Microsoft, LightGBM introduces a novel gradient-based approach to decision tree boosting, enabling swift and accurate predictions across diverse machine learning tasks like regression, classification, and ranking. Belonging to the gradient boosting machines family, LightGBM iteratively constructs an ensemble of weak learners, typically decision trees, to collectively enhance predictive capabilities. Unlike conventional gradient boosting algorithms, LightGBM adopts a leaf-wise tree growth strategy, prioritizing nodes for splitting based on maximum reduction in the objective function's gradient. Its efficiency in model training owes to an innovative histogram-based algorithm for computing gradients and identifying optimal split points. By discretizing feature values into bins and constructing histograms, LightGBM effectively reduces memory usage and computational overhead, rendering it well-suited for large datasets with millions of samples and high-dimensional feature spaces. Notably, LightGBM seamlessly handles categorical features, employing techniques like one-hot encoding or ordinal encoding while preserving their semantic meaning for efficient computation during training. With an array of hyperparameters available for controlling model complexity, regularization, and optimization objectives, LightGBM incorporates regularization techniques such as shrinkage and feature sub-sampling to prevent overfitting and enhance generalization. Further optimization through techniques like grid search, random search, or Bayesian optimization aids in finding the optimal configuration for specific datasets and tasks. Its proficiency in balancing computational efficiency and predictive accuracy makes LightGBM a preferred choice for large-scale machine learning tasks across industries. Its capacity to handle categorical features, coupled with memory-efficient implementation and scalability to distributed computing environments, underscores its widespread adoption. In the realm of Bitcoin price prediction, LightGBM proves invaluable in modeling intricate relationships among market indicators, sentiment analysis, and external factors influencing Bitcoin prices. Leveraging its efficient training process and robust performance, LightGBM facilitates accurate forecasts of Bitcoin price movements, empowering traders, investors, and analysts to make well-informed decisions.\u003c/p\u003e \u003cdiv id=\"Sec9\" class=\"Section3\"\u003e \u003ch2\u003eeXtreme Gradient Boosting (XGBoost)\u003c/h2\u003e \u003cp\u003eXGBoost, an abbreviation for eXtreme Gradient Boosting, represents a potent machine learning algorithm within the ensemble learning family, specifically residing in gradient boosting frameworks. It has garnered acclaim for its remarkable performance across a broad spectrum of predictive modeling endeavors, spanning regression, classification, and ranking tasks. XGBoost operates by iteratively amalgamating multiple weak learners, commonly decision trees, to construct a robust predictive model. Each subsequent tree in the ensemble is trained to rectify the errors of its predecessors, culminating in a final model of high accuracy and resilience. A noteworthy advantage of XGBoost lies in its adeptness at efficiently handling intricate datasets. Leveraging gradient boosting, it optimizes the loss function by iteratively fitting new models to the residuals of preceding ones (Zhai et al., \u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e2020\u003c/span\u003e). This distinctive approach empowers XGBoost to discern subtle patterns and relationships within the data, rendering it particularly well-suited for tasks entailing structured data or high-dimensional feature spaces.\u003c/p\u003e \u003c/div\u003e \u003c/div\u003e \u003cdiv id=\"Sec10\" class=\"Section2\"\u003e \u003ch2\u003eModel Evaluation\u003c/h2\u003e \u003cp\u003eModel evaluation is a critical step in assessing the predictive accuracy and reliability of LSTM and LightGBM models for Bitcoin price prediction. Various performance metrics are utilized to quantify the discrepancy between predicted and actual prices. MAE (Mean Absolute Error) measures the average absolute difference between the predicted and actual prices over the entire test dataset.\u003c/p\u003e \u003cp\u003eMathematically, MAE is calculated as:\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec11\" class=\"Section2\"\u003e \u003ch2\u003eMAE = \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\frac{1}{t}{\\sum }_{t=1}^{T}|{y}_{t}-{y}_{t}^{{\\prime }}|\\)\u003c/span\u003e\u003c/span\u003e\u003c/h2\u003e \u003cp\u003eRMSE is another commonly used metric that penalizes larger prediction errors more heavily than smaller errors. It is calculated as the square root of the average of the squared differences between the predicted and actual prices(Wu et al., \u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e2018b\u003c/span\u003e):\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec12\" class=\"Section2\"\u003e \u003ch2\u003eRMSE = \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\sqrt{\\frac{1}{t}{\\sum }_{t=1}^{T}{({y}_{t}-{y}_{t}^{{\\prime }})}^{2} }\\)\u003c/span\u003e\u003c/span\u003e\u003c/h2\u003e \u003cp\u003eWhere, \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\({y}_{t}\\)\u003c/span\u003e\u003c/span\u003e represent the true price of Bitcoin, \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\({y}_{t}^{{\\prime }}\\)\u003c/span\u003e\u003c/span\u003e denote the predicted price of Bitcoin, and T indicate the specific period for prediction.\u003c/p\u003e \u003cp\u003eThe coefficient of determination, commonly denoted as R-squared (\u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\({R}^{2}\\)\u003c/span\u003e\u003c/span\u003e), quantifies the proportion of variance in the dependent variable (actual prices) that is accounted for by the independent variables (predicted prices). Ranging between 0 and 1, higher values signify a stronger alignment of the model with the observed data.\u003c/p\u003e \u003cp\u003eLSTM and LightGBM models are evaluated using the aforementioned performance metrics on the testing dataset. The results are compared to determine which model exhibits superior predictive accuracy and generalization capability for Bitcoin price prediction. The interpretation of evaluation results involves understanding not only the absolute performance metrics but also the practical implications of model predictions for real-world applications. Insights gained from the evaluation process inform decision-making processes for traders, investors, and stakeholders in the cryptocurrency market.\u003c/p\u003e \u003c/div\u003e"},{"header":"Results and discussion","content":"\u003cp\u003eThe performance of various machine learning models in predicting Bitcoin prices was assessed using diverse evaluation metrics. Results from the Long Short-Term Memory (LSTM) model indicate the following: Mean Absolute Error (MAE) on test data was 0.0106, Root Mean Squared Error (RMSE) was 0.0158, and the R-squared value was 0.6787. Conversely, the Bidirectional LSTM (Bi-LSTM) model displayed improved performance with MAE of 0.0096, RMSE of 0.0146, and R-squared of 0.7252. Furthermore, the LightGBM (LGBM) model surpassed both LSTM and Bi-LSTM, exhibiting significantly lower MAE (0.0082) and RMSE (0.0106), along with a higher R-squared value (0.854). Lastly, the XGBoost model achieved MAE of 0.0109, RMSE of 0.0136, and R-squared of 0.7587, positioning it as a competitive alternative to LSTM-based approaches. These findings suggest that LGBM offers superior predictive accuracy compared to LSTM, Bi-LSTM, and XGBoost models. The lower MAE and RMSE values imply that LGBM provides more precise Bitcoin price predictions, while the higher R-squared value indicates better overall fit to the test data. This performance superiority may be attributed to LGBM's inherent characteristics, such as efficient handling of large datasets and capturing complex nonlinear relationships within the data. Additionally, it is noteworthy that Bi-LSTM outperformed LSTM, underscoring the potential advantages of bidirectional architectures in capturing temporal dependencies in time series data. However, both LSTM and Bi-LSTM models lag behind LGBM and XGBoost in terms of predictive accuracy and overall performance. Overall, these results underscore the significance of selecting appropriate machine learning algorithms for cryptocurrency price prediction tasks. While LSTM and Bi-LSTM exhibit predictive capability, LGBM emerges as a more reliable and accurate choice for forecasting Bitcoin prices based on the evaluation metrics considered in this study.\u003c/p\u003e \u003cp\u003eThe loss curve for both training and validation datasets over epochs is illustrated in Fig.\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003e. This curve provides insights into the convergence of the models during the training process. Both training and validation loss curves are evaluated to ensure that the models are learning effectively without overfitting or underfitting. The actual vs predicted values for the test dataset are presented in Fig.\u0026nbsp;\u003cspan refid=\"Fig9\" class=\"InternalRef\"\u003e9\u003c/span\u003e. This visualization allows us to assess the predictive accuracy of each model by comparing the predicted values with the ground truth. The closer the predicted values are to the actual values, the higher the predictive accuracy of the model. The daily price trend is depicted in Fig.\u0026nbsp;\u003cspan refid=\"Fig10\" class=\"InternalRef\"\u003e10\u003c/span\u003e showcasing the conformity of different models' predictions with the actual price data. Models such as LGBM, Bi-LSTM, LSTM, and XGBoost are compared to determine which one exhibits the highest level of agreement with the actual price trends over time. In the analysis, a comparative view of key evaluation metrics, including Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R-Squared, across different models is presented in Fig.\u0026nbsp;\u003cspan refid=\"Fig11\" class=\"InternalRef\"\u003e11\u003c/span\u003e. Additionally, Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e provides a tabulated summary of these evaluation metrics for each model, allowing for a detailed comparison of their performance. Various evaluation metrics are displayed in a linear graph in Fig.\u0026nbsp;\u003cspan refid=\"Fig12\" class=\"InternalRef\"\u003e12\u003c/span\u003e, providing a comprehensive overview of the performance of each model. This visualization enables us to identify trends and patterns in the performance of different models across different evaluation metrics. Overall, the combination of visualizations and tabulated results facilitates a comprehensive analysis of the performance of machine learning models in predicting Bitcoin prices.\u003c/p\u003e \u003cp\u003eA detailed summary of the evaluation metrics associated with each model is provided in Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e. It includes metrics such as Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R-Squared (R^2) for each model, offering insights into their performance in predicting Bitcoin prices.\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eSummary of Performance Metrics\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"4\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eModel/Metric\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eMAE\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eRMSE\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003eR-Squared\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eLSTM\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.0101\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.0156\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.68\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eBI-LSTM\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.0096\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.0145\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.72\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eLGBM\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.0081\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.0105\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.85\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eXGBoost\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.0108\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.0136\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.75\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e"},{"header":"Conclusion","content":"\u003cp\u003eIn conclusion, our study explored the effectiveness of various machine learning models in predicting Bitcoin prices using historical data. Through rigorous experimentation and analysis, we evaluated the performance of models such as LSTM, Bi-LSTM, LGBM, and XGBoost, considering key evaluation metrics including MAE, RMSE, and R-Squared.The results demonstrated that machine learning models, particularly LGBM, exhibit promising predictive capabilities in forecasting Bitcoin prices. LGBM outperformed other models in terms of accuracy and efficiency, showcasing its potential as a robust tool for cryptocurrency price prediction. Overall, our findings contribute to the growing body of literature on cryptocurrency price prediction, offering practical implications for stakeholders in the cryptocurrency market. As the cryptocurrency landscape continues to evolve, further research and development in machine learning-based forecasting techniques are warranted to enhance our understanding and predictive capabilities in this domain.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n \u003cli\u003eChen, J., 2023. Analysis of Bitcoin Price Prediction Using Machine Learning. Journal of Risk and Financial Management 2023, Vol. 16, Page 51 16, 51. https://doi.org/10.3390/JRFM16010051\u003c/li\u003e\n \u003cli\u003eChristoforou, E., Emiris, I.Z., Florakis, A., 2020. Neural Networks for Cryptocurrency Evaluation and Price Fluctuation Forecasting. Springer Proceedings in Business and Economics 133\u0026ndash;149. https://doi.org/10.1007/978-3-030-37110-4_10/COVER\u003c/li\u003e\n \u003cli\u003eHuang, X., Li, Q., Tai, Y., Chen, Z., Liu, J., Shi, J., Liu, W., 2022. Time series forecasting for hourly photovoltaic power using conditional generative adversarial network and Bi-LSTM. Energy 246, 123403. https://doi.org/10.1016/J.ENERGY.2022.123403\u003c/li\u003e\n \u003cli\u003eKim, J., Kim, S., Wimmer, H., Liu, H., 2021. A Cryptocurrency Prediction Model Using LSTM and GRU Algorithms. Proceedings - 2021 IEEE/ACIS 6th International Conference on Big Data, Cloud Computing, and Data Science, BCD 2021 37\u0026ndash;44. https://doi.org/10.1109/BCD51206.2021.9581397\u003c/li\u003e\n \u003cli\u003eMichańk\u0026oacute;w, J., Sakowski, P., Ślepaczuk, R., 2022. LSTM in Algorithmic Investment Strategies on BTC and S\u0026amp;P500 Index. Sensors 2022, Vol. 22, Page 917 22, 917. https://doi.org/10.3390/S22030917\u003c/li\u003e\n \u003cli\u003eNasirtafreshi, I., 2022. Forecasting cryptocurrency prices using Recurrent Neural Network and Long Short-term Memory. Data Knowl Eng 139, 102009. https://doi.org/10.1016/J.DATAK.2022.102009\u003c/li\u003e\n \u003cli\u003eOrtu, M., Uras, N., Conversano, C., Bartolucci, S., Destefanis, G., 2022. On technical trading and social media indicators for cryptocurrency price classification through deep learning. Expert Syst Appl 198, 116804. https://doi.org/10.1016/J.ESWA.2022.116804\u003c/li\u003e\n \u003cli\u003ePatel, M.M., Tanwar, S., Gupta, R., Kumar, N., 2020. A Deep Learning-based Cryptocurrency Price Prediction Scheme for Financial Institutions. Journal of Information Security and Applications 55, 102583. https://doi.org/10.1016/J.JISA.2020.102583\u003c/li\u003e\n \u003cli\u003eRathore, M.M., Chaurasia, S., Shukla, D., Anand, P., 2023. Detection of Fraudulent Entities in Ethereum Cryptocurrency: A Boosting-based Machine Learning Approach. GLOBECOM 2023 - 2023 IEEE Global Communications Conference 6444\u0026ndash;6449. https://doi.org/10.1109/GLOBECOM54140.2023.10437184\u003c/li\u003e\n \u003cli\u003eRen, Y.S., Ma, C.Q., Kong, X.L., Baltas, K., Zureigat, Q., 2022. Past, present, and future of the application of machine learning in cryptocurrency research. Res Int Bus Finance 63, 101799. https://doi.org/10.1016/J.RIBAF.2022.101799\u003c/li\u003e\n \u003cli\u003eSeabe, P.L., Moutsinga, C.R.B., Pindza, E., 2023. Forecasting Cryptocurrency Prices Using LSTM, GRU, and Bi-Directional LSTM: A Deep Learning Approach. Fractal and Fractional 2023, Vol. 7, Page 203 7, 203. https://doi.org/10.3390/FRACTALFRACT7020203\u003c/li\u003e\n \u003cli\u003eWu, C.H., Lu, C.C., Ma, Y.F., Lu, R.S., 2018a. A new forecasting framework for bitcoin price with LSTM. IEEE International Conference on Data Mining Workshops, ICDMW 2018-November, 168\u0026ndash;175. https://doi.org/10.1109/ICDMW.2018.00032\u003c/li\u003e\n \u003cli\u003eWu, C.H., Lu, C.C., Ma, Y.F., Lu, R.S., 2018b. A new forecasting framework for bitcoin price with LSTM. IEEE International Conference on Data Mining Workshops, ICDMW 2018-November, 168\u0026ndash;175. https://doi.org/10.1109/ICDMW.2018.00032\u003c/li\u003e\n \u003cli\u003eZhai, N., Yao, P., Zhou, X., 2020. Multivariate time series forecast in industrial process based on XGBoost and GRU 1397\u0026ndash;1400. https://doi.org/10.1109/ITAIC49862.2020.9338878\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Time series forecasting, LSTM, Bi-LSTM, Deep learning, ML, LGBM, XGBoost, BTC, cryptocurrency, RNN.","lastPublishedDoi":"10.21203/rs.3.rs-4390390/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-4390390/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eThe cryptocurrency market, particularly Bitcoin, has witnessed significant volatility, making accurate price prediction a challenging yet crucial task. This research explores the application of four powerful machine learning algorithms), Light Gradient Boosting Machine (LightGBM , Long Short Term Memory (LSTM), Bidirectional Long Short Term Memory (BiLSTM) and Extreme Gradient Boosting (XGBoost), for forecasting Bitcoin prices. The study focuses on evaluating the predictive performance using Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) as the evaluation metrics. The LSTM and Bi-LSTM, a type of recurrent neural network (RNN), are known for that ability to capture long-term dependencies in time series data. On the other hand, LightGBM and XGBoost, a gradient boosting framework, excels in handling large datasets efficiently and delivering accurate predictions. By employing these algorithms, this research aims to enhance the accuracy of Bitcoin price predictions compared to traditional methods. The experimental setup involves training and validating the models on historical Bitcoin price data. The MAE and RMSE metrics are utilized to assess the models' predictive accuracy, providing a comprehensive evaluation of their performance. The comparative analysis of machine learning models sheds light on their strengths and weaknesses in the context of cryptocurrency price prediction. The results showcase the importance of employing advanced machine learning techniques in forecasting financial time series, highlighting the potential for improved decision-making in cryptocurrency trading and investment strategies.\u003c/p\u003e","manuscriptTitle":"Forecasting Bitcoin Prices: A Comparative Study of Machine Learning and Deep Learning Algorithms","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2024-05-09 10:38:05","doi":"10.21203/rs.3.rs-4390390/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"575c646c-5ac0-4bf3-9363-3953536d08f0","owner":[],"postedDate":"May 9th, 2024","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":31683485,"name":"Finance"}],"tags":[],"updatedAt":"2024-05-09T10:38:11+00:00","versionOfRecord":[],"versionCreatedAt":"2024-05-09 10:38:05","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-4390390","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-4390390","identity":"rs-4390390","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.