Explainable Artificial Intelligence Modelling for Bitcoin Price Forecasting
Abstract
Precise forecasting of Bitcoin prices has been an essential yet thought-provoking task in the jurisdiction of cryptocurrency trading. Explainable Artificial Intelligence (XAI) has emerged as a widely used tool among researchers across different fields. In this chapter, an XAI Modelling approach for Bitcoin price forecasting, integrating robust methodologies for data analysis and model development, has been proposed. The method starts by importing essential libraries such as matplotlib, pandas, numpy, and scikit-learn, enabling continuous visualisation, data manipulation, and model construction. For comprehensive analysis, historical Bitcoin price data is sourced from trustworthy platforms, and then it is loaded into a structured format. After data loading, the structure and characteristics of the dataset are explored through exploratory data analysis (EDA). To address missing values, techniques such as imputation or removal are used, while for underlying trends, patterns, and seasonality, time-series visualisation methods are used for Bitcoin prices. Descriptive statistics and correlation analysis are employed to further enrich the understanding, offering insights into price distributions and relationships with significant variables. Afterwards, the data goes through the preprocessing to prepare for model training. Min MaxScaler is employed for scaling the features, safeguarding the uniformity across input variables. According to the sequential nature of time series data, the model architecture is designed precisely. For their efficacy in time-series forecasting, Long Short-Term Memory (LSTM) was considered. The model is compiled with an appropriate loss function and optimiser, optimising predictive accuracy during training. Experimentation with hyperparameters further refines the model's performance, enhancing its generalisation ability.
Keywords: Explainable AI, Bitcoin, Price Forecasting, Exploratory Data Analysis, Model Building, Long Short-Term Memory (LSTM).
References
- Aggarwal, A., Gupta, I., Garg, N., Goel, A. (2019). Deep Learning Approach to Determine the Impact of Socio-Economic Factors on Bitcoin Price Prediction, 2019 Twelfth International Conference on Contemporary Computing (IC3) (pp. 1–5). https://doi.org/10.1109/IC3.2019.8844928
- Ahmed, I., Jeon, G., & Piccialli, F. (2022). From artificial intelligence to explainable artificial intelligence in industry 4.0: A survey on what, how, and where. IEEE Transactions on Industrial Informatics, 18(8), 5031–5042. https://doi.org/10.1109/TII.2022.3146552
- Angelov, P. P., Soares, E. A., Jiang, R., Arnold, N. I., & Atkinson, P. M. (2021). Explainable artificial intelligence: an analytical review. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 11(5), e1424. https://doi.org/10.1002/widm.1424
- Arrieta, A. B., Díaz-Rodríguez, N., Del Ser, J., Bennetot, A., Tabik, S., Barbado, A., & Herrera, F. (2020). Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Information fusion, 58, 82–115. https://doi.org/10.1016/j.inffus.2019.12.012
- Babaei, G., Giudici, P., & Raffinetti, E. (2022). Explainable artificial intelligence for crypto asset allocation. Finance Research Letters, 47, 102941. https://doi.org/10.1016/j.frl.2022.102941
- Carbó, J. M., & Gorjón, S. (2022). Application of machine learning models and interpretability techniques to identify the determinants of the price of Bitcoin.
- Chen, W., Xu, H., Lifen Jia, L., Gao, Y. (2021). Machine learning model for Bitcoin exchange rate prediction using economic and technology determinants. International Journal of Forecasting 37: 28–43. https://doi.org/10.1016/j.ijforecast.2020.02.008
- Confalonieri, R., Coba, L., Wagner, B., & Besold, T. R. (2020). A historical perspective of explainable Artificial Intelligence. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 11(1), e1391. https://doi.org/10.1002/widm.1391
- Conrad, C., Custovic, A., Ghysels, E. (2018). Long- and Short-Term Cryptocurrency Volatility Components: A GARCH-MIDAS Analysis. Journal Risk of Financial Management, 11(2), Article 23. https://doi.org/10.3390/jrfm11020023
- Das, A., & Rad, P. (2020). Opportunities and challenges in explainable artificial intelligence (XAI): A survey. arXiv preprint arXiv:2006.11371. https://doi.org/10.48550/arXiv.2006.11371
- Derbentsev, V., Datsenko, N., Babenko, V., Pushko, O., Pursky, O. (2020). Forecasting Cryptocurrency Prices Using an Ensemble-Based Machine Learning Approach. IEEE 707-712. https://doi.org/10.1109/PICST51311.2020.9468090
- Došilović, F. K., Brčić, M., & Hlupić, N. (2018, May). Explainable artificial intelligence: A survey. In 2018 41st International convention on information and communication technology, electronics and microelectronics (MIPRO) (pp. 0210–0215). IEEE.
- Dubey, A. K., Kumar, A., García-Díaz, V., Sharma, A. K., & Kanhaiya, K. (2021). Study and analysis of SARIMA and LSTM in forecasting time series data. Sustainable Energy Technologies and Assessments, 47, 101474. https://doi.org/10.1016/j.seta.2021.101474
- García-Medina, A.; Luu Duc Huynh, T. (2021). What Drives Bitcoin? An Approach from Continuous Local Transfer Entropy and Deep Learning Classification Models. Entropy, 23, 1582. https://doi.org/10.3390/e23121582
- Ghosh, I., & Jana, R. K. (2024). Clean energy stock price forecasting and response to macroeconomic variables: A novel framework using Facebook's Prophet, NeuralProphet and explainable AI. Technological Forecasting and Social Change, 200, 123148. https://doi.org/10.1016/j.techfore.2023.123148
- Goodell, J. W., Jabeur, S. B., Saâdaoui, F., & Nasir, M. A. (2023). Explainable artificial intelligence Modelling to forecast bitcoin prices. International Review of Financial Analysis, 88, 102702. https://doi.org/10.1016/j.irfa.2023.102702
- Gunning, D., & Aha, D. (2019). DARPA’s explainable artificial intelligence program. AI magazine, 40(2), 44–58.
- Guo, H., Zhang, D., Liu, S., Wang, L., & Ding, Y. (2021). Bitcoin price forecasting: A perspective of underlying blockchain transactions. Decision Support Systems, 151, 113650. https://doi.org/10.1016/j.dss.2021.113650
- Islam, S. R., Eberle, W., Ghafoor, S. K., & Ahmed, M. (2021). Explainable artificial intelligence approaches: A survey. arXiv preprint arXiv:2101.09429. https://doi.org/10.48550/arXiv.2101.09429
- Jagannath, N., Barbulescu, T., Sallam, K.M., Elgendi, I., Okon, A.A., McGrath, B., Jamalipour, A., Munasinghe. K. (2021). A Self-Adaptive Deep Learning-Based Algorithm for Predictive Analysis of Bitcoin Price. IEEE Access 9: 34054–66. https://doi.org/10.1109/ACCESS.2021.3061002
- Joshi, M., UmaMaheswaran, S. K., Vijayanand, N., Kafila, Tiwari, M., & Ola, M. O. (2023). Critical determinants of artificial intelligence (AI) in optimising training approach and identifying talents to implement change management. World Journal of Management and Economics, 17(3), 253–262.
- Kaur, R., & Roul, R. K. (2025). Development of a cryptocurrency price prediction model: Leveraging GRU and LSTM for Bitcoin, Litecoin and Ethereum. PeerJ Computer Science, 11, Article e2675. https://doi.org/10.7717/peerj-cs.2675
- Kenny, M. (2020) Investigating the predictability of a Chaotic time-series data using Reservoir computing, Deep-Learning and Machine- Learning on the short-, medium- and long-term pricing of Bitcoin and Ethereum, Dissertation, Technological University Dublin. https://doi.org/10.21427/42ks-q868
- Khedr, A., Arif, I., Pravija P.V., El-Bannany, M., Alhashmi, M., Sreedharan, M.. (2021). Cryptocurrency price prediction using traditional statistical and machine‐learning techniques: A survey. Intelligent Systems in Accounting, Finance and Management, 28. https://doi.org/10.1002/isaf.1488
- Khosravi, H., Shum, S. B., Chen, G., Conati, C., Tsai, Y. S., Kay, J., Knight, S., Martinez-Maldonado, R., Sadiq, S., & Gašević, D. (2022). Explainable artificial intelligence in education. Computers and Education: Artificial Intelligence, 3. https://doi.org/10.1016/j.caeai.2022.100074
- Klein, T., Thu, H.P., & Walther, T. (2018). Bitcoin is not the New Gold – A comparison of volatility, correlation, and portfolio performance. International Review of Financial Analysis, 59. 105-116. https://doi.org/10.1016/j.irfa.2018.07.010
- Kristjanpoller, W. & Minutolo, M. (2018). A hybrid volatility forecasting framework integrating GARCH, Artificial Neural network, Technical Analysis and Principal Components Analysis. Expert Systems with Applications, 109, 1-11. https://doi.org/10.1016/j.eswa.2018.05.011
- Kumar, N., Tripathi, P., Nanda, R.P., Tiwari, S., Sharma, S. (2024). Machine Learning for Smart Health Services in the Framework of Industry 5.0. In M. Khan, R. Khan, P. Praveen, A. R. Verma & M.K. Panda (Eds.), Infrastructure Possibilities and Human-Centered Approaches With Industry 5.0 (pp. 215-230). IGI Global Scientific Publishing. https://doi.org/10.4018/979-8-3693-0782-3.ch013
- Kumar, N., Agarwal, P., Gupta, G., Tiwari, S., Tripathi, P. (2024). AI-Driven Financial Forecasting: The Power of Soft Computing. In Bansal, S., Kumar, N., Agarwal, P. (Eds.), Intelligent Optimization Techniques for Business Analytics, pp. 146-170, IGI, Global, USA.
- Lahmiri, S., & Bekiros, S. (2019). Cryptocurrency forecasting with deep learning chaotic neural networks. Chaos, Solitons & Fractals, 118, 35-40. https://doi.org/10.1016/j.chaos.2018.11.014
- Lamothe-Fernández, P., Alaminos, D., Lamothe-López, P., Fernández-Gámez, M. A. (2020). Deep Learning Methods for Modelling Bitcoin Price. Mathematics. 8(8). 1245. https://doi.org/10.3390/math8081245
- Li, Y., & Dai, W. (2020). Bitcoin price forecasting method based on CNN‐LSTM hybrid neural network model. The Journal of Engineering, 344-347. https://doi.org/10.1049/joe.2019.1203
- Liu, Y., & Zhang, L. (2023, July). Cryptocurrency valuation: An explainable ai approach. In Science and Information Conference (pp. 785-807). Cham: Springer Nature Switzerland.
- McNally, S., Roche, J., & Caton, S. (2018, March). Predicting the price of bitcoin using machine learning. In 2018 26th Euromicro International Conference on parallel, distributed and network-based processing (PDP) (pp. 339-343). IEEE.
- Minh, D., Wang, H. X., Li, Y. F., & Nguyen, T. N. (2022). Explainable artificial intelligence: a comprehensive review. Artificial Intelligence Review, 1-66.
- Mishra, R., Tripathi, P., Kumar, N. (2024). Future Directions in the Applications of Machine Learning and Intelligent Optimization in Business Analytics. In Bansal, S., Kumar, N., Agarwal, P. (Eds.), Intelligent Optimization Techniques for business analytics, (pp. 49-76), IGI, Global. https://doi.org/10.4018/979-8-3693-1598-9.ch003
- Nakano, M., Takahashi, A., Takahashi, S. (2018). Bitcoin technical trading with artificial neural network. Physica A: Statistical Mechanics and its Applications, 510, 587-609. https://doi.org/10.1016/j.physa.2018.07.017
- Nassar, M., Salah, K., ur Rehman, M. H., & Svetinovic, D. (2020). Blockchain for explainable and trustworthy artificial intelligence. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 10(1), e1340.
- Phaladisailoed, T. Numnonda, T. (2018). Machine Learning Models Comparison for Bitcoin Price Prediction. In 2018 10th International Conference on Information Technology and Electrical Engineering (ICITEE), (pp. 506-511). https://doi.org/10.1016/j.physa.2018.07.017
- Rai, M., Tyagi, N., Tripathi, P., Kumar, N., & Kumari, P. (2023). Advancement in Agricultural Techniques With the Introduction of Artificial Intelligence and Image Processing. In M. Khan, B. Gupta, A. Verma, P. Praveen, & C. Peoples (Eds.), Smart Village Infrastructure and Sustainable Rural Communities (pp. 47-68).
- Rizwan, M., Narejo, S., & Javed, M. (2019, December). Bitcoin price prediction using deep learning algorithm. In 2019 13th International Conference on Mathematics, Actuarial Science, Computer Science and Statistics (MACS) (pp. 1-7). IEEE.
- Saxena, R., Dubey, D., Kaur, A., & Kaur, S. (2022). An Efficient Artificial Intelligence Model to Predict the Values of Cryptocurrencies. Mathematical Statistician and Engineering Applications, 71(4), 6351-6365.
- Shin, M., Mohaisen, D., & Kim, J. (2021). Bitcoin price forecasting via ensemble-based LSTM deep learning networks. 2021 International Conference on Information Networking (ICOIN), 603–608. https://doi.org/10.1109/ICOIN50884.2021.9333853
- Tandon, S., Tripathi, S., Saraswat, P. Dabas, C. (2019, March). Bitcoin Price Forecasting using LSTM and 10-Fold Cross validation. In 2019 International Conference on Signal Processing and Communication (ICSC) (pp. 323–328). IEEE
- Tjoa, E., & Guan, C. (2020). A survey on explainable artificial intelligence (xai): Toward medical xai. IEEE transactions on neural networks and learning systems, 32(11), 4793-4813.
- Tripathi, P., Kumar, N., Paroha, K. K., Rai, M., & Panda, M. K. (2024). Applications of deep learning in healthcare in the framework of Industry 5.0. In M. Khan, R. Khan, P. Praveen, A. R. Verma, & M. K. Panda (Eds.), Infrastructure possibilities and human-centered approaches with Industry 5.0 (pp. 69–85). IGI Global. https://doi.org/10.4018/979-8-3693-0782-3.ch005
- Tripathi, P., Kumar, N., Rai, M., & Khan, A. (2022). Applications of Deep Learning in Agriculture. In M. Khan, R. Khan, & P. Praveen (Eds.), Artificial Intelligence Applications in Agriculture and Food Quality Improvement (pp. 17-28). IGI Global Scientific Publishing. https://doi.org/10.4018/978-1-6684-5141-0.ch002
- Tripathi, P., Kumar, N., Rai, M., Shukla, P. K., & Verma, K. N. (2023). Applications of Machine Learning in Agriculture. In M. Khan, B. Gupta, A. Verma, P. Praveen, & C. Peoples (Eds.), Smart Village Infrastructure and Sustainable Rural Communities (pp. 99-118). IGI Global Scientific Publishing. https://doi.org/10.4018/978-1-6684-6418-2.ch006
- Vilone, G., & Longo, L. (2020). Explainable artificial intelligence: a systematic review. arXiv preprint arXiv:2006.00093.
- Vilone, G., & Longo, L. (2021). Notions of explainability and evaluation approaches for explainable artificial intelligence. Information Fusion, 76, 89-106. https://doi.org/10.1016/j.inffus.2021.05.009
- Walther, T., Klein, T., & Bouri, E. (2019). Exogenous drivers of Bitcoin and Cryptocurrency volatility – A mixed data sampling approach to forecasting. Journal of International Financial Markets, Institutions and Money, 63, Article 101133. https://doi.org/10.1016/j.intfin.2019.101133
- Zhang, D.H.; Lou, S. (2021). The application research of neural network and BP algorithm in stock price pattern classification and prediction. Future Generation Computer Systems, 115, 872–879. https://doi.org/10.1016/j.future.2020.10.009
- Zhu, Q., & Ogunsakin, R. (2023, September). Towards Explainable AI: Relationship Between Twitter Sentiment, User Behaviour, and Bitcoin Price Prediction. In Intelligent Systems Conference (pp. 433-447). Cham: Springer Nature Switzerland.
