Anticipating Cryptocurrency Prices Using Machine Learning

13.Nov.2018 | Editorial

Machine Learning (ML) and AI-assisted trading have attracted growing interest over the past few years. Recently, a team composed by Italian researchers among the others (Alessandretti et al. 2018) have used this approach to test the hypothesis that the inefficiency of the cryptocurrency market can be exploited to generate abnormal profits. Analyzing cryptocurrencies daily data for the period between November 2015 and April 2018, they show that simple trading strategies assisted by state-of-the-art ML algorithms outperform standard benchmarks. Their results also show that nontrivial, but ultimately simple, algorithmic mechanisms can help anticipate the short-term evolution of the cryptocurrency market.

More specifically the authors tested the performance of three forecasting models on daily cryptocurrency prices. Two of them are based on gradient boosting decision trees and while the third is based on long short-term memory (LSTM) recurrent neural networks. In the first method, the same model was used to predict the return on investment for all currencies; in the second method, they built a different model for each currency that uses information on the behavior of the whole market to make a prediction on that single currency; finally, in the third model, they used a different model for each currency, where the prediction is based on previous prices of the currency.

They also built investment portfolios based on the predictions of the different method and compared their performance with that of a baseline represented by the well-known simple moving average (SMA) strategy used as a null model in the stock market prediction. The parameters of each model were optimized for all but the last method on a daily basis, based on the outcome of each parameters choice in previous times. Two evaluation metrics for parameter optimization and portfolios’ performance were used: the geometric mean return and the Sharpe ratio. To discount the effect of the overall market growth, cryptocurrencies prices were expressed in Bitcoin (this implied that Bitcoin was excluded from the analysis). All strategies produced profit expressed in Bitcoin over the entire considered period and for a large set of shorter trading periods (i.e. different combinations of start and end dates for the trading activity), also when transaction fees up to 0.2% are considered.

The three methods performed better than the baseline strategy when the investment strategy was run over the whole period considered. The optimization of parameters based on the Sharpe ratio achieved larger returns. Methods based on gradient boosting decision trees (the first two ones) worked best when predictions were based on short-term windows of 5/10 days, suggesting they exploit well mostly short-term dependencies. Instead, LSTM recurrent neural networks worked best when predictions were based on ~ 50 days of data, since they are able to capture also long-term dependencies and are very stable against price volatility. They allowed making profit also if transaction fees up to 1% are considered. Anyway, methods based on gradient boosting decision trees allow better interpreting results. The researchers found that the prices and returns of a currency in the last few days preceding the prediction were leading factors to anticipate its behavior. Among the two methods based on random forests, the second one (i.e. that considering a different model for each currency) performed best. Finally, it is worth noting that the three methods proposed perform better when predictions are based on prices in Bitcoin rather than prices in USD. This suggests that forecasting simultaneously the overall cryptocurrency market trend and the developments of individual currencies is more challenging than forecasting the latter alone.

This study has some limitations though. First, the existence of different prices on different exchanges has not been exploited: the consideration of that diversity could open the way to significantly higher returns on investment. Second, ignored intraday price fluctuations were ignored: only an average daily price was considered. Finally, and crucially, the authors ran a theoretical test in which the available supply of Bitcoin is unlimited and none of their trades affect the market. Notwithstanding these simplifying assumptions, the methods presented were systematically and consistently able to identify outperforming currencies.

A different yet promising approach to the study cryptocurrencies consists in quantifying the impact of public opinion, as measured through social media traces, on the market behavior, in the same spirit in which this was done for the stock market, a topic already dealt with in these editorials. While it was shown that social media traces can be also effective predictors of Bitcoin and other currencies price fluctuations, the knowledge of their effects on the whole cryptocurrency market remains limited, thus constituting an interesting direction for future work.