Cryptocurrency Bubble Detection: A New Stock Market Dataset, Financial Task & Hyperbolic Models (2022)

Abstract: The rapid spread of information over social media influences quantitative trading and investments. The growing popularity of speculative trading of highly volatile assets such as cryptocurrencies and meme stocks presents a fresh challenge in the financial realm. Investigating such “bubbles” - periods of sudden anomalous behavior of markets are critical in better understanding investor behavior and market dynamics. However, high volatility coupled with massive volumes of chaotic social media texts, especially for underexplored assets like cryptocoins pose a challenge to existing methods. Taking the first step towards NLP for cryptocoins, we present and publicly release CryptoBubbles, a novel multi- span identification task for bubble detection, and a dataset of more than 400 cryptocoins from 9 exchanges over five years spanning over two million tweets. Further, we develop a set of sequence-to-sequence hyperbolic models suited to this multi-span identification task based on the power-law dynamics of cryptocurrencies and user behavior on social media. We further test the effectiveness of our models under zero-shot settings on a test set of Reddit posts pertaining to 29 “meme stocks”, which see an increase in trade volume due to social media hype. Through quantitative, qualitative, and zero-shot analyses on Reddit and Twitter spanning cryptocoins and meme-stocks, we show the practical applicability of CryptoBubbles and hyperbolic models.

## introduction cryptocurrency (crypto) trading presents a new investment opportunity @xcite for maximizing profits. the rising ubiquity of speculative trading of cryptocurrencies over social media has lead to sentiment driven "bubbles" @xcite . such a bubble is characterized by rapid escalation of price in a short period of time typically driven by exuberant investor behavior @xcite and may be tied with enormous risks. analyzing such anomalous behaviors can be useful for forecasting speculative risks. however, it is not trivial to use existing nlp methods @xcite for forecasting crypto bubbles as they are designed for simple assets such as equities that are 10x less volatile than crypto @xcite . also, crypto behavior is more strongly tied to user sentiment and social media usage as opposed to conventional stocks and equities, rendering both conventional financial models and contemporary ml models weak as they are not geared towards dealing with large volumes of unstructured, user-generated text. theories (chen and hafner, 2019) suggest that financial bubbles are often driven by social media hype and the intensity of contagion among users. as shown in figure 1 , posts from highly influential personalities often cause a growing chain reaction leading to a short squeeze and the creation of a bubble. however, analyzing such large volumes of chaotic texts poses several challenges @xcite . market moving events, as shown in figure 1 are rare @xcite and their impact on market variables exhibit power-law dis-tributions @xcite . this power-law dynamics in online streams indicate the presence of scale free and hierarchical properties in the time domain @xcite . existing works @xcite ) that adopt rnn methods to model financial text (typically equities) do not factor in the inherent scale-free nature in online streams leading to distorted representations @xcite . advances in hyperbolic learning @xcite motivates us to use the hyperbolic space, which better represents the scale-free nature of online text streams. further, online texts pose a diverse influence on cryptoprices based on their content @xcite , for example, posts from a reliable source influences future trends, as opposed to noise like vague comments as shown in figure 1 . building on these prospects, we present cryp-tobubbles, a novel multi-bubble forecasting task ( §3), and a dataset comprising tweets, financial data, and speculative bubbles ( §4) along with hyperbolic methods to model the intricate power-law dynamics associated with crypto and online user behavior pertaining to stock markets. our contributions can be summarized as: cryptocurrency and financial bubbles cryptocurrencies are recent digital assets that have been in use since 2008 @xcite and rely on distributed cryptographic protocols, rather than a centralized authority to operate @xcite . these assets significantly differ from traditional equities (febrero, 2019) which have been in use since the 17 th century @xcite and have very distinct risk-return trade-offs @xcite . recently, crypto trading gained popularity @xcite given their low fees @xcite , easy access @xcite , and high profit @xcite however, crypto trading is very challenging since it shows high volatility (aloosh and ouzan, 2020), power-law bubble dynamics @xcite and effect other markets @xcite . financial nlp conventional forecasting methods rely on numeric features like historical prices @xcite , and technical indicators @xcite . these include continuous @xcite , and neural approaches @xcite . despite their improvements, a limitation is that they do not account for price influencing factors from text @xcite . recent methods are based on the efficient market hypotheses @xcite which leverage language from earnings calls @xcite , online news @xcite ) and social media @xcite . however, a limitation is that they focus on simple assets like equities @xcite and formulate forecasting as regression @xcite or ranking @xcite task. such simple methods do not scale to highly stochastic crypto @xcite ) that show power-law dynamics @xcite . hyperbolic learning has proved to be effective in representing power-law dynamics @xcite , hierarchical relations @xcite and scale-free characteristics @xcite . hyperbolic learning has been applied to various nlp @xcite , and computer vision tasks @xcite . however, modeling crypto texts is complex as crypto prices are driven by social media hype @xcite and involve influential users @xcite . the intersection ## problem formulation let @xmath0. . . , c n } denote a set of n cryptos, where for each crypto c i there is an associated closing price p i t on day t. following (phillips and shi, 2019), we define the bubble w for each crypto c i in the lookahead t as the period characterized by rapid price escalation. formally, the logarithmic price change (log p i t -log p i t-1 ) takes the form, ## dataset curation and processing 2 data mining to create cryptobubbles dataset, we select the top 9 crypto exchanges such as binance, gateio, etc and choose around 50 most traded cryptos by volume from each exchange and obtain 456 cryptos in total. for these cryptos we mine 5 years of daily price data consisting of opening, closing, highest and lowest prices from 1 st mar'16 to 7 th apr'21 using cryptocompare. 3 next, we extract crypto related tweets under twitter's official license. following @xcite , we extract crypto-specific tweets by querying regex ticker symbols, for instance, "$doge\b" for do-gecoin. we mine tweets for the same date range as the price data and obtain 2.4 million tweets. we detail the yearly number of tweets from each exchange in figure 2 and observe that the number of tweets increases every year, indicating the growing popularity of speculative trading via social media. bubble creation to identify bubbles, we use the psy model @xcite which is a widely used bubble detection method in financial time-series analysis @xcite . following @xcite we feed the closing prices of each asset c i to the psy model, which outputs date spans for each bubble. to further review the ground-truth annotations produced by the psy model, all annotations were reviewed by five experienced financial analysts achieving a cohen's κ of 0.93. we find that the reviewers agree with the annotations for 90% of the bubbles. during reviewer disagreement (5% bubbles), we took the majority of all annotators. for 5% of the bubbles all reviewers agreed that the annotations were incorrect, during which we considered the annotations proposed by the analysts. we provide overall dataset and bubble statistics in ## experimental setup preprocessing we pre-process english tweets using nltk (twitter mode), for treatment of urls, identifiers (@) and hashtags (#). we adopt the bert-tokenizer for tokenization and use the pre-trained bert-base-cased model for text embeddings. we align days by dropping samples that lack tweets for a consecutive 5-day lookback window. ## conclusion building on the popularity of speculative social media trading, we present cryptobubbles, a challenging multi-span crypto bubble forecasting task, and dataset. we explore the power-law dynamics of social media hype and propose mbhn which learns from the power-law dynamics via hyperbolic learning. we curate a reddit test set to evaluate our models under zero-shot and cold-start settings. through extensive analysis, we show the practical applicability of cryptobubbles and publicly release cryptobubbles and our hyperbolic models.