Skip to main content
Log in

Prediction of cryptocurrency returns using machine learning

  • S.I.: Networks and Risk Management
  • Published:
Annals of Operations Research Aims and scope Submit manuscript

Abstract

In this study, the predictability of the most liquid twelve cryptocurrencies are analyzed at the daily and minute level frequencies using the machine learning classification algorithms including the support vector machines, logistic regression, artificial neural networks, and random forests with the past price information and technical indicators as model features. The average classification accuracy of four algorithms are consistently all above the 50% threshold for all cryptocurrencies and for all the timescales showing that there exists predictability of trends in prices to a certain degree in the cryptocurrency markets. Machine learning classification algorithms reach about 55–65% predictive accuracy on average at the daily or minute level frequencies, while the support vector machines demonstrate the best and consistent results in terms of predictive accuracy compared to the logistic regression, artificial neural networks and random forest classification algorithms.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2

Similar content being viewed by others

Notes

  1. See Noakes and Rajaratnam (2016) and Avdoulas et al. (2018) for more recent evidence.

  2. Some studies focus on dependency structure between Bitcoin prices and other variables. For example, see El Alaoui et al. (2019) and Bouri et al. (2018a, b, c). For other various aspects of the cryptocurrency markets, see Cretarola and Figà-Talamanca (2019), Giudici and Polinesi (2019) and Koutmos (2019).

  3. These are Bitcoin (BTC): 01/04/2013 to 23/06/2018, Litecoin (LTC): 19/05/2013 to 23/06/2018, Ethereum (ETH): 09/03/2016 to 23/06/2018, Ethereum Classic (ETC): 26/07/2016 to 23/06/2018

  4. We use four different sampling frequencies: 15-min, 30-min, 60-min, and daily.

  5. https://coinmarketcap.com/historical/20180617/.

  6. The logistic regression and other classification algorithms are implemented in Python 3.7 with the scikit-learn package available on the following website: https://scikit-learn.org/.

  7. A recent application of MCS test to cryptocurrency markets to determine the drivers of bitcoin volatility can be found in Walther et al. (2019).

