IDEAS home Printed from https://ideas.repec.org/a/spr/fininn/v7y2021i1d10.1186_s40854-020-00217-x.html
   My bibliography  Save this article

Forecasting and trading cryptocurrencies with machine learning under changing market conditions

Author

Listed:
  • Helder Sebastião

    (CeBER, Faculty of Economics)

  • Pedro Godinho

    (CeBER, Faculty of Economics)

Abstract

This study examines the predictability of three major cryptocurrencies—bitcoin, ethereum, and litecoin—and the profitability of trading strategies devised upon machine learning techniques (e.g., linear models, random forests, and support vector machines). The models are validated in a period characterized by unprecedented turmoil and tested in a period of bear markets, allowing the assessment of whether the predictions are good even when the market direction changes between the validation and test periods. The classification and regression methods use attributes from trading and network activity for the period from August 15, 2015 to March 03, 2019, with the test sample beginning on April 13, 2018. For the test period, five out of 18 individual models have success rates of less than 50%. The trading strategies are built on model assembling. The ensemble assuming that five models produce identical signals (Ensemble 5) achieves the best performance for ethereum and litecoin, with annualized Sharpe ratios of 80.17% and 91.35% and annualized returns (after proportional round-trip trading costs of 0.5%) of 9.62% and 5.73%, respectively. These positive results support the claim that machine learning provides robust techniques for exploring the predictability of cryptocurrencies and for devising profitable trading strategies in these markets, even under adverse market conditions.

