Source-linked AI summary
Anticipating cryptocurrency prices using machine learning
Laura Alessandretti, Abeer ElBahrawy, Luca Maria Aiello, Andrea Baronchelli
TL;DR
The paper tests whether cryptocurrency-market inefficiencies can be exploited with machine-learning-assisted trading strategies. Using daily data from 1,681 cryptocurrencies, it finds that simple algorithms outperform standard benchmarks and can anticipate short-term market evolution.
Problem
The study evaluates whether cryptocurrency trading strategies can outperform a baseline, addressing evidence relevant to potential market inefficiency exploitation.
Method
The study uses currency-return prediction models, including currency-specific models informed by whole-market behavior, to assist trading strategies.
Results
All strategies produced profit over the full period and many shorter periods, including with transaction fees up to 0.2%, while all three methods outperformed the baseline over the full period.
Takeaways & Limitations
Gradient-boosting decision-tree methods worked best, and the strategies remained profitable under transaction fees up to 1%.
Takeaways & Limitations
The study excludes cross-exchange price differences and intraday price fluctuations from its analysis.
Abstract
from arXiv · showhide
Machine learning and AI-assisted trading have attracted growing interest for the past few years. Here, we use this approach to test the hypothesis that the inefficiency of the cryptocurrency market can be exploited to generate abnormal profits. We analyse daily data for $1,681$ cryptocurrencies for the period between Nov. 2015 and Apr. 2018. We show that simple trading strategies assisted by state-of-the-art machine learning algorithms outperform standard benchmarks. Our results show that nontrivial, but ultimately simple, algorithmic mechanisms can help anticipate the short-term evolution of the cryptocurrency market.
Materials and Methods
The study uses daily cryptocurrency data from Coin Market Cap to forecast short-term returns with three supervised methods and compare prediction-based portfolios against a simple moving average baseline. The methods differ in whether XGboost models share information across currencies, specialize by currency, or use LSTM sequences of past returns.
- Forecasting methods: Method 1 uses one XGboost regression model across all currencies, with windowed summary features predicting each currency’s ROI.Features include averages, standard deviations, medians, last values, and trends for price, market capitalization, market share, rank, volume, and ROI.
- Portfolio construction: The baseline is a simple moving average strategy, and portfolios equally split initial capital among the top n currencies predicted to have positive returns.Portfolio performance is compared across investment portfolios built from the algorithms’ predictions.
Results
The machine-learning methods produced substantially higher cumulative returns than the baseline, especially under Sharpe-ratio optimisation and when prices were expressed in Bitcoin. Returns remained positive with transaction fees up to 0.2% for all methods, while Method 3 remained positive up to 1%.
- Cumulative returns: Under geometric mean optimisation, April 24 cumulative returns were ∼25 BTC for the Baseline, ∼19·10^3 BTC for Method 1, ∼1.25 BTC for Method 2, and ∼3.6·10^8 BTC for Method 3.The analysis used investments between January 1, 2016 and April 24, 2018.
- Theoretical upper bound: 6·10^123 BTC is the theoretical upper bound from investing every day in the most performing currency when Bitcoin availability is assumed unlimited.The paper characterises the exercise as theoretical, explaining why some reported figures appear exaggerated.
- Transaction fees: For fees up to 0.2%, all investment methods led on average to positive returns over the entire period, while Method 3 remained positive with fees up to 1%.The paper notes that typical exchange fees range from 0.1% to 0.5% of the traded amount.
- Optimisation and denomination: Performance was considerably better under Sharpe-ratio than geometric-mean-return optimisation, and algorithms performed better using Bitcoin rather than USD prices.The comparison concerns geometric mean returns across different periods and the corresponding price denomination.
Conclusion
The three machine-learning methods generated profits and outperformed the simple moving average baseline over the full period, with model performance depending on prediction horizon and input representation. Despite theoretical and data limitations, the methods consistently identified outperforming currencies, while market extensions remain future work.
- All strategies produced Bitcoin-denominated profits across the full period and many shorter trading periods, including with transaction fees up to 0.2%.
- The three methods outperformed the simple moving average baseline over the full investment period, and Sharpe-ratio optimisation achieved larger returns.
- Gradient-boosting methods worked best with 5/10-day prediction windows, whereas LSTM worked best with approximately 50 days and remained profitable with fees up to 1%.
- Recent prices and returns were leading predictors, and the currency-specific random-forest method performed best among the two random-forest approaches.
- The methods performed better using Bitcoin prices than USD prices, suggesting that forecasting individual currencies is easier than forecasting both market-wide and currency-specific developments.
- The study ignored cross-exchange price differences, intraday fluctuations, finite Bitcoin supply, and trade price impact; incorporating these factors and social-media effects is future work.
Appendix · A1 Parameter optimisation
Appendix A1 documents parameter optimisation across the baseline strategy and Methods 1–3. It examines sliding and training windows, currency counts, and neural-network settings under geometric-mean, Sharpe-ratio, and median-squared-error criteria.
- A1 Parameter optimisation: The baseline strategy optimises sliding-window w and currency-count n over time using geometric mean and Sharpe Ratio criteria.The analyses use prices in BTC.
- Appendix: Across the appendix analyses, parameter choices are presented as time-varying optimisations for trading strategies and error-based neural-network tuning.The reported parameters include w, Wtraining, n, training-window choices, number of epochs, and number of neurons.
- A1 Parameter optimisation: Method 1 optimises sliding-window w, training window Wtraining, and currency-count n under geometric mean and Sharpe Ratio criteria.The analyses use prices in BTC.
- A1 Parameter optimisation: Method 2 applies the same three-parameter optimisation—w, Wtraining, and n—under geometric mean and Sharpe Ratio criteria.The analyses use prices in BTC.
- A1 Parameter optimisation: Method 3 evaluates median squared error for ROI across training-window choices, epoch counts, and neuron counts.Results are shown for Ethereum, Bitcoin, and Ripple, using prices in Bitcoin.
- A1 Parameter optimisation: For Method 3, the number of currencies n is optimised over time under both geometric mean and Sharpe Ratio criteria.The analyses are performed using prices in BTC.
A2 Return under full knowledge of the market evolution.
This section presents an upper bound on cumulative returns obtained by investing daily in the currency with the highest return on the following day. It compares this full-knowledge benchmark with the baseline and three methods, with results shown in Bitcoin.
- A2 Return under full knowledge of the market evolution.: The upper-bound strategy invests every day in the currency with the highest return on the following day.It assumes knowledge of currencies’ prices on the following day.
- A2 Return under full knowledge of the market evolution.: Figure A6 compares cumulative returns for the full-knowledge strategy, the baseline, Method 1, Method 2, and Method 3.The strategies are represented by black, blue, orange, green, and red lines, respectively.
- A2 Return under full knowledge of the market evolution.: Results are shown in Bitcoin.
A3 Return obtained paying transaction fees.
Including transaction fees of 0.1%–1%, the methods retain positive performance when fees are sufficiently small. Between Jan. 2016 and Apr. 2018, all methods have mean returns above 1 up to 0.2% fees, while Method 3 remains positive up to 1%.
- Transaction-fee setup: Fees range from 0.1% to 1% in the transaction-cost analysis.The reported period is Jan. 2016–Apr. 2018.
- Transaction-fee setup: Trading is modeled as two daily transactions: selling altcoins for Bitcoin and buying new altcoins with Bitcoin.The setup reflects that arbitrary currency pairs cannot generally be traded directly.
- Returns with fees: Mean returns are larger than 1 for all methods at fees up to 0.2% between Jan. 2016 and Apr. 2018.These results are reported in Table A1.
- Returns with fees: Method 3 achieves positive returns at fees up to 1% during Jan. 2016–Apr. 2018.This is the highest fee threshold explicitly reported for positive returns among the methods.
- Returns with fees: Arbitrary-period results at 0.1% and 0.2% fees generally show positive gains when fees are small enough.These results are illustrated in Figures A7 and A8.
A4 Results in USD
Results expressed in USD show higher gains than those expressed in Bitcoin because Bitcoin’s USD price increased considerably during the study period. In most cases, using prices in BTC for prediction produced better results than using prices directly in USD.
- Bitcoin’s USD price increased considerably during the study period, so gains in USD were higher than gains in Bitcoin.
- USD gains in Figure A9 were obtained by predicting and constructing portfolios with BTC prices, then converting gains to USD without transaction fees.
- Table A2 compares results from algorithms run directly on prices in BTC versus prices in USD.
- In most cases, better results were obtained from prices in BTC than from prices directly in USD.
- Figure A9 reports cumulative USD returns for the baseline and Methods 1–3 under Sharpe Ratio and geometric mean optimisation, using prices in BTC.
A5 Geometric mean optimisation
The section presents geometric mean return optimisation across the baseline and three methods, evaluating returns between different points in time. Figure A10 visualises these returns using translated values and colour coding for gains and losses.
- A5 Geometric mean optimisation: Returns are computed between arbitrary start and end points within different periods of time.Figure A10 describes the geometric mean return between time “start” and “end”.
- A5 Geometric mean optimisation: Geometric mean returns are reported for the baseline, Method 1, Method 2, and Method 3.The corresponding results appear in Fig. A10-A through Fig. A10-D.
- A5 Geometric mean optimisation: Figure A10 displays translated geometric mean returns as G-1, with red indicating negative returns and blue indicating positive returns.The colour intensity is defined by the figure’s colour bar.