References

  • Achelis, S. B. (1995). Technical analysis from A to Z (2nd ed.). New York: McGraw-Hill.

    Google Scholar 

  • Avdoulas, C., Bekiros, S., & Boubaker, S. (2018). Evolutionary-based return forecasting with nonlinear STAR models: Evidence from the Eurozone peripheral stock markets. Annals of Operations Research, 262, 307–333.

    Google Scholar 

  • Bariviera, A. F. (2017). The inefficiency of Bitcoin revisited: A dynamic approach. Economics Letters, 161, 1–4.

    Google Scholar 

  • Bouri, E., Das, M., Gupta, R., & Roubaud, D. (2018c). Spillovers between Bitcoin and other assets during bear and bull markets. Applied Economics, 50, 5935–5949.

    Google Scholar 

  • Bouri, E., Gupta, R., Lahiani, A., & Shahbaz, M. (2018a). Testing for asymmetric nonlinear short- and long-run relationships between Bitcoin, aggregate commodity and gold prices. Resources Policy, 57, 224–235.

    Google Scholar 

  • Bouri, E., Gupta, R., Lau, C. K. M., Roubaud, D., & Wang, S. (2018b). Bitcoin and global financial stress: A copula-based approach to dependence and causality in the quantiles. Quarterly Review of Economics and Finance, 69, 297–307.

    Google Scholar 

  • Bouri, E., Lau, C. K. M., Lucey, B. M., & Roubaud, D. (2019b). Trading volume and the predictability of return and volatility in the cryptocurrency market. Finance Research Letters, 29, 340–346.

    Google Scholar 

  • Bouri, E., Shahzad, S. J. H., & Roubaud, D. (2019a). Co-explosivity in the cryptocurrency market. Finance Research Letters, 29, 178–183.

    Google Scholar 

  • Brauneis, A., & Mestel, R. (2018). Price discovery of cryptocurrencies: Bitcoin and beyond. Economics Letters, 165, 58–61.

    Google Scholar 

  • Breiman, L. (2001). Random forests. Machine Learning, 45, 5–32.

    Google Scholar 

  • Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple technical trading rules and the stochastic properties of stock returns. Journal of Finance, 47, 1731–1764.

    Google Scholar 

  • Cochran, S. J., De Fina, R. H., & Mills, L. O. (1993). International evidence on predictability of stock returns. Financial Review, 28, 159–180.

    Google Scholar 

  • Cretarola, A., & Figà-Talamanca, G. (2019). Detecting bubbles in Bitcoin price dynamics via market exuberance. Annals of Operations Research. https://doi.org/10.1007/s10479-019-03321-z.

  • El Alaoui, M., Bouri, E., & Roubaud, D. (2019). Bitcoin price–volume: A multifractal cross-correlation approach. Finance Research Letters. https://doi.org/10.1016/j.frl.2018.12.011.

  • Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical work. Journal of Finance, 25, 383–417.

    Google Scholar 

  • Fama, E. F., & French, K. (1988). Permanent and temporary components of stock prices. Journal of Political Economy, 96, 246–273.

    Google Scholar 

  • Giudici, P., & Polinesi, G. (2019). Crypto price discovery through correlation networks. Annals of Operations Research. https://doi.org/10.1007/s10479-019-03282-3.

  • Glantz, M., & Kissell, R. (2013). Multi-asset risk modeling: Techniques for a global economy in an electronic and algorithmic trading era. Cambridge: Academic Press.

    Google Scholar 

  • Guresen, E., Kayakutlu, G., & Daim, T. (2011). Using artificial neural network models in stock market index prediction. Expert Systems with Applications, 38, 10389–10397.

    Google Scholar 

  • Hansen, P. R., Lunde, A., & Nason, J. M. (2011). The model confidence set. Econometrica, 79, 453–497.

    Google Scholar 

  • Huang, W., Nakamori, Y., & Wang, S.-Y. (2005). Forecasting stock market movement direction with support vector machine. Computers & Operations Research, 32, 2513–2522.

    Google Scholar 

  • Ince, H., & Trafalis, T. B. (2008). Short term forecasting with support vector machines and application to stock price prediction. International Journal of General Systems, 37, 677–687.

    Google Scholar 

  • Jamdee, S., & Los, C. A. (2007). Long memory options: LM evidence and simulations. Research in International Business and Finance, 21, 260–280.

    Google Scholar 

  • Ji, Q., Bouri, E., Roubaud, D., & Kristoufek, L. (2019). Information interdependence among energy, cryptocurrency and major commodity markets. Energy Economics, 81, 1042–1055.

    Google Scholar 

  • Jiang, Y., Nie, H., & Ruan, W. (2018). Time-varying long-term memory in Bitcoin market. Finance Research Letters, 25, 280–284.

    Google Scholar 

  • Kara, Y., Acar, M., Boyacioglu, O., & Baykan, K. (2011). Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul Stock Exchange. Expert Systems with Applications, 38, 5311–5319.

    Google Scholar 

  • Khaidem, L., Saha, S., & Dey, S. R. (2016). Predicting the direction of stock market prices using random forest. arXiv:1605.00003.

  • Khuntia, S., & Pattanayak, J. K. (2018). Adaptive market hypothesis and evolving predictability of Bitcoin. Economics Letters, 167, 26–28.

    Google Scholar 

  • Kim, K.-J. (2003). Financial time series forecasting using support vector machines. Neurocomputing, 55, 307–319.

    Google Scholar 

  • Koutmos, D. (2019). Market risk and Bitcoin returns. Annals of Operations Research. https://doi.org/10.1007/s10479-019-03255-6.

  • Kumar, M., Thenmozhi, M. (2006). Forecasting stock index movement: A comparison of support vector machines and random forest. SSRN Working Paper.

  • Kyaw, N. A., Los, C. A., & Zong, S. (2006). Persistence characteristics of Latin American financial markets. Journal of Multinational Financial Management, 16, 269–290.

    Google Scholar 

  • Lee, M.-C. (2009). Using support vector machine with a hybrid feature selection method to the stock trend prediction. Expert Systems with Applications, 36, 10896–10904.

    Google Scholar 

  • Lo, A. W., & Mackinlay, A. C. (1988). Stock market prices do not follow random walks: Evidence from a simple specification test. Review of Financial Studies, 1, 41–66.

    Google Scholar 

  • Mandelbort, B. (1971). When can price be arbitraged efficiently? A limit to the validity of the random walk and martingale properties. Review of Economic Statistics, 53, 225–236.

    Google Scholar 

  • Mandelbort, B. (1997). Fractals and scaling in finance: Discontinuity, concentration, risk. New York: Springer.

    Google Scholar 

  • Mensi, W., Lee, Y. J., Al-Yahyaee, K. H., Sensoy, A., & Yoon, S. M. (2019). Intraday downward/upward multifractality and long memory in Bitcoin and Ethereum markets: An asymmetric multifractal detrended fluctuation analysis. Finance Research Letters, 31, 19–25.

    Google Scholar 

  • Nadarajah, S., & Chu, J. (2017). On the inefficiency of Bitcoin. Economics Letters, 150, 6–9.

    Google Scholar 

  • Noakes, M. A., & Rajaratnam, K. (2016). Testing market efficiency on the Johannesburg Stock Exchange using the overlapping serial test. Annals of Operations Research, 243, 273–300.

    Google Scholar 

  • Patel, J., Shah, S., Thakkar, P., & Kotecha, K. (2015). Predicting stock and stock price index movement using trend deterministic data preparation and machine learning techniques. Expert Systems with Applications, 42, 259–268.

    Google Scholar 

  • Poterba, J., & Summers, L. H. (1988). Mean reversion in stock returns: Evidence and implications. Journal of Financial Economics, 22, 27–60.

    Google Scholar 

  • Principe, J. C., Euliano, N. R., & Lefebvre, W. C. (1999). Neural and adaptive systems: Fundamentals through simulations. New York: Wiley.

    Google Scholar 

  • Sensoy, A. (2019). The inefficiency of Bitcoin revisited: A high-frequency analysis with alternative cryptocurrencies. Finance Research Letters, 28, 68–73.

    Google Scholar 

  • Tiwari, A. K., Jana, R., Das, D., & Roubaud, D. (2018). Informational efficiency of Bitcoin—An extension. Economics Letters, 163, 106–109.

    Google Scholar 

  • Urquhart, A. (2016). The inefficiency of Bitcoin. Economics Letters, 148, 80–82.

    Google Scholar 

  • Vidal-Tomas, D., & Ibanez, A. (2018). Semi-strong efficiency of Bitcoin. Finance Research Letters, 27, 259–265.

    Google Scholar 

  • 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, 101133.

    Google Scholar 

  • Wei, W. C. (2018). Liquidity and market efficiency in cryptocurrencies. Economics Letters, 168, 21–24.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ahmet Sensoy.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix

Appendix

See Tables 16, 17 and 18.

Table 16 t test results for comparison of five classification algorithms, including ARIMA, logistic regression, support vector machines, artificial neural networks, and random forest classifier over different time scales
Table 17 Wilcoxon signed rank test results for comparison of five classification algorithms, including ARIMA, logistic regression, support vector machines, artificial neural networks, and random forest classifier over different time scales
Table 18 t test and Wilcoxon signed rank test results for comparison of five classification algorithms, including ARIMA, logistic regression, support vector machines, artificial neural networks, and random forest classifier over equally weighted (EW) and market capitalization weighted (MCW) indices and different time scales

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Akyildirim, E., Goncu, A. & Sensoy, A. Prediction of cryptocurrency returns using machine learning. Ann Oper Res 297, 3–36 (2021). https://doi.org/10.1007/s10479-020-03575-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10479-020-03575-y

Keywords

Navigation