Venue: NAACL 2022

# Cryptocurrency Bubble Detection: A New Stock Market Dataset,

Financial Task & Hyperbolic Models

 Ramit Sawhney\({}^{\dagger}\)1, Shivam Agarwal\({}^{\ddagger}\)2, Vivek Mittal\({}^{\dagger}\)3, Paolo Rosso\({}^{\triangle}\), Vikram Nanda\({}^{\star}\)4, Sudheer Chava\({}^{\dagger}\)

Footnote 1: Equal contribution.

Footnote 2: footnotemark:

###### 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 cryptocions 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.

+
Footnote †: July 10-15, 2022 ©2022 Association for Computational Linguistics

+
Footnote †: July 10-15, 2022 ©2022 Association for Computational Linguistics

## 1 Introduction

Cryptocurrency (cryptore) trading presents a new investment opportunity Chuen et al. (2017) for maximizing profits. The rising ubiquity of speculative trading of cryptocurrencies over social media has lead to sentiment driven "bubbles" Chohan (2021); Hu et al. (2021). Such a bubble is characterized by rapid escalation of price in a short period of time typically driven by exuberant investor behavior Fry and Cheah (2016) 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 Sawhney et al. (2020) for forecasting crypto bubbles as they are designed for simple assets such as equities that are 10x less volatile than crypto Liu and Serletis (2019). 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 Sawhney et al. (2021). Market moving events, as shown in Figure 1 are rare Zhao et al. (2010) and their impact on market variables exhibit power-law dis

Figure 1: We present market moving tweets by influential users about DogCoin. Such tweets induce social media hype which leads to creation of bubbles.



tributions (Plerou et al., 2004; Malevergne* et al., 2005). This power-law dynamics in online streams indicate the presence of scale free and hierarchical properties in the time domain (Feng et al., 2020).

Existing works (Hu et al., 2018; Du and Tanaka-Ishii, 2020) 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 (Ganea et al., 2018). Advances in hyperbolic learning (Shimizu et al., 2021) 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 (Kraaijeveld and De Smedt, 2020; Beck et al., 2019), 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 CryptoBubbles, a novel multi-bubble forecasting task (**SS3**), and a dataset comprising tweets, financial data, and speculative bubbles (**SS4**) 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:

* We formulate CryptoBubbles, a novel multi-span prediction task and publicly release a text dataset of 400+ crypto from over seven exchanges spanning over five years accompanied by over 2 million tweets.1 Footnote 1: Code and Data at: [https://github.com/gtfintechlab/CryptoBubbles-NAACL](https://github.com/gtfintechlab/CryptoBubbles-NAACL)
* We explore the power-law dynamics that exist in such user-generated text streams, and propose **mbhn**: **M**ulti **B**ubble **H****yperbolic** Network (**SS5**) along with other hyperbolic baselines which leverages the Riemannian manifold to model the intricate dynamics associated with crypto.
* We curate and release a test set corresponding to over 25,000 Reddit posts of 29 meme-stocks that show similar speculative user-driven dynamics (**SS4**) for evaluating mbhn under zero-shot settings (**SS4.1**) across asset classes (Crypto \(\rightarrow\) Equities) and social media platforms (Twitter \(\rightarrow\) Reddit).
* Through ablative (**SS7.1**) and qualitative experiments (**SS7.5**) we show the practical applicability of CryptoBubbles and hyperbolic learning. We find that mbhn generalizes to cold-start scenarios (**SS7.3**) and provides qualitative insights.

## 2 Background and Related Work

Cryptocurrency and Financial BubblesCryptocurrencies are recent digital assets that have been in use since 2008 (Nakamoto et al., 2008) and rely on distributed cryptographic protocols, rather than a centralized authority to operate (Krafft et al., 2018). These assets significantly differ from traditional equities (Febrero, 2019) which have been in use since the 17 century (Sobel, 2000) and have very distinct risk-return trade-offs (Chuen et al., 2017). Recently, crypto trading gained popularity (Sieg, 2021) given their low fees (King, 2013), easy access (Chepurnoy et al., 2019), and high profit (Sunjaku et al., 2017) However, crypto trading is very challenging since it shows high volatility (Aloosh and Ouzan, 2020), power-law bubble dynamics (Fry and Cheah, 2016) and effect other markets (Andrianto and Diputra, 2017).

Financial NLPConventional forecasting methods rely on numeric features like historical prices (Kohara et al., 1997), and technical indicators (Shynkevich et al., 2017). These include continuous (Andersen, 2007), and neural approaches (Feng et al., 2019). Despite their improvements, a limitation is that they do not account for price influencing factors from text (Lee et al., 2014). Recent methods are based on the Efficient Market Hypotheses (Malkiel, 1989) which leverage language from earnings calls (Qin and Yang, 2019), online news (Du and Tanaka-Ishii, 2020) and social media (Tabari et al., 2018). However, a limitation is that they focus on simple assets like equities (Sawhney et al., 2020) and formulate forecasting as regression (Kogan et al., 2009) or ranking (Sawhney et al., 2021) task. Such simple methods do not scale to highly stochastic crypto (Liu and Serletis, 2019) that show power-law dynamics (Kyriazis et al., 2020).

Hyperbolic Learninghas proved to be effective in representing power-law dynamics (Ganea et al., 2018), hierarchical relations (Aldecoa et al., 2015) and scale-free characteristics (Chami et al., 2019). Hyperbolic learning has been applied to various NLP (Dhingra et al., 2018), and computer vision tasks (Khrulkov et al., 2020). However, modeling crypto texts is complex as crypto prices are driven by social media hype (Stevens, 2021) and involve influential users (Ante, 2021). The intersection 

of modeling scale-free financial text streams with hyperbolic learning presents an underexplored yet promising research avenue.

## 3 Problem Formulation

Let \(C=\{c_{1}\dots,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,

\[\log p^{i}_{t}-\log p^{i}_{t-1}=\begin{cases}-L_{t}+\epsilon_{t},&\text{ Bubble burst}\\ L_{t}+\epsilon_{t},&\text{Bubble boom}\end{cases} \tag{1}\]

where, \(\epsilon_{t}\) are martingale difference innovations and \(L_{t}\) given by \(L_{t}=Lb_{t}\). Where, \(L\) measures the shock intensity and \(b_{t}\) is uniform over a small negative quantity \(-\epsilon\) to unity. We formulate financial bubble prediction as a multi-span prediction task since a variable number of bubbles can exist during a lookahead period \(T\). Our goal is to predict all such bubble periods \(w\) in the lookahead \(T\). Formally, given a variable number of historic texts \([d_{1},\ldots,d_{\tau}]\) (or other sequences like prices) for each crypto \(c_{i}\) over a lookback of \(\tau\) days, mbhn first outputs the number of bubbles \(B\) to support multi-bubble prediction. Followed by identifying \(B\) non-overlapping bubble periods.

## 4 Dataset Curation and Processing2
Footnote 2: We provide extensive data creation steps along with details on bubble creation in the Appendix.

Data MiningTo 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 1st Mar'16 to 7th Apr'21 using CryptoCompare.3 Next, we extract crypto related tweets under Twitter's official license. Following Xu and Cohen (2018a), we extract crypto-specific tweets by querying regex ticker symbols, for instance, "SDOGE\(\backslash\)b" for _DogeCoin_. 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.

Footnote 3: [https://www.cryptocompare.com/](https://www.cryptocompare.com/)

#### Bubble Creation

To identify bubbles, we use the PSY model Phillips et al. (2015b) which is a widely used bubble detection method in financial time-series analysis Cheung et al. (2015); Harvey et al. (2016). Following Corbet et al. (2018) 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 \(\kappa\) 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 Table 1 and Figure 3, respectively.

Sample GenerationTo generate data samples, we use a sliding window of length \(\tau\) and consider all texts posted within this window for making predictions over the next \(T\) days. Next, we temporally split all the data samples into train, validation, and test as shown in Table 2. We note that our data is heavily skewed; our evaluation set contains new cryptos and spans the COVID-19 period suggesting that CryptoBubbles is challenging.

### Zero Shot Reddit Data

We curate zero-shot Reddit data to test our model's ability to generalize across different asset classes and social media platforms. We analyze 12 meme cryptos and 17 meme equities (for instance, GameStop, and DOGE) selected based on social media activity over 15 months from 15th Jan'20 to 3rd April'21. We mine Reddit posts and comments from top trading subreddits such as r/wallstreetbets using the PushshiftAPI.4 We scrape daily price data using Yahoo Finance for equities and CoinGecko for crypto and use the PSY model Phillips et al. (2015) to identify bubbles. We follow the same process used for Twitter and summarize the statistics in Table 3. We note that zero-shot data establishes a challenging environment for evaluating Cryptobubbles since it contains varied post lengths and unseen assets.

Footnote 4: [https://github.com/pushshift/api](https://github.com/pushshift/api)

## 5 Methodology: Mbhn

### Preliminaries on the Hyperbolic Space

We implement mbhn on the Poincare ball model, defined as \(({\cal B},g_{x}^{\mathcal{B}})\), where the manifold \({\cal B}=\{{\mathbf{x}}\in\mathbb{R}^{n}:||{\mathbf{x}}||<1\}\), with the Riemannian metric \(g_{\mathbf{x}}^{\mathcal{B}}=\lambda_{\mathbf{x}}^{2}g^{E}\), where the conformal factor \(\lambda_{\mathbf{x}}=\frac{1}{1-||{\mathbf{x}}||^{2}}\) and \(g^{E}=\text{diag}[1,..,1]\) is the Euclidean metric tensor. We denote the tangent space centered at point \({\mathbf{x}}\) as \({\cal T}_{\mathbf{x}}{\cal B}\). Following Ungar (2001), we generalize Euclidean operations to the hyperbolic space using the Mobius operations.

Mobius Addition\(\oplus\) for a pair of points \({\mathbf{x}},{\mathbf{y}}\in{\cal B}\),

\[{\mathbf{x}}\oplus{\mathbf{y}}=\frac{(\!1+\!2\langle{\mathbf{x}},{\mathbf{y}}\rangle\!+\!||{ \mathbf{y}}|\!|^{2}){\mathbf{x}}\!+\!(1\!-\!||{\mathbf{x}}||^{2}){\mathbf{y}}}{1\!+\!2\langle {\mathbf{x}},{\mathbf{y}}\rangle\!+\!||{\mathbf{x}}||^{2}||{\mathbf{y}}||^{2}} \tag{2}\]

where, \(\langle.,.\rangle\) denotes the inner product and \(||\cdot||\) denotes the norm. To perform operations in the hyperbolic space, we define the exponential and logarithmic map to project Euclidean vectors to the hyperbolic space, and vice versa.

Exponential Mappingmaps a tangent vector \({\mathbf{v}}\in{\cal T}_{\mathbf{x}}{\cal B}\) to a point \(\exp_{\mathbf{x}}({\mathbf{v}})\) in the hyperbolic space,

\[\exp_{\mathbf{x}}({\mathbf{v}})={\mathbf{x}}\oplus\left(\tanh\left(\frac{||{\mathbf{v}}||}{1- ||{\mathbf{x}}||^{2}}\right)\frac{{\mathbf{v}}}{||{\mathbf{v}}||}\right) \tag{3}\]

Logarithmic Mappingmaps a point \({\mathbf{y}}\in{\cal B}\) to a point \(\log_{\mathbf{x}}({\mathbf{y}})\) on the tangent space at \({\mathbf{x}}\),

\[\log_{\mathbf{x}}({\mathbf{y}})\!=\!(1-||{\mathbf{x}}||^{2})\text{tanh}^{-1}\left(||\!- \!{\mathbf{x}}\oplus{\mathbf{y}}||\!\right)\frac{-{\mathbf{x}}\oplus{\mathbf{y}}}{||-{\mathbf{x} }\oplus{\mathbf{y}}||} \tag{4}\]

Mobius Multiplication\(\otimes\) multiplies features \({\mathbf{x}}\in{\cal B}^{C}\) with matrix \({\mathbf{W}}\in\mathbb{R}^{C^{\prime}\times C}\), defined as,

\[{\mathbf{W}}\otimes{\mathbf{x}}=\exp_{\mathbf{o}}({\mathbf{W}}\!\log_{\mathbf{o}}({\mathbf{x}})) \tag{5}\]

We present an overview of MBhn in Figure 4. We first explain temporal feature (price or text) extraction using hyperbolic GRU and the temporal attention (SS**5.2**), followed by the decoder architecture to predict multiple bubble spans (SS**5.3**).

### Hyperbolic Temporal Encoder

Temporal dependencies in crypto data show powerlaw dynamics and scale-free nature Zhang et al. (2018); Gabaix et al. (2003). As shown in Figure 4 to capture the hierarchical and temporal dependencies in temporal crypto data (online texts or asset prices), we implement a Gated Recurrent Unit (GRU) in the hyperbolic space Ganea et al. (2018) which better models the scale-free dynamics of online streams Chami et al. (2019).

As shown in Figure 4, the input to MBhn can be any temporal sequence \([d_{1},\ldots,d_{\tau}]\) such as prices or texts. We use a data encoder to encode each item \(d_{t}\) as features \(q_{t}\). Specifically, we use Bidirectional Encoder Representations from Transformers (BERT) Devlin et al. (2019) for encoding texts as \(q_{t}=\text{BERT}(d_{t})\). While we feed raw price vectors

\begin{table}
\begin{tabular}{l c c} \hline \hline  & **Cryptocurrency** & **Equity** \\ \hline No. of Posts & 30.69 \(\pm\) 29.48 & 30.08 \(\pm\) 30.26 \\ No. of Tokens per post & 34.50 \(\pm\) 34.87 & 23.06 \(\pm\) 23.62 \\ No. of Bubbles & 0.16 \(\pm\) 0.42 & 0.22 \(\pm\) 0.45 \\ Length of Bubbles in days & 4.28 \(\pm\) 2.73 & 4.60 \(\pm\) 2.93 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Zero-shot Reddit data statistics for cryptocoins and equities along with their bubble statistics.

 

comprising of a cryptos's closing price \(p_{c}^{t}\), highest price \(p_{h}^{t}\) and lowest price \(p_{l}^{t}\) for day \(t\) for encoding historic prices as \(q_{t}=[p_{c}^{t},p_{h}^{t},p_{l}^{t}]\). For encoding both prices and texts together we concatenate the price and text features. To apply the hyperbolic operations, we first map these Euclidean features \(\mathbf{q}_{t}\) to hyperbolic features \(\mathbf{x}_{t}\in\mathcal{B}^{C}\) for each crypto \(c_{i}\) via the exponential map, given by, \(\mathbf{x}_{t}\!=\!\text{exp}_{\mathbf{o}}(\mathbf{q}_{t})\). We define the hyperbolic GRU on features \(\mathbf{x}_{t}\) as,

\[\begin{split}&\mathbf{z}_{t}\!=\!\sigma\text{log}_{\mathbf{o}}(\mathbf{W}^{ z}\!\otimes\!\mathbf{h}_{t-1}\!\oplus\!\mathbf{U}^{z}\!\otimes\!\mathbf{x}_{t}\!\oplus\!\mathbf{b}^{ \texttt{T}})\\ &\mathbf{r}_{t}\!=\!\sigma\text{log}_{\mathbf{o}}(\mathbf{W}^{r}\!\otimes\! \mathbf{h}_{t-1}\!\oplus\!\mathbf{U}^{r}\!\otimes\!\mathbf{x}_{t}\!\oplus\!\mathbf{b}^{ \texttt{T}})\end{split}\] (Update gate) (Reset gate) (Current state) \[\mathbf{h}_{t}\] (Final state) \[\mathbf{h}_{t}\] (Final state)

where, \(\Psi^{\otimes}\) denotes hyebolic non-linearity (Ganea et al., 2018) and \(\mathbf{W},\mathbf{U},\mathbf{b}\) are learnable weights. We denote the Hyperbolic GRU as \(\text{HGRU}(\cdot)\) which takes temporal crypto features \(\mathbf{X}=\left\{\mathbf{q}_{1},\ldots,\mathbf{q}_{\tau c_{i}}\right\}\) as input and outputs features \(\mathbf{K}=\left\{h_{1},\ldots,h_{\tau c_{i}}\right\}\), which is the concatenation of all hidden states \(\mathbf{h}_{t}\) of crypto \(c_{i}\), given by,

\[\mathbf{K}=\text{HGRU}(\exp_{\mathbf{o}}(\mathbf{X})) \tag{6}\]

All texts (or prices) released in the lookback \(\tau\) may not be equally informative and have _diverse influence_ over a crypto's trend (Kraaijveld and De Smedt, 2020). We use a temporal attention mechanism (Luong et al., 2015) to emphasize streams likely to have a substantial influence on the bubble. The attention mechanism learns attention weights \(\left\{\gamma_{j}\right\}_{j=1}^{\tau_{c_{1}}}\) to adaptively aggregate hidden states of HGRU into a _crypto information vector_\(\mathbf{u}_{i}\),

\[\mathbf{u}_{i}=\sum_{j}\gamma_{j}\log_{\mathbf{o}}(\mathbf{h}_{j}) \tag{7}\] \[\gamma_{j}=\text{Softmax}_{j}(\log_{\mathbf{o}}(h_{j})^{\text{T}}( \mathbf{W}\log_{\mathbf{o}}(\mathbf{K}))) \tag{8}\]

where, \(\mathbf{W}\) are learnable weights.

### Multi-Span Extraction and Optimization Span Prediction

Span PredictionTo extract the bubble spans in the lookahead \(T\), we take inspiration from (Sutskever et al., 2014) and use a GRU based decoding network. We use the outputs of the encoder \(\mathbf{u}_{i}\) for each crypto \(c_{i}\) as the initial state of the GRU. For each day \(t\in[1,\dots,T]\), we predict the probability of day \(t\) being a starting or an ending day denoted by \(p_{\text{start}}^{t}\) and \(p_{\text{end}}^{t}\) respectively, given by,

\[p_{\text{start}}^{t} =\text{Sigmoid}(\mathbf{W}^{S}\text{GRU}(\mathbf{u}_{i})) \tag{9}\] \[p_{\text{end}}^{t} =\text{Sigmoid}(\mathbf{W}^{E}\text{GRU}(\mathbf{u}_{i})) \tag{10}\]

where \(\mathbf{W}^{S}\),\(\mathbf{W}^{E}\) are learnable weights.

Multi-Span ExtractionTo identify multiple bubble spans, we first predict the number of bubbles \(B\) for each cryptocoin \(c_{i}\) in the lookahead \(T\) and model it as a classification task, given by,

\[B=\text{argmax}(\text{Softmax}(\text{MLP}(\mathbf{u}_{i}))) \tag{11}\]

As shown in Figure 4, we extract \(B\) non-overlapping bubbles for each coin \(c_{i}\) using the non-maximum suppression (NMS) algorithm (Rosenfeld and Thurston, 1971). For the \(j^{th}\) bubble our model predicts a starting index \(s_{j}\) and an ending index \(e_{j}\), where \(s_{j}\!<\!e_{j}\!\leq\!T\), \(j\in[1,\dots,B]\). We first extract _top-K_ bubble spans **S** based on the bubble

Figure 4: An overview of mbhn, hyperbolic mappings, hyperbolic GRU, and multi-span extraction. Data Encoder is used to encode any temporal sequence (historic prices or texts). The data encoder in case of texts is BERT.

 

scores, calculated as \(p_{start}^{s_{j}}\times p_{end}^{e_{j}}\) for the \(j\)th bubble starting at index \(s_{j}\) and ending at index \(e_{j}\). Next, we initialize an empty set \(\overline{\mathbf{S}}\) and add the bubble \((s_{j},e_{j})\) that posses the maximum bubble score to the set \(\overline{\mathbf{S}}\), and remove it from the set \(\mathbf{S}\). We also delete any remaining bubble spans \((s_{k},e_{k})\) having an overlap with bubble \((s_{j},e_{j})\). This process is repeated for all the remaining spans in \(\mathbf{S}\), until \(\mathbf{S}\) is empty or we get \(B\) bubble spans in the set \(\overline{\mathbf{S}}\).

Network OptimizationWe optimize mbhn using a combination of losses corresponding to the three tasks; 1) Bubble start date prediction, 2) Bubble end date prediction and 3) Number of bubble prediction. We optimize mbhn using binary cross entropy loss over both bubble start date and end date prediction. For optimizing over the number of bubbles, we use the Focal loss Lin et al. (2017). The net loss is the sum of the three losses.

## 6 Experimental Setup

PreprocessingWe pre-process English tweets using NLTK Twitter mode, for treatment of URLs, identifiers (@) and hashtags (#). We adopt the BertTokenizer 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.

Training SetupWe adopt grid search to find optimal hyperparameters based on the validation MCC for all methods. For NMS, we use an overlapping threshold of 2 units. We use default \(\alpha=2,\gamma=5\) for the focal loss and learning rate \(\in(1e^{-5},1e^{-3})\) to train the models using the Adam optimizer.

Evaluation MetricsWe evaluate all methods using **F1**-score, Mathews Correlation Coefficient (**MCC**) and Exact Match (**EM**) (We provide metric equations in _Appendix_). On the bubble span level, we use F1 and MCC, which measure the overlap between the predicted and the true bubble spans. While EM measures the percentage of overall predicted bubbles that exactly match the true bubble spans. We also evaluate on the "number of bubble" task via **F1**-Score and Accuracy (**Acc**).

### Baseline Methods

We use BERT for text encoding in all models. Each baseline forecasts prices over lookahead \(T\) and uses the PSY model to detect bubbles.

* **ARIMA** Auto-regressive moving average based model that uses past prices from 100 days as input for forecasting Yenidogan et al. (2018).
* **W-LSTM** A LSTM model with autoencoders that encode noise-free data obtained via wavelet transform of historic prices Bao et al. (2017).
* **A-LSTM** Adversarially trained LSTM on price inputs for forecasting Feng et al. (2019b).
* **Chaotic** A Hierarchical GRU model applied on texts within and accross days Hu et al. (2018).
* **MAN-SF(T)** Hierarchical attention on texts within and across days Sawhney et al. (2020b).
* **CH-RNN** An RNN coupled with cross-modal attention on price and texts Wu et al. (2018).
* HFA:** StockNet
- HedgeFundAnalyst, a variational autoencoder with attention on texts and prices Xu and Cohen (2018).

## 7 Results and Analysis

### Ablation Study

Through Figure 5 we observe that augmenting price-based mbhn with financial texts leads to sig 

nificant (\(p<0.01\)) improvements, suggesting the importance of leveraging textual sources to forecast the formation of speculative bubbles. This observation ties up with Sawhney et al. (2021) who show that online texts often indicate market surprises that may not be well captured by prices alone. Noting insignificant (\(p>0.01\)) improvements on using both price and text information, we further probe mbhn performance benefits from each of its components in Table 4 with only textual inputs. We note the biggest improvements on replacing the Euclidean encoders with their hyperbolic variants, suggesting that the inherent power-law dynamics and scale-free nature of online texts and financial bubbles are better represented in the hyperbolic space Ganea et al. (2018). Next, on adding temporal attention, we note improvements as mbhn can better distinguish noise inducing text from relevant market signals, minimizing false evaluations and overreactions De Long et al. (1990). The temporal attention mechanism can likely diminish the impact of such noise (rumors, vague comments) and better capture the diverse influence of texts.

### Performance Comparison

We compare the performance of mbhn with baselines in Table 5. We observe that mbhn through hyperbolic learning significantly outperforms (\(p<0.01\)) all baselines. This observation validates our premise of formulating CryptoBubbles as an extractive multi-span task and suggests its practical applicability in predicting speculative financial risks. Further, we note that methods that use crypto affecting information from online texts (mbhn, SNHFA) generate better performance than approaches that only use price data (A-LSTM, W-LSTM). These improvements re-validate the effectiveness of using online texts to encode investor sentiment and market information. Next, we note that mbhn requires less historical data (\(\tau=5\)) compared to conventional methods (ARIMA, \(\tau=100\)), while achieving better performance, suggesting mbhn applicability in low data scenarios.

### Zero-shot Learning

To evaluate mbhn applicability to unseen asset classes and social media linguistic styles we test it on unseen Reddit meme-stock data (**SS4**) under zero-shot settings and summarise the results in Table 6. We observe that mbhn can generalize over the true market sentiment to an extent and transfer knowledge across the two social media by being invariant to post styles, lengths, and social media structure. Further, these observations suggest that mbhn can be leveraged for cold start scenarios (completely new assets), which is quite frequent for cryptocurrencies Gavin and Richard (2019). We speculate mbhn's transferability to hyperbolic learning due to its ability to accurately reflect complex scale-free relations between social media texts. This observation ties up with Khrulkov et al. (2020) who show that hyperbolic learning is useful under zero-shot settings. These observations collectively demonstrate MBhn's ability to generalize across social media and asset classes, including meme stocks such as GameStop, which purely see bubbles due to social media hype Chohan (2021).

### Sensitivity to Lookback and Lookahead

We study the impact of historical context on mbhn's performance in Figure 7 by varying the availability of historic information. We observe lower performance on using shorter lookback periods, indicating inadequacy to capture the market influencing signals, likely as public information requires time to absorb into price fluctuations Luss and D'Aspremont (2015). As we increase the look

\begin{table}
\begin{tabular}{l l c r r} \hline \hline
**Asset Type** & **Asset Name** & **F1\textless{}** & **MCC\textless{}** & **EM\textgreater{}** \\ \hline \multirow{3}{*}{Equity} & Top 1: CCIV & 0.73 & 0.48 & 0.71 \\  & Bottom 1: PLTR & 0.26 & -0.05 & 0.17 \\  & All Equities & 0.52 & 0.07 & 0.63 \\ \hline \multirow{3}{*}{Cryptocoin} & Top 1: DOGE & 0.54 & 0.26 & 0.55 \\  & Bottom 1: BASED & 0.33 & -0.01 & 0.43 \\ \cline{1-1}  & All Cryptocurrencies & 0.50 & 0.05 & 0.70 \\ \hline \hline \end{tabular}
\end{table}
Table 6: MBHN’s performance on Reddit meme stock data under zero shot settings. Top 1 and Bottom 1 denote MBHN’s best and the worst performance assets.

\begin{table}
\begin{tabular}{l c c c} \hline \hline
* HFA Xu and Cohen (2018) & _0.51_ & _0.21_ & _0.49_ \\
**MBHN (Ours)** & **0.53°** & **0.25°** & **0.53°** \\ \hline \hline \end{tabular}
\end{table}
Table 5: Performance comparison against baselines (mean of 10 independent runs). **Bold** and _italics_ represent **best** and _second-best_ results, respectively. \(*\) indicates statistically significant (\(p<0.01\)) improvement over SN-HFA under Wilcoxon’s Signed Rank Test.

 

back, we find that larger periods allow the inclusion of stale information from older days having a relatively lower influence on prices (Bernhardt and Miao, 2004) that may deteriorate the model performance. However, our temporal attention mechanism, to an extent, learns to filter our salient texts, which induce bubbles in the market. Further, we analyze mbhn's sensitivity to the number of lookahead days \(T\) in Figure 7. We observe that our model is robust to different lookahead periods, suggesting mbhn's generalizability for predicting speculative bubbles over different risk taking appetites.

### Qualitative Analysis

We conduct an extended study to elucidate mbhn's explainable predictions and practical applicability. As shown in Figure 6, we analyze the recent posts corresponding to LiteCoin tweets and Gamestop zero-shot Reddit posts.

Practical applicability of CryptoBubbles and mbhnWe first calculate temporal attention scores across tweets and observe that mbhn is able to attend to more influential tweets to an extent for both meme cryptocurrencies and stocks under zero-shot settings providing valuable pieces of information to better judge speculative risks (Kumar, 2009). For both asset classes, we observe an overall positive market sentiment and brief epidemic-like social media activity, leading to increased trade volume activity, causing the creation of multiple risky bubbles (Phillips and Gorse, 2018; Froot and Obst

Figure 6: **Top:** Reddit posts of GameStop from 13h Jan’21 to 3rd Feb’21. **Bottom:** Twitter tweets of LiteCoin from 5th Feb’21 to 2nd March ’21 along with token level attention and temporal tweet level attention visualisation. We also show mphn’s performance with its Euclidean variant on CryptoBubbles bubble detection task.

Figure 7: Sensitivity to parameters \(T\) and \(\tau\)



feld, 1989). Such epidemic like social media activity and bubble creation exhibit scale-free dynamics since their impact decays as a powerlaw distribution over time Phillips and Gorse (2017). mbhn outperforms its Euclidean variant as it is better able to represent the scale-free dynamics via hyperbolic learning Chen and Hafner (2019). Furthermore, we observe multiple cryptocurrency mentions in a single social media post suggesting that bubble explosivity in one cryptocoin may induce bubbles in another crypto Agosto and Cafferata (2020). These observations demonstrate the practical applicability of CryptoBubbles quantitative trading as it can scale to forecast multiple risk bubbles.

Contextualizing impact of social media hype and meme stocksAs shown in Figure 6, we note that for meme-stocks like GameStop (GME), Reddit posts consistently display a social media _hype_ growing like a chain reaction consecutively creating a bubble Angel (2021). The price value of such meme stocks follows sentiment-driven pricing where more media traffic, more positive tones, more argument leads to higher returns in a short squeeze Chohan (2021); Hu et al. (2021). We observe that mbhn via hyperbolic learning is able to capture the social media hype of meme-stocks where the intensity of the psychological contagion among retail investors on social media drive asset price fluctuations Semenova and Winkler (2021).

## 8 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.

### Acknowledgements

The research work of Paolo Rosso was partially funded by the Generalitat Valenciana under DeepPattern (PROMETEO/2019/121). We would like to thank the Financial Services Innovation Lab at Georgia Institute of Technology for their generous support.

## 9 Ethical Considerations

While data is essential in making models like mbhn effective, we must work within the purview of acceptable privacy practices to avoid coercion and intrusive treatment. To that end, we utilize publicly available Twitter and Reddit data in a purely observational and non-intrusive manner. Although informed consent of each user was not sought as it may be deemed coercive, We follow all ethical regulations set by Twitter and Reddit.

There is an ethical imperative implicit in this growing influence of automation in market behavior, and it is worthy of serious study Hurlburt et al. (2009); Cooper et al. (2020). Since financial markets are transparent Bloomfield and O'Hara (1999), and heavily regulated Edwards (1996), we discuss the ethical considerations pertaining to our work. Following Cooper et al. (2016), we emphasize on three ethical criteria for automated trading systems and discuss mbhn's design with respect to these criteria.

Prudent SystemA prudent system _"demands adherence to processes that reliably produce strategies with desirable characteristics such as minimizing risk, and generating revenue in excess of its costs over a period acceptable to its investors" Longstreth (1986)_. mbhn is directly optimized towards high risk bubble forecasting.

Blocking Price DiscoveryA trading system should not block price discovery and not interfere with the ability of other market participants to add to their own information Angel and McCabe (2013). For example, placing an extremely large volume of orders to block competitor's messages _(Quote Stuffing)_ or intentionally trading with itself to create the illusion of market activity _(Wash Trading)_. mbhn does not block price discovery in any form.

Circumventing Price DiscoveryA trading system should not hide information, such as by participating in dark pools or placing hidden orders Zhu (2014). We evaluate mbhn only on public data in regulated markets.

Despite these considerations, it is possible for mbhn, just as any other automated trading system, to be exploited to hinder market fairness. We follow broad ethical guidelines to design mbhn and encourage readers to follow both regulatory and ethical considerations pertaining to the market 



## References

* Agosto and Cafferata (2020) Arianna Agosto and Alessia Cafferata. 2020. Financial bubbles: a study of co-explosivity in the cryptocurrency market. _Risks_, 8(2):34.
* Aldecoa et al. (2015) Rodrigo Aldecoa, Chiara Orsini, and Dmitri Krioukov. 2015. Hyperbolic graph generator. _Computer Physics Communications_, 196:492-496.
* Aloosh and Ouzan (2020) Arash Aloosh and Samuel Ouzan. 2020. The psychology of cryptocurrency prices. _Finance Research Letters_, 33:101192.
* Andersen (2007) Leif BG Andersen. 2007. Efficient simulation of the heston stochastic volatility model. _Available at SSRN 946405_.
* Andrianto and Diputra (2017) Yanuar Andrianto and Yoda Diputra. 2017. The effect of cryptocurrency on investment portfolio effectiveness. _Journal of finance and accounting_, 5(6):229-238.
* Angel (2021) James Angel. 2021. Gamestonk: What happened and what to do about it. _Available at SSRN 3782195_.
* Angel and McCabe (2013) James J Angel and Douglas McCabe. 2013. Fairness in financial markets: The case of high frequency trading. _Journal of Business Ethics_, 112(4):585-595.
* Ante (2021) Lennart Ante. 2021. How elon musk's twitter activity moves cryptocurrency markets. _Available at SSRN 3778844_.
* Bao et al. (2017) Wei Bao, Jun Yue, and Yulei Rao. 2017. A deep learning framework for financial time series using stacked autoencoders and long-short term memory. _PloS one_, 12(7):e0180944.
* Beck et al. (2019) Johannes Beck, Roberta Huang, David Lindner, Tian Guo, Zhang Ce, Dirk Helbing, and Nino Antholv-Fantulin. 2019. Sensing social media signals for cryptocurrency news. In _Companion Proceedings of The 2019 World Wide Web Conference_, pages 1051-1054.
* Bernhardt and Miao (2004) Dan Bernhardt and Jianjun Miao. 2004. Informed trading when information becomes stale. _The Journal of Finance_, 59(1):339-390.
* Bloomfield and O'Hara (1999) Robert Bloomfield and Maureen O'Hara. 1999. Market transparency: who wins and who loses? _The Review of Financial Studies_, 12(1):5-35.
* Bunjaku et al. (2017) Flamur Bunjaku, Olivera Gjorgieva-Trajkovska, and Emilija Miteva-Kacarski. 2017. Cryptocurrencies-advantages and disadvantages. _Journal of Economics_, 2(1):31-39.
* Chami et al. (2019) Ines Chami, Zhitao Ying, Christopher Re, and Jure Leskovec. 2019a. Hyperbolic graph convolutional neural networks. In _Advances in Neural Information Processing Systems_, pages 4869-4880.
* Chami et al. (2019b) Ines Chami, Zhitao Ying, Christopher Re, and Jure Leskovec. 2019b. Hyperbolic graph convolutional neural networks. In _Advances in Neural Information Processing Systems 32_. Curran Associates, Inc.
* Chen and Hafner (2019) Cathy Yi-Hsuan Chen and Christian M Hafner. 2019. Sentiment-induced bubbles in the cryptocurrency market. _Journal of Risk and Financial Management_, 12(2):53.
* Chepurnoy et al. (2019) Alexander Chepurnoy, Vasily Kharin, and Dmitry Meshkov. 2019. A systematic approach to cryptocurrency fees. In _Financial Cryptography and Data Security_, pages 19-30. Springer Berlin Heidelberg.
* Cheung et al. (2015) Adrian Cheung, Eduardo Roca, and Jen-Je Su. 2015. Crypto-currency bubbles: an application of the phillips-shi-yu (2013) methodology on mt. gox bitcoin prices. _Applied Economics_, 47(23):2348-2358.
* Chohan (2021) Usman W Chohan. 2021. Counter-hegemonic finance: The gamestop short squeeze. _Available at SSRN_.
* Chuen et al. (2017) David LEE Kuo Chuen, Li Guo, and Yu Wang. 2017. Cryptocurrency: A new investment opportunity? _The Journal of Alternative Investments_, 20(3):16-40.
* Cooper et al. (2020) Ricky Cooper, Michael Davis, Andrew Kumiedga, and Ben Van Vliet. 2020. Ethics for automated financial markets. _Handbook on Ethics in Finance_, pages 1-18.
* Cooper et al. (2016) Ricky Cooper, Michael Davis, Ben Van Vliet, et al. 2016. The mysterious ethics of high-frequency trading. _Business Ethics Quarterly_, 26(1):1-22.
* Corbet et al. (2018) Shaen Corbet, Brian Lucey, and Larisa Yarovaya. 2018. Datestamping the bitcoin and ethereum bubbles. _Fiannace Research Letters_, 26:81-88.
* Long et al. (1990) J Bradford De Long, Andrei Shleifer, Lawrence H Summers, and Robert J Waldmann. 1990. Noise trader risk in financial markets. _Journal of political Economy_, 98(4):703-738.
* Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_, pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
* Dhingra et al. (2018) Bhuwan Dhingra, Christopher Shallue, Mohammad Norouzi, Andrew Dai, and George Dahl. 2018. Embedding text in hyperbolic spaces. In _Proceedings of the Twelfth Workshop on Graph-Based Methods for Natural Language Processing (TextGraphs-12)_, New Orleans, Louisiana, USA. Association for Computational Linguistics.
* Du and Tanaka-Ishii (2020) Xin Du and Kumiko Tanaka-Ishii. 2020. Stock embeddings acquired from news articles and price history, and an application to portfolio optimization. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_, pages 3353-3363, Online. Association for Computational Linguistics

Franklin R Edwards. 1996. _The new finance: regulation and financial stability_. American Enterprise Institute.
* Febrero (2019) Pedro Febrero. 2019. What's the difference between trading cryptocurrency and stocks?
* Feng et al. (2019a) Fuli Feng, Huimin Chen, Xiangnan He, Ji Ding, Maosong Sun, and Tat-Seng Chua. 2019a. Enhancing stock movement prediction with adversarial training. In _Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19_, pages 5843-5849. International Joint Conferences on Artificial Intelligence Organization.
* Feng et al. (2019b) Fuji Feng, Huimin Chen, Xiangnan He, Ji Ding, Maosong Sun, and Tat-Seng Chua. 2019b. Enhancing stock movement prediction with adversarial training. In _Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19_, pages 5843-5849. International Joint Conferences on Artificial Intelligence Organization.
* Feng et al. (2020) Shanshan Feng, Lucas Vinh Tran, Gao Cong, Lisi Chen, Jing Li, and Fan Li. 2020. HmE: A hyperbolic metric embedding approach for next-poi recommendation. In _Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval_, SIGIR '20, page 1429-1438, New York, NY, USA. Association for Computing Machinery.
* Freot and Obstfeld (1989) Kenneth A Froot and Maurice Obstfeld. 1989. Intrinsic bubbles: The case of stock prices. Technical report, National Bureau of Economic Research.
* Fry and Cheah (2016) John Fry and Eng-Tuck Cheah. 2016. Negative bubbles and shocks in cryptocurrency markets. _International Review of Financial Analysis_, 47:343-352.
* Gabaix et al. (2003) Xavier Gabaix, Parameswaran Gopikrishnan, Vasiliki Plerou, and H Eugene Stanley. 2003. A theory of power-law distributions in financial market fluctuations. _Nature_.
* Ganea et al. (2018a) Octavian Ganea, Gary Becigneul, and Thomas Hofmann. 2018a. Hyperbolic neural networks. In _Advances in Neural Information Processing Systems_.
* Ganea et al. (2018b) Octavian Ganea, Gary Becigneul, and Thomas Hofmann. 2018b. Hyperbolic neural networks. In _Advances in Neural Information Processing Systems_.
* here's what will affect successes in future.
* Harvey et al. (2016) David I Harvey, Stephen J Leybourne, Robert Sollis, and AM Robert Taylor. 2016. Tests for explosive financial bubbles in the presence of non-stationary volatility. _Journal of Empirical Finance_, 38:548-574.
* Hu et al. (2021) Danqi Hu, Charles M Jones, Valerie Zhang, and Xiaoyan Zhang. 2021. The rise of reddit: How social media affects retail investors and short-sellers' roles in price discovery. _Available at SSRN 3807655_.
* Hu et al. (2018) Ziniu Hu, Weiqing Liu, Jiang Bian, Xuanzhe Liu, and Tie-Yan Liu. 2018. Listening to chaotic whispers: A deep learning framework for news-oriented stock trend prediction. In _Proceedings of the eleventh ACM international conference on web search and data mining_, pages 261-269.
* Hurlburt et al. (2009) George F Hurlburt, Keith W Miller, and Jeffrey M Voas. 2009. An ethical analysis of automation, risk, and the financial crises of 2008. _IT professional_, 11(1):14-19.
* Khrulkov et al. (2020a) Valentin Khrulkov, Leyla Mirvakhabova, Evgeniya Ustinova, Ivan Oseledets, and Victor Lempitsky. 2020a. Hyperbolic image embeddings. In _The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_.
* Khrulkov et al. (2020b) Valentin Khrulkov, Leyla Mirvakhabova, Evgeniya Ustinova, Ivan Oseledets, and Victor Lempitsky. 2020b. Hyperbolic image embeddings. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_.
* King (2013) Ritchie King. 2013. By reading this article, you're mining bitcoins.
* Kogan et al. (2009) Shimon Kogan, Dimitry Levin, Bryan R. Routledge, Jacob S. Sagi, and Noah A. Smith. 2009. Predicting risk from financial reports with regression. In _Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics_, pages 272-280, Boulder, Colorado. Association for Computational Linguistics.
* Kohara et al. (1997) Kazuhiro Kohara, Tsutomu Ishikawa, Yoshimi Fukuhara, and Yukihiro Nakamura. 1997. Stock price prediction using prior knowledge and neural networks. _Intelligent Systems in Accounting, Finance & Management_, 6(1).
* Kraaijeveld and De Smedt (2020) Olivier Kraaijeveld and Johannes De Smedt. 2020. The predictive power of public twitter sentiment for forecasting cryptocurrency prices. _Journal of International Financial Markets, Institutions and Money_, 65:101188.
* Krafft et al. (2018) Peter M Krafft, Nicolas Della Penna, and Alex Sandy Pentland. 2018. An experimental study of cryptocurrency market dynamics. In _Proceedings of the 2018 CHI Conference on Human Factors in Computing Systems_, pages 1-13.
* Kumar (2009) Alok Kumar. 2009. Who gambles in the stock market? _The Journal of Finance_, 64(4):1889-1933.
* Kyriazis et al. (2020) Nikolaos Kyriazis, Stephanos Papadamou, and Shaen Corbet. 2020. A systematic review of the bubble dynamics of cryptocurrency prices. _Research in International Business and Finance_, 54:101254 

* Lee et al. (2014) Heeyoung Lee, Mihai Surdeanu, Bill MacCartney, and Dan Jurafsky. 2014. On the importance of text analysis for stock price prediction. In _Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC'14)_, pages 1170-1175, Reykjavik, Iceland. European Language Resources Association (ELRA).
* Lin et al. (2017) Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. 2017. Focal loss for dense object detection. In _Proceedings of the IEEE international conference on computer vision_, pages 2980-2988.
* Liu and Serletis (2019) Jinan Liu and Apostolos Serletis. 2019. Volatility in the cryptocurrency market. _Open Economies Review_, 30(4):779-811.
* Longstreth (1986) Bevis Longstreth. 1986. _Modern investment management and the prudent man rule_. Oxford University Press on Demand.
* Luong et al. (2015) Thang Luong, Hieu Pham, and Christopher D. Manning. 2015. Effective approaches to attention-based neural machine translation. In _Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing_, pages 1412-1421, Lisbon, Portugal. Association for Computational Linguistics.
* Luss and D'Aspremont (2015) Ronny Luss and Alexandre D'Aspremont. 2015. Predicting abnormal returns from news using text classification. _Quantitative Finance_, 15(6).
* Malevergne* et al. (2005) Yannick Malevergne*, Vladilen Pisarenko, and Didier Sornette. 2005. Empirical distributions of stock returns: between the stretched exponential and the power law? _Quantitative Finance_.
* Malkiel (1989) Burton G. Malkiel. 1989. _Efficient Market Hypothesis_, pages 127-134. Palgrave Macmillan UK, London.
* Nakamoto et al. (2008) Satoshi Nakamoto et al. 2008. Bitcoin: a peer-to-peer electronic cash system (2008).
* Phillips and Shi (2019) Peter C. B. Phillips and Shuping Shi. 2019. Detecting financial collapse and ballooning sovereign risk. _Oxford Bulletin of Economics and Statistics_, 81(6):1336-1361.
* Phillips et al. (2015a) Peter C. B. Phillips, Shuping Shi, and Jun Yu. 2015a. TESTING FOR MULTIPLE BUBBLES: LIMIT THEORY OF REAL-TIME DETECTORS. _International Economic Review_, 56(4):1079-1134.
* Phillips et al. (2015b) Peter CB Phillips, Shuping Shi, and Jun Yu. 2015b. Testing for multiple bubbles: Historical episodes of exuberance and collapse in the s&p 500. _International economic review_, 56(4):1043-1078.
* Phillips and Gorse (2017) Ross C Phillips and Denise Gorse. 2017. Predicting cryptocurrency price bubbles using social media data and epidemic modelling. In _2017 IEEE symposium series on computational intelligence (SSCI)_, pages 1-7. IEEE.
* Phillips and Gorse (2018) Ross C Phillips and Denise Gorse. 2018. Mutual-excitation of cryptocurrency market returns and social media topics. In _Proceedings of the 4th international conference on frontiers of educational technologies_, pages 80-86.
* Plerou et al. (2004) Vasiliki Plerou, Parameswaran Gopikrishnan, Xavier Gabaix, and H Eugene Stanley. 2004. On the origin of power-law fluctuations in stock prices. _Quantitative Finance_.
* Qin and Yang (2019) Yu Qin and Yi Yang. 2019. What you say and how you say it matters: Predicting stock volatility using verbal and vocal cues. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_, pages 390-401, Florence, Italy. Association for Computational Linguistics.
* Rosenfeld and Thurston (1971) Azriel Rosenfeld and Mark Thurston. 1971. Edge and curve detection for visual scene analysis. _IEEE Transactions on computers_, 100(5):562-569.
* Sawhney et al. (2020a) Ramit Sawhney, Shivam Agarwal, Arnav Wadhwa, and Rajiv Ratn Shah. 2020a. Deep attentive learning for stock movement prediction from social media text and company correlations. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_. Association for Computational Linguistics.
* Sawhney et al. (2020b) Ramit Sawhney, Shivam Agarwal, Arnav Wadhwa, and Rajiv Ratn Shah. 2020b. Deep attentive learning for stock movement prediction from social media text and company correlations. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_, pages 8415-8426, Online. Association for Computational Linguistics.
* Sawhney et al. (2021) Ramit Sawhney, Arnav Wadhwa, Shivam Agarwal, and Rajiv Ratn Shah. 2021. FAST: Financial news and tweet based time aware network for stock trading. In _Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume_, Online. Association for Computational Linguistics.
* Semenova and Winkler (2021) Valentina Semenova and Julian Winkler. 2021. Reddit's self-organised bull runs: Social contagion and asset prices.
* Shimizu et al. (2021) Ryobehi Shimizu, YUSUKE Mukuta, and Tatsuya Harada. 2021. Hyperbolic neural networks++. In _International Conference on Learning Representations_.
* 88. Machine learning in finance.
* Sobel (2000) Robert Sobel. 2000. _The Big Board: a history of the New York stock market_. Beard Books 

Alice Stevens. 2021. The impact of social media on cryptocurrency in modern business.
* Stieg (2021) Cory Stieg. 2021. Why people are so obsessed with bitcoin: The psychology of crypto explained.
* Sutskever et al. (2014) Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. _arXiv preprint arXiv:1409.3215_.
* Tabari et al. (2018) Narges Tabari, Piyusha Biswas, Bhanu Praneeth, Armin Seyeditabari, Mirasad Hadzikadic, and Wlodek Zdrozny. 2018. Causality analysis of Twitter sentiments and stock market returns. In _Proceedings of the First Workshop on Economics and Natural Language Processing_.
* Ungar (2001) Abraham A. Ungar. 2001. Hyperbolic trigonometry and its application in the poincare ball model of hyperbolic geometry. In _in Proceedings of the Fourth European SGI/Cray MPP Workshop (Sep 10-11_, pages 6-19.
* Wu et al. (2018) Huizhe Wu, Wei Zhang, Weiwei Shen, and Jun Wang. 2018. Hybrid deep sequential modeling for social text-driven stock prediction. In _Proceedings of the 27th ACM International Conference on Information and Knowledge Management_, pages 1627-1630.
* Xu and Cohen (2018a) Yumo Xu and Shay B. Cohen. 2018a. Stock movement prediction from tweets and historical prices. In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, pages 1970-1979, Melbourne, Australia. Association for Computational Linguistics.
* Xu and Cohen (2018b) Yumo Xu and Shay B Cohen. 2018b. Stock movement prediction from tweets and historical prices. In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, pages 1970-1979.
* Yenidogan et al. (2018) Isil Yenidogan, Aykt Cayir, Ozan Kozan, Tugce Dag, and Cigdem Arslan. 2018. Bitcoin forecasting using arima and prophet. In _2018 3rd International Conference on Computer Science and Engineering (UBMK)_, pages 621-624. IEEE.
* Zhang et al. (2018) Wei Zhang, Pengfei Wang, Xiao Li, and Dehua Shen. 2018. Some stylized facts of the cryptocurrency market. _Applied Economics_, 50(55):5950-5965.
* Zhao et al. (2010) Xiaojun Zhao, Pengjian Shang, and Yulei Pang. 2010. Power law and stretched exponential effects of extreme events in chinese stock markets. _Fluctuation and Noise Letters_.
* Zhu (2014) Haoxiang Zhu. 2014. Do dark pools harm price discovery? _The Review of Financial Studies_, 27(3):747-789.

## Appendix A Evaluation Metrics

### Mcc

Considering imbalance in our dataset we use MCC to to evaluate all our models as it takes into account true and false positives and negatives and is generally regarded as a balanced measure. The MCC is in essence a correlation coefficient value between -1 and +1. A coefficient of +1 represents a perfect prediction, 0 an average random prediction and -1 an inverse prediction. Formally, given a confusion matrix \(\begin{pmatrix}tp&fn\\ fp&tn\end{pmatrix}\) MCC is defined as,

\[MCC=\frac{(tp\times tn)-(fp\times fn)}{\sqrt{(tp+fp)(tp+fn)(tn+fp)(tn+fn)}} \tag{12}\]

### F1 score

F1 score is the harmonic mean between precision and recall. The F1 score is defined as,

\[F1=\frac{2}{recall^{-1}+precision^{-1}} \tag{13}\]

\[precision=\frac{tp}{tp+fp} \tag{14}\]

\[recall=\frac{tp}{tp+fn} \tag{15}\]

### Exact Match

EM measures the percentage of overall predicted bubbles that exactly match the true bubble spans.

\[\text{ExactMatch}=\frac{tp+fp}{tp+tn+fp+fn} \tag{16}\]

## Appendix B Experimental settings

We implement mbhn using the Pytorch framework. The Hyperbolic module of mbhn is based on the implementation 5). Our mbhn has a total of 858 and 44,520 parameters with price and text as input respectively. We utilize the grid search to find all optimal hyperparameters based on the validation MCC scores for all models. As an optimiser we use Adam with \(\beta_{1}=0.9\) and \(\beta_{2}=0.999\) and an L2 weight decay of \(1e-5\). We use early stopping based on the Accuracy score over the validation set.

Footnote 5: [https://github.com/ferrine/hyrnn](https://github.com/ferrine/hyrnn)

## Appendix C Dataset curation And Preprocessing

To create CryptoBubbles dataset, we select top 9 cryptocurrency exchanges and choose around 50 most traded cryptocoins by volume from each exchange and obtain 456 cryptos in total as shown in Table 7. For these cryptos we mine 5 years of daily price data consisting of opening, closing, highest and lowest prices from 1st Mar'16 to 7th Apr'21 using CryptoCompare.6 Next, we extract 

cryptocurrency related tweets under Twitter's official license. Following Xu and Cohen (2018), we extract crypto-specific tweets by querying regex ticker symbols, for instance, "SDOGE\b" for _DogeECoin_. We mine tweets for the same date range as the price data and obtain 2.4 million tweets. We observe that the number of tweets increases every year, suggesting the popularity of speculative trading using social media.

To identify bubbles, we use the PSY model Phillips et al. (2015) which is a widely used exuberance detection method in financial time-series analysis Cheung et al. (2015); Harvey et al. (2016). Following Corbet et al. (2018) we feed the closing prices of each cryptocurrency to the PSY model which outputs date spans for each bubble having labels 1 or 0 denoting whether the day is included in the bubble or not. We rank all of our cryptos by the trade volume and delete some of the lower ranked cryptos having no bubble. After this step we obtain with a set of 404 cryptos.

To generate a data sample belonging to a crypto \(c_{i}\), we first pick \(T\) lookback dates and \(\tau\) lookahead dates. Now, for each lookback day we randomly choose 15 tweets and chronogically append the tweets. For the corresponding lookahead days we pick the labels generated using the PSY model. We repeat this process with a stride of \(3\) between the starting lookback dates of previous and next sample. The start (or end) indexes of the bubbles are the index where the bubble started (ended).

We curate zero-shot Reddit data to test our model's ability to generalize across different asset classes and social media platforms. We analyze 12 meme crypto and 17 meme equities (For instance, GameStop, and DOGE) selected based on social media activity over 15 months from 15th Jan'20 to 3rd April'21 as shown in Table 8. We mine Reddit posts and comments from top trading subreddits such as r/wallstreetbets using the PushshiftAPI.7 We scrape daily price data using Yahoo Finance for equities and CoinGecko for cryptos and use the PSY model Phillips et al. (2015) to identify bubbles. We follow the same sample generation process that we use for Twitter data. We note that zero-shot data establishes a challenging environment for evaluating CryptoBubbles since it contains varied post lengths and unseen asset classes.

Footnote 7: [https://github.com/pushshift/api](https://github.com/pushshift/api)

## Appendix D Data Annotation by Financial Analysts

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 \(\kappa\) of 0.93. We recruited these reviewers through an online form, paid them for their work and no ethical considerations were required since we use public financial data. 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.

## Appendix E Limitations

Time-series forecasting is a fundamental frontier in deep learning. Hyperbolic learning and RNNs are ubiquitous frameworks that can encode temporal relationships between entities. By advancing existing RNN approaches and providing flexibility for RNNs to capture different intrinsic features from hyperbolic spaces, mbhn can be used to represent a wide range of complex streams of data for various applications such as social influence prediction, healthcare and financial applications. One potential issue of mbhn, like many other RNN based models, is that it provides limited interpretability to its outputs. In the future, we will look into this to enhance the explainability of new time-series forecasting architectures, making such RNN architectures applicable in more critical applications such as medical domains.

 

- Coin Tickers**

STX, BNB, REN, NKN, COCOS, HBAR, ORN, ARDR, TRKUP, BAND, WRX, ONE, MTL, EUR, ETHUP, VET, KMD, GTO, LTCUP, XRPPU, FET, SXP, EOSUP, ERD, UMA, PNT, MATIC, ADADAP, BUILL, ANKR, RUNE, BZRX, LIO, CHR, WIN, MFT, KSM, STRAX, VITE, ENJ, NULS, BNBUP, KEY, STPT, XTZUP, STMX, SAND, BKRW, PROY, ONT, DOTUP, BCL, LINKUP, AION, GXS, BEAR, FLM, BTCUP, UNIIUP, CTSI, DOCK, HIVE, DOTDOWN, DQSK, SUSHI, LINKDOWN, NPXS, PERL, XYZDOWN, TKXDOWN, DOT, ETHDown, WAN, BNBDOWN, EOSDQWN, XRPDOWN, ABADOWN, FIO, RVN, CHZ, LTCDown, WING, UNIDWON, HOT, BTCDown, COTI, BNBBULL,BNBBEAR

OCENA, PI,DDD, FTI, DRGN, XRPBEAR, WNXXM, YFV, HIT, SNET, NBS, MAN, GTC, GCN, SKR, REQ, FIL, LBk, CELR, BLZ, SSNC, DKA, LIEN, KIN, OAX, JNT, SBCT, BCN, MDA, EOSBEA, CDT, OPEN, COFI, HNSC, RCN, EAR, NAX, POWR, ETHBER, TFUEEL, SWAP, SOP, MBL, FUEL, GAS, REM, MXC, CORH, QSP, RVC, DX, XVG, QLC, ZPT, PCX, HSC, CREAM, OM, AVAX, QKC, ALY, YAM, ADLEAS, VGTHO, ZSC, COMP, BEAM, BCDM, BU, MK, ELEC, PST, DOS, XRPBULL, BAT, RFG, DREP, GRIN, DPY, DILI, DOGE, BOT, TOMO, PAYS, SMT, QASH, XMC, NEO, EOSDAC, SOL, GNX, GARD, DCF, YAMV2, ZIL, DATA, SALT, KAVA, GSE, MINl, USDG, MIX, XEM, RLC, MDT, TNT, BCX, NBort, KLAY, YFI, XTZ, JFI, TAI, GOF, CKB, NAS, BNTY, MET, IOTX, EOSBULL, BTMN, GMAT, IGN, SERo, RED, LEDN, OIN, RATINO, SFG, DBC, SASHIMI KAI, AMPL, RSV, MTA, MTV, KTON, AR, BTO, PHA, ETHBULL

ACT, DHA, CAI, CNTM, ANW, Zhen, ABIT, WTC, UGC, WBTC, WNT, INT, NUC, TMTG, CMT, DMD, CVP, QUN, GUSD, ENT, CELO, BLLOC, ASR, TCR, HPg, YOU, SUN, STORIJ, CRO, EM, DTT, XAS, WGRT, CHAT, DEP, Cic, HC, RIO, APM, KNc, Linkor, MOF, ORR, UT, MITH, AK, UKIRT, PTM, PPYR, BSv, VIB, JST, NDN, BCD, LRC, FSN, DGD, MXT, DGB, CVT, LBA, SWRV, XP0, BHp, AE, TRADE, CVC, YFI, PTG, FRONT, PRa, PLG, SWFITC, ZYRO, OF, TRUE, DNA, HADAO, BTM, ELF, GET, YEE, AST, DMG, KCASH, ROAD, SNP, ORBS, APIX, ALV, TOPC, BNT, AERGO, RFUEL, QTUM, SRM, DEINT, IQ, DHT

\begin{table}
\begin{tabular}{l l} \hline \hline
**Exchange** & **Coin Tickers** \\ \hline
**Bitfinex** & FIN, DTX, OMG, XAUT, ESS, EGLD, NEC, GOT, ETC, RRB, NMR, EDO, RRT, LYM, CLO, ANT, XRP, ONL, PQA, Rif, GANT, sun, UNI, ETP, SVM, EOS, BTSE, COND, PNPK, UFR, ZECG, AI, RINGX, AUC, LEO \\  & TRX, XRA, WAX, ETH, DITH, BOX \\ \hline
**HuobiPro** & HPT, NODE, BIX, KAN, IRIS, SOC, LAMB, NANO, LOOL, LOOM, ELA, OGO, AKRO, GT, OGN, TT, WICC, GLM, RSR, VSYS, RUFF, VIDY, BHD, NEW, HRC, PVT, MQ, SDS, FIRO, THENA, XXOA, ATCW, HT, LET, FOR, ATP, GXC, DTA, STEEM, CTX, FFT, NET, ARPA, IOST, HII, DF, ITC, MCO, ACh, HTS \\ \hline
**Cuinbase** & CGLD, REP, NMR, XLM, LTC, ZRX, BTC \\ \hline
**Biance USA** & ATOM, WAVES, HNT, SOL, ALGO, IOTA \\ \hline
**Kraken** & ICX, ADA, SC, DAI, PAXG, GBP, BAL, DASH, SNA, MLN, LSK, \\  & GNO, BCH, AUD \\ \hline
**Gemini** & AMP, OXT \\ \hline \hline \end{tabular}
\end{table}
Table 7: Exchanges with their corresponding crypto tickers.

\begin{table}
\begin{tabular}{l l} \hline \hline
* \\ SNDL &
- \\ THCB &
- \\ ZOM &
- \\ GME &
- \\ \hline \hline \end{tabular}
\end{table}
Table 8: Equity and cryptos used for Reddit Data.