# Leveraging Explainable AI to Support Cryptocurrency Investors
## 5 The CryptoMLE Tool  
Receiving advice from algorithmic advisors is becoming more and more popular for financial analysts [31]. However, relying on sophisticated Machine Learning models trained on massive datasets is particularly risky in financial market forecasting, because the ML models often act as black boxes and domain experts are not keen to trust. Explainable AI models provide insights into ML algorithms by indicating which features are more important and how they could affect ML predictions [32]. They can return either local or global explanations. In the former case, the insight is about a particular instance \(x\). The local model estimates the effect of the features in \(\mathcal{F}\) on \(f(x)\)[13]. Conversely, global models summarize the main patterns driving ML decisions (on whatever instance). In this work, we conveniently combine the local explanations of the cryptocurrency price predictions provided by SHAP to model the global influence on ML models of individual features, features subcategories and categories. We present a visual eXplainable AI tool, namely Cryptocurrency-based Machine Learning Explainer (CryptoMLE, in short). It supports cryptocurrency traders and investors in monitoring the performance of quantitative Machine Learning-based cryptocurrency predictions. CryptoMLE consists of an interactive dashboard summarizing the main feature contributions to the ML price predictions. A snapshot of the dashboard interface is depicted in Figure 1. The plot in the upper side of the dashboard shows the SHAP time series of the 10 most influential features in the prediction of class _uptrend_. The purpose is to explain how ML works within a restricted time period and how ML decisions vary over time. More specifically, a time series value sampled on day \(d\) consists of the mean Shapley value of a given feature \(F_{i}\) computed over the \(W\) days preceding \(d\) (Since historical data are collected at a daily granularity, each time point in the series corresponds to a distinct trading day.). The mean Shapley value of \(F_{i}\) indicates the effect of \(F_{i}\) on the ML model trained on \(d\) using a sliding window approach. For example, according to the SHAP series plot in Figure 1, the MD feature _close_resid_ appears to be the most influential one in the period between August 2017 and April 2018, whereas between May 2018 and December 2018, _Close_resid_ and _High_resid_ are joint winners. The SHAP series plot can be useful, for instance, for discretionary traders who need to select and monitor a relatively small subset of visual features. The bee-swarm summary plots in the lower side of the dashboard snapshot are pop-up windows that analysts might activate when they are interested in gaining insights into the characteristics of the ML model trained on a particular day. It shows the Shapley values of all instances belonging to a training window of size \(W\) (i.e., \(W\) points per feature). For the sake of readability, only the top-10 features in order of decreasing Shapley value are visualized. Figure 1: Interactive dashboard snapshot. Uptrend class. LTCUSD. Training window size \(W=90\). For example, according to the left hand-side bee-swarm summary plot in Figure 1, _close_resid_, _volume_pct_tag8__macd_12_26_, and _low_close_dist_pct_d30_ are the only features obtaining a significant number of positive Shapley values during the training window from the beginning of February 2017 to the end of July 2017. Comparing different summary plots over time can be useful, for instance, for detecting temporal changes in the ML decisions. Traders can manually verify and possibly revise the current trading strategy based on the alarms triggered by the eXplainable AI tool. To generate the plot, we apply the procedure described in Algorithm 1 considering one cryptocurrency at a time.