Pump It: Twitter Sentiment Analysis for Cryptocurrency Price Prediction
Abstract
:1. Introduction
- Does Twitter offer valuable information for price prediction? Are some tokens more prone to social media influence than others?
- Can the NHITS be a new state-of-the-art model for cryptocurrency price prediction?
- Are the behaviours on the bull and bear markets profoundly different and how should one adjust the models used for price predictions depending on the state of the market?
2. Related Works
- Multi-Rate Data Sampling: This employs sub-sampling layers, thereby reducing memory demands and necessary computations while preserving the model’s ability to detect long-range dependencies;
- Hierarchical Interpolation: This mechanism ensures the smoothness of multi-step predictions by reducing the dimensionality of the neural network’s prediction.
3. Data
3.1. Data Processing
- Bear market: from October 2017 to August 2020, a period characterised by a sluggish cryptocurrency market and a major downturn in 2018.
- Bull market: from October 2017 to February 2021, encompassing all available data, with the final year and a half marked by significant appreciation in nearly all tokens.
3.2. Performance Evaluation
3.3. Model Description
4. Results
4.1. Model Comparison
BULL RMSEP Comparison between Models | |||
RMSEP | OLS-1-S | LSTM-ALL | NHITS-ALL |
ada | 9.15% | 46.2% | 5.57% |
bnb | 5.60% | 33.4% | 5.14% |
btc | 3.62% | 37.6% | 3.60% |
doge | 10.52% | 53.9% | 8.15% |
eth | 4.37% | 67.0% | 4.36% |
iota | 7.06% | 38.9% | 7.53% |
link | 10.27% | 76.0% | 5.74% |
ltc | 4.63% | 30.8% | 4.52% |
trx | 8.22% | 77.4% | 4.75% |
xlm | 8.40% | 305.0% | 5.81% |
xmr | 4.70% | 39.3% | 4.30% |
xrp | 15.41% | 21.3% | 5.99% |
BEAR RMSEP Comparison between Models | |||
RMSEP | OLS1-P | LSTM-ALL | NHITS-ALL |
ada | 4.78% | 46.1% | 5.62% |
bnb | 4.54% | 33.4% | 4.03% |
btc | 3.22% | 37.6% | 3.16% |
doge | 13.22% | 53.8% | 4.38% |
eth | 4.20% | 66.9% | 3.80% |
iota | 4.66% | 38.9% | 5.03% |
link | 5.03% | 75.8% | 4.85% |
ltc | 5.03% | 30.8% | 3.72% |
trx | 23.15% | 77.3% | 5.25% |
xlm | 11.09% | 304.6% | 10.82% |
xmr | 3.69% | 39.2% | 4.02% |
xrp | 11.59% | 21.3% | 3.18% |
4.2. Further Investigation
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Appendix A
OLS1 BULL | |||
RMSEP | OLS-1-All | OLS-1-P | OLS-1-S |
ada | 10.08% | 9.10% | 9.15% |
bnb | 5.76% | 5.40% | 5.60% |
btc | 3.73% | 3.57% | 3.62% |
doge | 10.85% | 11.09% | 10.52% |
eth | 4.53% | 4.39% | 4.37% |
iota | 7.41% | 5.46% | 7.06% |
link | 10.14% | 9.14% | 10.27% |
ltc | 4.85% | 4.62% | 4.63% |
trx | 8.82% | 8.23% | 8.22% |
xlm | 9.05% | 8.32% | 8.40% |
xmr | 4.72% | 9.70% | 4.70% |
xrp | 15.88% | 15.63% | 15.41% |
OLS1 BEAR | |||
RMSEP | OLS1-ALL | OLS1-P | OLS1-S |
ada | 7.53% | 4.78% | 6.42% |
bnb | 5.32% | 4.54% | 4.96% |
btc | 3.35% | 3.22% | 3.20% |
doge | 14.37% | 13.22% | 14.83% |
eth | 4.35% | 4.20% | 4.11% |
iota | 8.70% | 4.66% | 8.33% |
link | 5.02% | 5.03% | 5.04% |
ltc | 8.59% | 5.03% | 5.22% |
trx | 28.80% | 23.15% | 27.94% |
xlm | 12.99% | 11.09% | 11.33% |
xmr | 3.80% | 3.69% | 3.83% |
xrp | 12.54% | 11.59% | 13.10% |
LOGIT BULL | |||
Accuracy | LOGIT-All | LOGIT-P | LOGIT-S |
ada | 59.95% | 54.30% | 59.41% |
bnb | 56.99% | 56.99% | 56.18% |
btc | 50.81% | 52.69% | 52.69% |
doge | 52.42% | 54.30% | 55.38% |
eth | 58.60% | 55.91% | 58.60% |
iota | 55.38% | 54.57% | 55.11% |
link | 54.57% | 56.45% | 55.11% |
ltc | 53.23% | 51.61% | 53.49% |
trx | 54.84% | 54.03% | 53.76% |
xlm | 56.18% | 55.65% | 57.26% |
xmr | 57.53% | 56.72% | 59.68% |
xrp | 55.65% | 52.42% | 54.84% |
LOGIT BEAR | |||
Accuracy | LOGIT-All | LOGIT-P | LOGIT-S |
ada | 60.00% | 58.92% | 60.54% |
bnb | 60.54% | 61.62% | 61.08% |
btc | 56.22% | 58.11% | 58.11% |
doge | 56.22% | 54.59% | 54.59% |
eth | 60.27% | 60.00% | 59.73% |
iota | 54.59% | 54.59% | 54.32% |
link | 56.49% | 54.05% | 55.41% |
ltc | 54.32% | 59.73% | 59.19% |
trx | 52.43% | 54.05% | 54.32% |
xlm | 57.84% | 55.68% | 57.57% |
xmr | 56.76% | 58.38% | 59.73% |
xrp | 55.95% | 51.89% | 56.49% |
R comparison across models and market states | ||||
Bull | Bear | |||
Coin | NHITS | OLS1 | NHITS | OLS1 |
ada | 98.68% | 99.74% | 99.14% | 99.16% |
bnb | 97.48% | 99.85% | 97.67% | 97.25% |
btc | 99.55% | 100.00% | 96.80% | 96.92% |
doge | 96.27% | 99.31% | 91.79% | 73.39% |
eth | 99.57% | 100.00% | 97.62% | 98.07% |
iota | 98.45% | 99.74% | 96.84% | 96.85% |
link | 99.11% | 92.18% | 98.87% | 98.74% |
ltc | 99.08% | 99.99% | 98.06% | 97.80% |
trx | 97.96% | 99.51% | 95.18% | 69.07% |
xlm | 98.51% | 99.45% | 96.42% | 93.45% |
xmr | 98.99% | 99.79% | 97.11% | 97.32% |
xrp | 96.39% | 96.82% | 97.20% | 88.86% |
MAE comparison across models and market states | ||||
Bull | Bear | |||
Coin | NHITS | OLS1 | NHITS | OLS1 |
ada | 0.60% | 1.13% | 0.17% | 0.19% |
bnb | 0.45% | 0.23% | 0.15% | 0.18% |
btc | 0.72% | 0.11% | 0.28% | 0.27% |
doge | 0.75% | 0.62% | 0.11% | 0.39% |
eth | 0.76% | 0.06% | 0.25% | 0.25% |
iota | 0.36% | 0.25% | 0.14% | 0.27% |
link | 1.24% | 0.85% | 0.31% | 0.31% |
ltc | 0.67% | 0.26% | 0.40% | 0.58% |
trx | 0.34% | 0.44% | 0.25% | 1.64% |
xlm | 0.73% | 0.86% | 0.77% | 0.72% |
xmr | 0.65% | 0.15% | 0.38% | 0.32% |
xrp | 0.31% | 0.93% | 0.13% | 0.70% |
1 | Sourced from https://www.vox.com/recode/2021/5/18/22441831/elon-musk-bitcoin-dogecoin-crypto-prices-tesla, accessed on 1 August 2023. |
2 | https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english, accessed on 12 January 2022. |
3 | https://textblob.readthedocs.io/en/dev/, accessed on 23 February 2022. |
4 | Mid-frequency trading involves adjusting the portfolio on a daily basis. |
References
- Abraham, Jethin, Daniel Higdon, John Nelson, and Juan Ibarra. 2018. Cryptocurrency price prediction using tweet volumes and sentiment analysis. SMU Data Science Review 1: 13–22. [Google Scholar]
- Cabanilla, Kurt Izak M. 2016. The Future of Cryptocurrency: Forecasting the Bitcoin-Philippine Peso Exchange Rate Using Sarima through Tramo-Seats. Available online: https://www.academia.edu/31926493/The_Future_of_Cryptocurrency_Forecasting_The_Bitcoin_Philippine_Peso_Exchange_Rate_Using_SARIMA_Through_TRAMO_SEATS (accessed on 1 January 2023).
- Challu, Cristian, Kin G. Olivares, Boris N. Oreshkin, Federico Garza, Max Mergenthaler-Canseco, and Artur Dubrawski. 2022. N-hits: Neural hierarchical interpolation for time series forecasting. Proceedings of the AAAI Conference on Artificial Intelligence 37: 6989–97. [Google Scholar] [CrossRef]
- Colianni, Stuart, Stephanie Rosales, and Michael Signorotti. 2015. Algorithmic trading of cryptocurrency based on twitter sentiment analysis. CS229 Project 1: 1–4. [Google Scholar]
- Dwivedi, DwijendraNath, and Anilkumar Vemareddy. 2023. Sentiment analytics for crypto pre and post covid: Topic modeling. Paper presented at Distributed Computing and Intelligent Technology: 19th International Conference, ICDCIT 2023, Bhubaneswar, India, January 18–22; pp. 303–15. [Google Scholar]
- Garg, Amish, Tanav Shah, Vinay Kumar Jain, and Raksha Sharma. 2021. Cryptop12: A dataset for cryptocurrency price movement prediction from tweets and historical prices. Paper presented at 2021 20th IEEE International Conference on Machine Learning and Applications (ICMLA), Pasadena, CA, USA, December 13–16; pp. 379–84. [Google Scholar]
- Gupta, Hemendra, and Rashmi Chaudhary. 2022. An empirical study of volatility in cryptocurrency market. Journal of Risk and Financial Management 15: 513. [Google Scholar] [CrossRef]
- Hochreiter, Sepp, and Jürgen Schmidhuber. 1997. Long short-term memory. Neural Computation 9: 1735–80. [Google Scholar] [CrossRef] [PubMed]
- Huang, Xin, Wenbin Zhang, Xuejiao Tang, Mingli Zhang, Jayachander Surbiryala, Vasileios Iosifidis, Zhen Liu, and Ji Zhang. 2021. Lstm based sentiment analysis for cryptocurrency prediction. Paper presented at International Conference on Database Systems for Advanced Applications, Tianjin, China, April 11–14; pp. 617–21. [Google Scholar]
- Hutto, Clayton, and Eric Gilbert. 2014. Vader: A parsimonious rule-based model for sentiment analysis of social media text. Paper presented at International AAAI Conference on Web and Social Media, Ann Arbor, MI, USA, June 1–4; vol. 8, pp. 216–25. [Google Scholar]
- Iyer, Tara. 2022. Cryptic Connections: Spillovers between Crypto and Equity Markets. Washington, DC: International Monetary Fund. [Google Scholar]
- Kim, Gyeongmin, Minsuk Kim, Byungchul Kim, and Heuiseok Lim. 2023. Cbits: Crypto bert incorporated trading system. IEEE Access 11: 6912–21. [Google Scholar] [CrossRef]
- Laboure, Marion, Markus H.-P. Müller, Gerit Heinz, Sagar Singh, and Stefan Köhling. 2021. Cryptocurrencies and cbdc: The route ahead. Global Policy 12: 663–76. [Google Scholar] [CrossRef]
- Li, Xiaodong, Haoran Xie, Li Chen, Jianping Wang, and Xiaotie Deng. 2014. News impact on stock price return via sentiment analysis. Knowledge-Based Systems 69: 14–23. [Google Scholar]
- Mittal, Anshul, and Arpit Goel. 2012. Stock Prediction Using Twitter Sentiment Analysis. Standford: Standford University, p. 2352. Available online: http://cs229.stanford.edu/proj2011/GoelMittal-StockMarketPredictionUsingTwitterSentimentAnalysis.pdf (accessed on 1 January 2023).
- Nagel, Peter. 2018. Psychological Effects during Cryptocurrency Trading. Available online: https://space.nurdspace.nl/~buzz/MasterThesisPeter.pdf (accessed on 1 January 2023).
- Nguyen, Thien Hai, Kiyoaki Shirai, and Julien Velcin. 2015. Sentiment analysis on social media for stock movement prediction. Expert Systems with Applications 42: 9603–11. [Google Scholar]
- Patel, Mohil Maheshkumar, Sudeep Tanwar, Rajesh Gupta, and Neeraj Kumar. 2020. A deep learning-based cryptocurrency price prediction scheme for financial institutions. Journal of Information Security and Applications 55: 102583. [Google Scholar]
- Peng, Yaohao, Pedro Henrique Melo Albuquerque, Jader Martins Camboim de Sá, Ana Julia Akaishi Padula, and Mariana Rosa Montenegro. 2018. The best of two worlds: Forecasting high frequency volatility for cryptocurrencies and traditional currencies with support vector regression. Expert Systems with Applications 97: 177–92. [Google Scholar] [CrossRef]
- Prasad, Gaurav, Gaurav Sharma, and Dinesh Kumar Vishwakarma. 2022. Sentiment analysis on cryptocurrency using youtube comments. Paper presented at 2022 6th International Conference on Computing Methodologies and Communication (ICCMC), Erode, India, March 29–31; pp. 730–33. [Google Scholar]
- Sanh, Victor, Lysandre Debut, Julien Chaumond, and Thomas Wolf. 2019. Distilbert, a distilled version of bert: Smaller, faster, cheaper and lighter. arXiv arXiv:1910.01108. [Google Scholar]
- Vaswani, Ashish, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in Neural Information Processing Systems. Available online: https://mitpress.mit.edu/9780262561457/advances-in-neural-information-processing-systems/ (accessed on 1 January 2023).
- Vo, Anh-Dung, Quang-Phuoc Nguyen, and Cheol-Young Ock. 2019. Sentiment analysis of news for effective cryptocurrency price prediction. International Journal of Knowledge Engineering 5: 47–52. [Google Scholar] [CrossRef]
- Wong, Eugene Lu Xian. 2021. Prediction of Bitcoin Prices Using Twitter Data and Natural Language Processing. Available online: https://dukespace.lib.duke.edu/dspace/bitstream/handle/10161/24081/Prediction%2520of%2520Bitcoin%2520prices%2520using%2520Twitter%2520Data%2520and%2520Natural%2520Language%2520Processing.pdf?sequence=2 (accessed on 1 January 2023).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Koltun, V.; Yamshchikov, I.P. Pump It: Twitter Sentiment Analysis for Cryptocurrency Price Prediction. Risks 2023, 11, 159. https://doi.org/10.3390/risks11090159
Koltun V, Yamshchikov IP. Pump It: Twitter Sentiment Analysis for Cryptocurrency Price Prediction. Risks. 2023; 11(9):159. https://doi.org/10.3390/risks11090159
Chicago/Turabian StyleKoltun, Vladyslav, and Ivan P. Yamshchikov. 2023. "Pump It: Twitter Sentiment Analysis for Cryptocurrency Price Prediction" Risks 11, no. 9: 159. https://doi.org/10.3390/risks11090159
APA StyleKoltun, V., & Yamshchikov, I. P. (2023). Pump It: Twitter Sentiment Analysis for Cryptocurrency Price Prediction. Risks, 11(9), 159. https://doi.org/10.3390/risks11090159