Suggested Citation

  • Helder Sebastião & Pedro Godinho, 2021. "Forecasting and trading cryptocurrencies with machine learning under changing market conditions," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 7(1), pages 1-30, December.
  • Handle: RePEc:spr:fininn:v:7:y:2021:i:1:d:10.1186_s40854-020-00217-x
    DOI: 10.1186/s40854-020-00217-x
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1186/s40854-020-00217-x
    File Function: Abstract
    Download Restriction: no

    File URL: https://libkey.io/10.1186/s40854-020-00217-x?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Bação Pedro & Duarte António Portugal & Sebastião Helder & Redzepagic Srdjan, 2018. "Information Transmission Between Cryptocurrencies: Does Bitcoin Rule the Cryptocurrency World?," Scientific Annals of Economics and Business, Sciendo, vol. 65(2), pages 97-117, June.
    2. Gkillas, Konstantinos & Katsiampa, Paraskevi, 2018. "An application of extreme value theory to cryptocurrencies," Economics Letters, Elsevier, vol. 164(C), pages 109-111.
    3. Pavel Ciaian & Miroslava Rajcaniova & d’Artis Kancs, 2016. "The economics of BitCoin price formation," Applied Economics, Taylor & Francis Journals, vol. 48(19), pages 1799-1815, April.
    4. Atsalakis, George S. & Atsalaki, Ioanna G. & Pasiouras, Fotios & Zopounidis, Constantin, 2019. "Bitcoin price forecasting with neuro-fuzzy techniques," European Journal of Operational Research, Elsevier, vol. 276(2), pages 770-780.
    5. Yechen Zhu & David Dickinson & Jianjun Li, 2017. "Erratum to: Analysis on the influence factors of Bitcoin’s price based on VEC model," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 3(1), pages 1-1, December.
    6. Panagiotidis, Theodore & Stengos, Thanasis & Vravosinos, Orestis, 2018. "On the determinants of bitcoin returns: A LASSO approach," Finance Research Letters, Elsevier, vol. 27(C), pages 235-240.
    7. Masafumi Nakano & Akihiko Takahashi & Soichiro Takahashi, 2018. "Bitcoin technical trading with artificial neural network," CIRJE F-Series CIRJE-F-1078, CIRJE, Faculty of Economics, University of Tokyo.
    8. Tiwari, Aviral Kumar & Jana, R.K. & Das, Debojyoti & Roubaud, David, 2018. "Informational efficiency of Bitcoin—An extension," Economics Letters, Elsevier, vol. 163(C), pages 106-109.
    9. Sun, Xiaolei & Liu, Mingxi & Sima, Zeqian, 2020. "A novel cryptocurrency price trend forecasting model based on LightGBM," Finance Research Letters, Elsevier, vol. 32(C).
    10. Takuya Shintate & Lukáš Pichl, 2019. "Trend Prediction Classification for High Frequency Bitcoin Time Series with Deep Learning," JRFM, MDPI, vol. 12(1), pages 1-15, January.
    11. Ross C Phillips & Denise Gorse, 2018. "Cryptocurrency price drivers: Wavelet coherence analysis revisited," PLOS ONE, Public Library of Science, vol. 13(4), pages 1-21, April.
    12. Caporale, Guglielmo Maria & Plastun, Alex, 2019. "The day of the week effect in the cryptocurrency market," Finance Research Letters, Elsevier, vol. 31(C).
    13. Yhlas Sovbetov, 2018. "Factors Influencing Cryptocurrency Prices: Evidence from Bitcoin, Ethereum, Dash, Litcoin, and Monero," Journal of Economics and Financial Analysis, Tripal Publishing House, vol. 2(2), pages 1-27.
    14. Koutmos, Dimitrios, 2018. "Return and volatility spillovers among cryptocurrencies," Economics Letters, Elsevier, vol. 173(C), pages 122-127.
    15. Laura Alessandretti & Abeer ElBahrawy & Luca Maria Aiello & Andrea Baronchelli, 2018. "Anticipating cryptocurrency prices using machine learning," Papers 1805.08550, arXiv.org, revised Nov 2018.
    16. Yuanyuan Zhang & Stephen Chan & Jeffrey Chu & Hana Sulieman, 2020. "On the Market Efficiency and Liquidity of High-Frequency Cryptocurrencies in a Bull and Bear Market," JRFM, MDPI, vol. 13(1), pages 1-14, January.
    17. Gregor Dorfleitner & Carina Lung, 2018. "Cryptocurrencies from the perspective of euro investors: a re-examination of diversification benefits and a new day-of-the-week effect," Journal of Asset Management, Palgrave Macmillan, vol. 19(7), pages 472-494, December.
    18. Parkinson, Michael, 1980. "The Extreme Value Method for Estimating the Variance of the Rate of Return," The Journal of Business, University of Chicago Press, vol. 53(1), pages 61-65, January.
    19. Urquhart, Andrew, 2016. "The inefficiency of Bitcoin," Economics Letters, Elsevier, vol. 148(C), pages 80-82.
    20. Bariviera, Aurelio F., 2017. "The inefficiency of Bitcoin revisited: A dynamic approach," Economics Letters, Elsevier, vol. 161(C), pages 1-4.
    21. Aharon, David Yechiam & Qadan, Mahmoud, 2019. "Bitcoin and the day-of-the-week effect," Finance Research Letters, Elsevier, vol. 31(C).
    22. Stavroyiannis, Stavros & Babalos, Vassilios, 2019. "Herding behavior in cryptocurrencies revisited: Novel evidence from a TVP model," Journal of Behavioral and Experimental Finance, Elsevier, vol. 22(C), pages 57-63.
    23. Masafumi Nakano & Akihiko Takahashi & Soichiro Takahashi, 2018. "Bitcoin technical trading with artificial neural network," CARF F-Series CARF-F-430, Center for Advanced Research in Finance, Faculty of Economics, The University of Tokyo.
    24. Wen, Fenghua & Xu, Longhao & Ouyang, Guangda & Kou, Gang, 2019. "Retail investor attention and stock price crash risk: Evidence from China," International Review of Financial Analysis, Elsevier, vol. 65(C).
    25. Sean Foley & Jonathan R Karlsen & Tālis J Putniņš, 2019. "Sex, Drugs, and Bitcoin: How Much Illegal Activity Is Financed through Cryptocurrencies?," The Review of Financial Studies, Society for Financial Studies, vol. 32(5), pages 1798-1853.
    26. Bouri, Elie & Molnár, Peter & Azzi, Georges & Roubaud, David & Hagfors, Lars Ivar, 2017. "On the hedge and safe haven properties of Bitcoin: Is it really more than a diversifier?," Finance Research Letters, Elsevier, vol. 20(C), pages 192-198.
    27. Charfeddine, Lanouar & Maouchi, Youcef, 2019. "Are shocks on the returns and volatility of cryptocurrencies really persistent?," Finance Research Letters, Elsevier, vol. 28(C), pages 423-430.
    28. Masafumi Nakano & Akihiko Takahashi & Soichiro Takahashi, 2018. "Bitcoin technical trading with artificial neural network," CARF F-Series CARF-F-441, Center for Advanced Research in Finance, Faculty of Economics, The University of Tokyo.
    29. Young Bin Kim & Jun Gi Kim & Wook Kim & Jae Ho Im & Tae Hyeong Kim & Shin Jin Kang & Chang Hun Kim, 2016. "Predicting Fluctuations in Cryptocurrency Transactions Based on User Comments and Replies," PLOS ONE, Public Library of Science, vol. 11(8), pages 1-17, August.
    30. Omane-Adjepong, Maurice & Alagidede, Imhotep Paul, 2019. "Multiresolution analysis and spillovers of major cryptocurrency markets," Research in International Business and Finance, Elsevier, vol. 49(C), pages 191-206.
    31. Jamal Bouoiyour & Refk Selmi, 2015. "What Does Bitcoin Look Like?," Annals of Economics and Finance, Society for AEF, vol. 16(2), pages 449-492, November.
    32. Balcilar, Mehmet & Bouri, Elie & Gupta, Rangan & Roubaud, David, 2017. "Can volume predict Bitcoin returns and volatility? A quantiles-based approach," Economic Modelling, Elsevier, vol. 64(C), pages 74-81.
    33. Masafumi Nakano & Akihiko Takahashi & Soichiro Takahashi, 2018. "Bitcoin Technical Trading with Articial Neural Network," CIRJE F-Series CIRJE-F-1090, CIRJE, Faculty of Economics, University of Tokyo.
    34. Gang Kou & Yanqun Lu & Yi Peng & Yong Shi, 2012. "Evaluation Of Classification Algorithms Using Mcdm And Rank Correlation," International Journal of Information Technology & Decision Making (IJITDM), World Scientific Publishing Co. Pte. Ltd., vol. 11(01), pages 197-225.
    35. Gurdgiev, Constantin & O’Loughlin, Daniel, 2020. "Herding and anchoring in cryptocurrency markets: Investor reaction to fear and uncertainty," Journal of Behavioral and Experimental Finance, Elsevier, vol. 25(C).
    36. Nadarajah, Saralees & Chu, Jeffrey, 2017. "On the inefficiency of Bitcoin," Economics Letters, Elsevier, vol. 150(C), pages 6-9.
    37. Dimitris Politis & Halbert White, 2004. "Automatic Block-Length Selection for the Dependent Bootstrap," Econometric Reviews, Taylor & Francis Journals, vol. 23(1), pages 53-70.
    38. Dastgir, Shabbir & Demir, Ender & Downing, Gareth & Gozgor, Giray & Lau, Chi Keung Marco, 2019. "The causal relationship between Bitcoin attention and Bitcoin returns: Evidence from the Copula-based Granger causality test," Finance Research Letters, Elsevier, vol. 28(C), pages 160-164.
    39. Cheah, Eng-Tuck & Fry, John, 2015. "Speculative bubbles in Bitcoin markets? An empirical investigation into the fundamental value of Bitcoin," Economics Letters, Elsevier, vol. 130(C), pages 32-36.
    40. Yechen Zhu & David Dickinson & Jianjun Li, 2017. "Analysis on the influence factors of Bitcoin’s price based on VEC model," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 3(1), pages 1-13, December.
    41. Catania, Leopoldo & Grassi, Stefano & Ravazzolo, Francesco, 2019. "Forecasting cryptocurrencies under model and parameter instability," International Journal of Forecasting, Elsevier, vol. 35(2), pages 485-501.
    42. Panagiotidis, Theodore & Stengos, Thanasis & Vravosinos, Orestis, 2019. "The effects of markets, uncertainty and search intensity on bitcoin returns," International Review of Financial Analysis, Elsevier, vol. 63(C), pages 220-242.
    43. Dwyer, Gerald P., 2015. "The economics of Bitcoin and similar private digital currencies," Journal of Financial Stability, Elsevier, vol. 17(C), pages 81-91.
    44. Adrian (Wai-Kong) Cheung & Eduardo Roca & Jen-Je Su, 2015. "Crypto-currency bubbles: an application of the Phillips-Shi-Yu (2013) methodology on Mt. Gox bitcoin prices," Applied Economics, Taylor & Francis Journals, vol. 47(23), pages 2348-2358, May.
    45. Steve Hyun & Jimin Lee & Jong-Min Kim & Chulhee Jun, 2019. "What Coins Lead in the Cryptocurrency Market: Using Copula and Neural Networks Models," JRFM, MDPI, vol. 12(3), pages 1-14, August.
    46. Chu, Jeffrey & Chan, Stephen & Zhang, Yuanyuan, 2020. "High frequency momentum trading with cryptocurrencies," Research in International Business and Finance, Elsevier, vol. 52(C).
    47. Tran, Vu Le & Leirvik, Thomas, 2020. "Efficiency in the markets of crypto-currencies," Finance Research Letters, Elsevier, vol. 35(C).
    48. Lahmiri, Salim & Bekiros, Stelios, 2019. "Cryptocurrency forecasting with deep learning chaotic neural networks," Chaos, Solitons & Fractals, Elsevier, vol. 118(C), pages 35-40.
    49. Tay, Francis E. H. & Cao, Lijuan, 2001. "Application of support vector machines in financial time series forecasting," Omega, Elsevier, vol. 29(4), pages 309-317, August.
    50. Baur, Dirk G. & Hong, KiHoon & Lee, Adrian D., 2018. "Bitcoin: Medium of exchange or speculative assets?," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 54(C), pages 177-189.
    51. Fan Fang & Carmine Ventre & Michail Basios & Leslie Kanthan & Lingbo Li & David Martinez-Regoband & Fan Wu, 2020. "Cryptocurrency Trading: A Comprehensive Survey," Papers 2003.11352, arXiv.org, revised Jan 2022.
    52. Nakano, Masafumi & Takahashi, Akihiko & Takahashi, Soichiro, 2018. "Bitcoin technical trading with artificial neural network," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 510(C), pages 587-609.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Helder Miguel Correia Virtuoso Sebastião & Paulo José Osório Rupino Da Cunha & Pedro Manuel Cortesão Godinho, 2021. "Cryptocurrencies and blockchain. Overview and future perspectives," International Journal of Economics and Business Research, Inderscience Enterprises Ltd, vol. 21(3), pages 305-342.
    2. Flori, Andrea, 2019. "News and subjective beliefs: A Bayesian approach to Bitcoin investments," Research in International Business and Finance, Elsevier, vol. 50(C), pages 336-356.
    3. Ahmed, Walid M.A., 2022. "Robust drivers of Bitcoin price movements: An extreme bounds analysis," The North American Journal of Economics and Finance, Elsevier, vol. 62(C).
    4. Andrea Flori, 2019. "Cryptocurrencies In Finance: Review And Applications," International Journal of Theoretical and Applied Finance (IJTAF), World Scientific Publishing Co. Pte. Ltd., vol. 22(05), pages 1-22, August.
    5. Aurelio F. Bariviera & Ignasi Merediz‐Solà, 2021. "Where Do We Stand In Cryptocurrencies Economic Research? A Survey Based On Hybrid Analysis," Journal of Economic Surveys, Wiley Blackwell, vol. 35(2), pages 377-407, April.
    6. Yue, Yao & Li, Xuerong & Zhang, Dingxuan & Wang, Shouyang, 2021. "How cryptocurrency affects economy? A network analysis using bibliometric methods," International Review of Financial Analysis, Elsevier, vol. 77(C).
    7. Pedro Bação & António Portugal Duarte & Helder Sebastião & Srdjan Redzepagic, 2018. "Information Transmission Between Cryptocurrencies: Does Bitcoin Rule the Cryptocurrency World?," Scientific Annals of Economics and Business (continues Analele Stiintifice), Alexandru Ioan Cuza University, Faculty of Economics and Business Administration, vol. 65(2), pages 97-117, June.
    8. R. K. Jana & Indranil Ghosh & Debojyoti Das, 2021. "A differential evolution-based regression framework for forecasting Bitcoin price," Annals of Operations Research, Springer, vol. 306(1), pages 295-320, November.
    9. Ren, Yi-Shuai & Ma, Chao-Qun & Kong, Xiao-Lin & Baltas, Konstantinos & Zureigat, Qasim, 2022. "Past, present, and future of the application of machine learning in cryptocurrency research," Research in International Business and Finance, Elsevier, vol. 63(C).
    10. Fan Fang & Carmine Ventre & Michail Basios & Leslie Kanthan & David Martinez-Rego & Fan Wu & Lingbo Li, 2022. "Cryptocurrency trading: a comprehensive survey," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 8(1), pages 1-59, December.
    11. Katsiampa, Paraskevi, 2019. "An empirical investigation of volatility dynamics in the cryptocurrency market," Research in International Business and Finance, Elsevier, vol. 50(C), pages 322-335.
    12. Fan Fang & Carmine Ventre & Michail Basios & Leslie Kanthan & Lingbo Li & David Martinez-Regoband & Fan Wu, 2020. "Cryptocurrency Trading: A Comprehensive Survey," Papers 2003.11352, arXiv.org, revised Jan 2022.
    13. Parthajit Kayal & Purnima Rohilla, 2021. "Bitcoin in the economics and finance literature: a survey," SN Business & Economics, Springer, vol. 1(7), pages 1-21, July.
    14. Caporale, Guglielmo Maria & Kang, Woo-Young & Spagnolo, Fabio & Spagnolo, Nicola, 2021. "Cyber-attacks, spillovers and contagion in the cryptocurrency markets," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 74(C).
    15. Rubaiyat Ahsan Bhuiyan & Afzol Husain & Changyong Zhang, 2023. "Diversification evidence of bitcoin and gold from wavelet analysis," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-36, December.
    16. Corbet, Shaen & Lucey, Brian & Urquhart, Andrew & Yarovaya, Larisa, 2019. "Cryptocurrencies as a financial asset: A systematic analysis," International Review of Financial Analysis, Elsevier, vol. 62(C), pages 182-199.
    17. Muhammad Owais Qarni & Saiqb Gulzar, 2021. "Portfolio diversification benefits of alternative currency investment in Bitcoin and foreign exchange markets," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 7(1), pages 1-37, December.
    18. Pattnaik, Debidutta & Hassan, M. Kabir & Dsouza, Arun & Tiwari, Aviral & Devji, Shridev, 2023. "Ex-post facto analysis of cryptocurrency literature over a decade using bibliometric technique," Technological Forecasting and Social Change, Elsevier, vol. 189(C).
    19. Haffar, Adlane & Le Fur, Eric, 2021. "Structural vector error correction modelling of Bitcoin price," The Quarterly Review of Economics and Finance, Elsevier, vol. 80(C), pages 170-178.
    20. Bedi, Prateek & Nashier, Tripti, 2020. "On the investment credentials of Bitcoin: A cross-currency perspective," Research in International Business and Finance, Elsevier, vol. 51(C).

    More about this item

    Keywords

    Bitcoin; Ethereum; Litecoin; Machine learning; Forecasting; Trading;
    All these keywords.

    JEL classification:

    • G11 - Financial Economics - - General Financial Markets - - - Portfolio Choice; Investment Decisions
    • G15 - Financial Economics - - General Financial Markets - - - International Financial Markets
    • G17 - Financial Economics - - General Financial Markets - - - Financial Forecasting and Simulation

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:fininn:v:7:y:2021:i:1:d:10.1186_s40854-020-00217-x. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.