There are now over 1600 cryptocurrencies with a combined market capitalization exceeding $100B111https://en.wikipedia.org/wiki/List_of_cryptocurrencies. The number of exchanges where these “coins” are traded is also growing. Despite initial suspicion about the use of cryptocurrencies for trading in illicit substances (e.g. the infamous Silk Road marketplace where drugs were allegedly traded for payments in Bitcoin222https://blockexplorer.com/news/silk-road-timeline-bitcoin-drugs-dark-web/, Dec 21 2018.) and for managing payments to obtain keys to unlock files after ransomware attacks333https://cryptonews.com/exclusives/the-most-popular-cryptocurrencies-in-ransomware-attacks-1712.htm, May 4 2018., the use of cryptocurrencies for legitimate purposes has aggressively expanded in recent years. In 2014,  found that many Bitcoin users view it as an asset rather than as a currency to exchange for goods, and that Bitcoin is used as an alternative investment to stocks and funds. Major companies (e.g. JP Morgan on Feb 19 2019) have even announced that they plan to launch their own cryptocurrencies444https://www.thestreet.com/investing/bitcoin/jpmorgan-to-launch-first-united-states-bank-cryptocurrency-14866499. More interestingly, Revolut received a European banking license in December 2018, placing it more or less on par with normal banks, even though they trade in digital currency555https://www.investinblockchain.com/cryptocurrency-banking-good/. Simply put, cryptocurrencies are now reaching the mainstream, and we can expect this trend to grow in coming years.
In this paper, we develop an algorithm and framework called Collective Cryptocurrency Price Prediction (C2P2 for short) to predict whether a cryptocurrency will move up or down in price one day ahead, i.e. C2P2 will predict at the end of day , whether the price of a particular cryptocurrency will move up (i.e. ) or move down (i.e. ) compared to the price on day .
We do not
focus on predicting the actual prices of cryptocurrencies in this paper because it is relatively easy to do so. To understand why, we implemented a simple and basic linear regression model to predict the next day’s closing price using the prior day’s closing price. Notably, the Coefficient of Determination () values for all coins but Tether and NEM surpass 0.9, and Normalized Mean Square Error (NMSE) values range from 0.0001 to 0.0135. We chose to focus on the classification task of up/down price prediction because the baseline regression results were already impressive.
C2P2 involves several innovations on past work in cryptocurrency price prediction. First, we comprehensively study the up/down daily opening, high, low, closing (OHLC) price movements of the 21 most popular cryptocurrencies666According to coinmarketcap.com. Note that this list is dynamic and the top cryptocurrencies are liable to change. which is the most extensive study of up/down cryptocurrency price movements to date by number of cryptocurrencies considered. Because prices of cryptocurrencies can be affected by externalities (such as political events, law enforcement actions, natural disasters), and because the up/down movements of different cryptocurrencies may not be mutually independent, the C2P2 algorithm uses a novel iterative procedure: in the first iteration, we jointly predict the up/down movements of each of the 21 cryptocurrencies and save these as “tentative” predictions — then in the next iteration, we use the tentative predictions from the previous iteration to learn a new predictive model and make a new set of tentative predictions — and this process continues until either convergence occurs or until a specified stopping condition (number of iterations reaches a threshold). Second, C2P2
also captures pairwise similarities between the feature vectors of any two cryptocurrencies and leverages these similarities when making predictions.C2P2 also uses time-lagged variants of these features. We note that the C2P2 algorithm is the most important novel contribution of the paper. Third, we also identify the importance of different classes of features in predicting up/down cryptocurrency price movements. We show the importance of similarity features via an ablation study which shows that removing similarity features causes a significant drop in prediction results (cf. Table II in the paper). Fourth, C2P2
incorporates a combination of feature selection and time delay lags — we experimentally identified the best combination of features, time lags, and classification algorithms. Finally, unlike past work, our experiments use Reddit data, which serve to gauge the strength and polarity of public opinion on each cryptocurrency. Moreover, as cryptocurrency prices may be affected by stock markets, we also use stock index features from ten of the world’s major stock markets, as well as gold, oil, and bond futures.
We rigorously test the performance of our predictive models using the robust Area under a Receiver Operating Characteristic Curve (AUC) metric using a rolling window predictor to emulate real-world conditions. Some past papers have used k-fold cross validation which is inappropriate for temporal data (which is our case).777K-fold cross validation takes a data set and randomly splits it into (usually ) disjoint subsets called “folds”. iterations are then performed. In the ’th iteration, the fold is used as the test set while the union of the remaining folds is the training set. Performance metrics for machine learning (e.g. accuracy, AUC, F1-score etc) are then aggregated across the performance across the folds. Because of the random split used in cross validation procedures, it is possible that the training fold () contains data that applies to days in the future, which may then be used to predict up/down movements for days in the past that are present in the test fold . This makes -fold cross validation inappropriate for temporal data. Instead, we use rolling window prediction in which training is done up to day and predictions are made for day . Training is then done up to day and predictions are made for day , and so forth.
Our experiments, conducted on 21 cryptocurrencies using six months of Reddit data from July 1st, 2018 to December 31st, 2018, used four months of data for training and then moved the training window one day at a time to predict up/down cryptocurrency price movements for the next day for the remaining two months. We compared our results with those from a recent 2018 paper, using market statistics and basic blockchain data available — we also compared with results of a 2017 paper, though here we could only compare with Bitcoin as their paper used Bitcoin specific features. In our experiments, we make four types of predictions: Will day ’s high price exceed day ’s high price (High-High)? Will day ’s low price exceed day ’s low price (Low-Low)? Will day ’s closing price exceed day ’s (Close-Close)? And, finally, will day ’s opening price exceed day ’s (Open-Open)? Our experiments show that:
C2P2 beats ’s method on all 21 cryptocurrencies by a margin of 5.1–83% (depending on which of the four prediction types is considered) which is substantial and is statistically significant when comparing model performances across all 21 cryptocurrencies ().
C2P2 beats  on Bitcoin data by 16% for Close-Close task, which is also statistically significant ().
The AUCs generated by C2P2 range from 0.609 to 0.8. Moreover, over half of the 21 cryptocurrencies are predicted with AUCs exceeding 0.7.
The results suggest that C2P2 is robust and offers good performance in predicting up/down movements for a variety of cryptocurrencies, outperforming recent baselines.
Ii Data Description
Our experiments and data apply to the second half of 2018 (from July 1 2018 to December 31 2018). We gathered data from the following categories to use in our model.
Historical market data888Market data included daily OHLC prices. for the 21 cryptocurrencies studied was obtained from https://www.binance.com/.
Global economic metrics aimed at capturing the fluctuations and volatility of the global economy, including ten well-known national stock indices999These ten national stock indices, alphabetically, were: ASX 200, CAC 40, DAX, DJIA, FTSE 100, IBEX, MOEX, Nikkei 225, BSE SENSEX, S& P 500, and the SSE Composite Index. as well as six indices related to commodities and bonds, were obtained from Yahoo Finance and Quandl. In total, we acquired 88 features from these indices for each day.
Reddit data. We used Reddit’s PRAW API101010https://praw.readthedocs.io/en/latest/ in combination with the PushShift API111111https://pushshift.io/ in order to obtain posts (also known as submissions) from 23 relevant discussion communities on Reddit during the July 1, 2018 to December 31, 2018 time frame. In all, we gathered 225,869 submissions from 43,139 submitters — additionally, we gathered 1,624,674 comments (on the submissions) from a total of 101,564 authors.
Iii Feature Extraction
For each cryptocurrency and day , we extract many features in order to create a feature vector (cf. Algorithm 1). The features fall into the following broad categories.
Reddit statistics. To allow us to compare the daily distributions of basic reddit statistics, we calculate histograms across the comment counts and submission scores for all Reddit submissions made on each day. This process results in 22 features for each cryptocurrency on each day.
Reddit psychological variables. We use the Linguistic Inquiry and Word Count (LIWC) framework  to calculate all LIWC features on the title text, submission text, and comment text for the Reddit submissions. Developed by a psychologist, LIWC produces features capturing psychological processes (e.g. positive emotion, anxiety, anger), cognitive processes (e.g. certainty, doubt), perceptual processes (e.g. see, feel, hear), drives (e.g. affiliation, power, reward, risk), and more. In total, LIWC provides us with 279 features for each cryptocurrency on each day.
Reddit sentiment variables. We use the Google Cloud Natural Language API121212https://cloud.google.com/natural-language/
(Cloud NL) to run high-quality sentiment analysis on the title text, submission text, and comment text for all Reddit submissions made on each day. The API provides a sentiment polarity and magnitude for each sentence in our text data, in addition to an overall polarity and magnitude. For each of the text categories (title, submission, comment), we use the sentence results provided by Cloud NL to generate histograms across sentiment polarity and magnitude on each day. After this process, we end up with 66 sentiment features for each cryptocurrency on each day.
Iv C2p2 Algorithm
We build our model on the idea of collective classification [5, 6] where, instead of predicting the price of each of the 21 cryptocurrencies individually, we try to predict them simultaneously. However, our collective classification algorithm is novel in many respects — first through the use of similarity metrics to compute pairwise similarities between the feature vectors of every pair of cryptocurrencies, and second, through the use of probabilities of prices going up rather than raw predictions (up vs. down).
The C2P2 algorithm is shown in detail as Algorithm 1 and is visualized in Figure 1. Informally speaking, the algorithm works as follows to predict whether the prices of cryptocurrencies will go up on day .
The algorithm takes a set of cryptocurrencies as input - assume that the cryptocurrencies are therefore referenced as . The input features on or before day were described in Section III and shown on the left red blocks in Figure 1. The algorithm additionally takes a lag as input saying that the last days of data (i.e. days ) should be used for classification. For each considered cryptocurrency
, the algorithm uses a pre-trained classifier(we will describe the training stage shortly). Finally, the algorithm takes a similarity function to compare the feature vectors of any two cryptocurrencies, and a threshold to determine when the C2P2 Algorithm converges.
Lines 1–1 construct a time-lagged feature vector by considering the previous days. is an input to the algorithm and the choice of suggests that we think an up/down movement of the price on day depends only on the features of cryptocurrencies during the previous days, i.e. day through day . For each cryptocurrency , we now create a time-lagged feature vector of the concatenated feature vectors .
Lines 1–1 look at each cryptocurrency and compare the similarity of the time-lagged feature vector with the time-lagged feature vector of each other cryptocurrency using a similarity function . The resulting pairwise similarities are then concatenated together to create . We consider five similarity functions: Euclidean, Cosine, Manhattan, Pearson Correlation Coefficient (PCC), and Spearman Correlation Coefficient (SCC). The idea in this step is that cryptocurrencies with similar time-lagged feature vectors should move up or down in a similar manner over time.
In the th iteration of this loop, we first create a copy (Line 1) of the probability vector for the day we are trying to predict. This is what the loop tries to update every time it is executed.
Next, Line 1 creates a vector of all cryptocurrency probabilities (i.e. the probability of going up) for day with the exception of currency .
The inner for loop (Lines 1–1) takes independently a pre-trained model and predicts the probability of price going up/down for every cryptocurrency in Line 1 — but to do so, it uses as additional features, the predicted probabilities for each other cryptocurrency at last prediction and the similarities with each other cryptocurrency, thus embodying the collective spirit.
Finally, Line 1 updates the probability vector.
The algorithm terminates either when the probability vectors generated in two successive iterations are very close to each other or when the number of iterations exceeds a threshold and the algorithm eventually terminates in Line 1 by returning the final probability vector.
Training stage of C2P2. We first use the training set (i.e. data from days ) to construct the feature vectors as specified in Lines 1-1 of the C2P2 algorithm. For each and each cryptocurrency , we also have the corresponding labels of whether prices go up/down from the previous day. Second, we augment the feature vectors for each cryptocurrency-day pair with the vectors so that in the training data, each feature vector also has the predicted probabilities (by C2P2 ) as a feature. Each model is then trained iteratively until the training probability vectors (,…) converge or the maximum number of iterations is reached. This process is the same as Line 1–1 in the C2P2 algorithm except that in Line 1 we train instead. Finally, models are saved.
Example. As an illustration of Figure 1 and Algorithm 1, consider the case when we have just two cryptocurrencies, Bitcoin and Ethereum () and suppose the lag considered is . For each day, we first build time-lagged features for Bitcoin by concatenating the features (red blocks on the left of Figure 1) of the previous two days. We construct for Ethereum in the same way. Second we compute the similarity (Euclidean distance for example) of . In this case, the similarity would be the same, i.e. for some . Third, we initialize probabilities and construct . Then, are augmented with (), () to get the feature vectors for models . To predict whether their prices will go up/down on day 10, we train models using feature vectors and up/down labels from days 1 to 9. During the training stage, we iteratively train , update , and update feature vectors for all days but only on the training data. When the probabilities converge or the maximum number of iterations is reached, we save . When predicting, we construct feature vectors on day 10 in the same way, then use learned to iteratively predict and update feature vectors. Finally, are returned when they converge or the number of iterations reaches a limit.
V Experimental Results
V-a Experiment setup
In our experiments, we vary the lag value from 1 to 30. We set the convergence threshold and maximum iterations to . Since C2P2
We compared C2P2 with two state-of-the-art baselines (one each from 2017 and 2018) to gauge to performance of our algorithm.
The first baseline is 3] used data from 10 different Bitcoin exchanges in order to predict whether the next day’s Bitcoin price would go up/down, and since these same data were not available for other coins, we were only able to compare C2P2 against their method on Bitcoin data. The data used is from Bitcoinity.org and Blockchain.info.
The second baseline is , which found that LSTM RNNs worked best in Bitcoin price prediction. The authors used historical market statistics (such as price, volume, and market capitalization) in addition to blockchain features (such as block size, cost per transaction and hash rate) as input. We already had the market statistics for all of the cryptocurrencies, and we were able to collect blockchain data for all cryptocurrencies except IOTA, Maker, Ontology, and VeChain from https://coinmetrics.io/. We still compared C2P2 to  for these coins, but simply did not use blockchain data for them.
V-C Feature Selection
With lag , C2P2 uses features ( economic features, Reddit features, history price features, similarity features, and probability features). To remove redundant features and avoid overfitting, we perform two kinds of feature selections on the training set
. The first method is Principal Component Analysis (PCA), from which we get 120 features (same as the number of training examples). The second method chooses the 512 features with the highest F-values using Analysis of Variance (ANOVA) techniques. We report the best results among the two feature selection methods in all experiment results.
V-D Experiment 1: Comparison of C2p2 and baselines
We define the lift of an algorithm w.r.t. to a baseline method to be . A lift that is greater than one suggests that algorithm outperforms algorithm , while a lift less than one suggests the opposite.
Table I shows C2P2’s best results for next day closing price up/down prediction for each coin and the corresponding best classifiers, original features, lags and lifts with respect to . We see that C2P2 improves the prior work of  by a margin of 5.1%-44.1%. We also implemented  and tested it on the same training and test split of Bitcoin data. C2P2 beats  by 16% for predicting next-day closing price going up or down.
Similarly, we see that C2P2 improves the prior work  by a margin of 6.5%-83%, 6%-81.7% and 6.6%-65% respectively on High-High, Low-Low and Open-Open predictions. Our improvements across all coins and tasks are statistically significant with (using the Student’s t-test).
|Bitcoin||L-SVM||P, E, R||7||0.697||1.306|
|IOTA||RF||P, E, R||29||0.709||1.371|
|NEO||KNN||P, E, R||3||0.671||1.312|
|Stellar||RF||P, E, R||21||0.632||1.132|
|VeChain||LR||P, E, R||8||0.756||1.456|
|Zcash||RF||P, E, R||15||0.673||1.234|
V-E Experiment 2: Contribution of the similarity features in C2p2
We conduct an ablation test by removing similarity components ( used in Algorithm 1) in the task of Close-Close prediction. We report the highest AUCs for all coins in Table II and compute the lifts of C2P2 with respect to the AUCs obtained when C2P2 does not use similarity features, i.e., the AUC column in Table I divided by the one in Table II. We observe that the similarity features improve AUCs of all but one coin (Stellar) by a margin of 0.4% to 17%. This shows the contribution of similarity features and the power of collectively predicting coins’ prices.
Vi Related Work
Cryptocurrency price prediction in current literature is usually framed as a regression problem, a market simulation to calculate ROI, or as a classification problem in predicting the sign of future price change. Because cryptocurrencies are not managed by a central bank or government, they do not subscribe to the classical economic theories of supply and demand. Instead, additional features, ranging from digital currency specific features to social media trends, are extracted to better predict the price.
Bitcoin price prediction is the topic of most papers in the area of cryptocurrency price prediction. References [3, 7, 8, 2] leveraged blockchain features to predict Bitcoin price with varying degrees of success. Sin et al.  achieved 64% classification accuracy in predicting the sign of price change using an ensemble of neural networks tuned with genetic algorithms. Jang et al.  produced a regression with a Mean Average Percent Error (MAPE) of 0.0138 using Bayesian Neural Networks. McNally et al.  reported 53% accuracy in price change sign prediction using an LSTM neural network. Jang et al.  incorporated global economic and currency metrics in addition to blockchain and market data in an LSTM model, obtaining an RMSE of 59.4.
Global economic features, or features which are selected to represent the health and volatility of the global economy, and their relationship to cryptocurrencies were investigated in several works. References [9, 10, 11] found evidence of effects from macro-financial indices on Bitcoin price. Ciaian et al.  integrated market forces of supply and demand, investor attractiveness indicators and global macroeconomic variables to explain Bitcoin prices. Dyhrberg  concluded that cryptocurrencies lie somewhere between traditional currencies and commodities. References [8, 12, 7] leveraged these financial features in their predictions, as do we in this paper.
Sentiment Analysis has been used extensively to understand the impact of public opinions on the price fluctuations of cryptocurrencies. References [13, 10, 14] found evidence of a strong correlation between the magnitude of public interest (using Google and Wikipedia search volumes as an analog) and the price of Bitcoin. Further, [13, 15, 16, 17] provided evidence that the polarity of public opinion is powerful for predicting public interest in Bitcoin. Pant et al.  added sentiment analysis of tweets to an RNN to produce 77.6% accuracy . Kim et al. 
achieved an accuracy of over 70% for Bitcoin, Ethereum and Ripple using sentiment features extracted from online forum discussions.
Multiple currency prediction has only been done in a select few papers. Although the literature primarily focuses on Bitcoin, references [19, 16, 20, 12] also attempted prediction for other popular cryptocurrencies. Catania et al. 
performed regression analysis across Bitcoin, Ethereum, Ripple, and Litecoin, and found statistically significant results for them. Using an LSTM model, Smuts obtained 85% accuracy for Ethereum using Google Trends features, and 76% for Bitcoin using Telegram sentiment.
gave a detailed introduction and experimental comparison of several types of collective classification algorithms. They further discussed various heuristics of constructing the features incorporating interdependent information. Differently,C2P2 builds five kinds of similarities between all pairs of nodes (cryptocurrencies in our case) as relational features. Moreover, none of these models were directly applied to predicting cryptocurrency prices.
The problem of predicting the up/down movements of cryptocurrencies is of great interest to both the financial industry and to individual consumers. We develop the C2P2 algorithm that has two innovations: (i) the use of similarities between cryptocurrency feature vectors, and (ii) that uses tentative predictions about cryptocurrency’s up/down price movements to predict that of the th cryptocurrency. In addition, we use Reddit data for our predictions. We test C2P2 on the 21 cryptocurrencies with the highest market capitalization (according to coinmarket.com) and show that C2P2 beats out two recent competitors with substantial lifts which are statistically significant.
-  F. Glaser, K. Zimmermann, M. Haferkorn, M. C. Weber, and M. Siering, “Bitcoin - asset or currency? revealing users’ hidden intentions,” in ECIS 2014, 2014.
-  S. McNally, J. Roche, and S. Caton, “Predicting the price of bitcoin using machine learning,” in 2018 26th Euromicro International Conference on Parallel, Distributed and Network-based Processing (PDP), 2018.
-  E. Sin and L. Wang, “Bitcoin price prediction using ensembles of neural networks,” in 2017 13th International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery (ICNC-FSKD). IEEE, 2017, pp. 666–671.
-  J. W. Pennebaker, R. J. Booth, R. L. Boyd, and M. E. Francis, “Linguistic inquiry and word count: Liwc2015.” Pennebaker Conglomerates, 2015.
-  X. Kong, P. S. Yu, Y. Ding, and D. J. Wild, “Meta path-based collective classification in heterogeneous information networks,” in Proceedings of the 21st ACM international conference on Information and knowledge management. ACM, 2012, pp. 1567–1571.
-  B. Taskar, M.-F. Wong, P. Abbeel, and D. Koller, “Link prediction in relational data,” in Advances in neural information processing systems, 2004, pp. 659–666.
-  H. Jang and J. Lee, “An empirical study on modeling and prediction of bitcoin prices with bayesian neural networks based on blockchain information,” IEEE Access, vol. 6, pp. 5427–5437, 2018.
H. Jang, J. Lee, H. Ko, and W. Lee, “Predicting bitcoin prices by using
rolling window lstm model,” in
KDD Data Science In Fintech Workshop (DSF), 2018.
-  P. Ciaian, M. Rajcaniova, and d. Kancs, “The economics of bitcoin price formation,” Applied Economics, vol. 48, no. 19, pp. 1799–1815, 2016.
-  L. Kristoufek, “What are the main drivers of the bitcoin price? evidence from wavelet coherence analysis,” PLoS ONE, 2015.
-  A. H. Dyhrberg, “Bitcoin, gold and the dollar–a garch volatility analysis,” Finance Research Letters, vol. 16, pp. 85–92, 2016.
-  L. Catania, S. Grassi, and F. Ravazzolo, “Forecasting cryptocurrencies financial time series,” in CAMP Working Paper Series, no. 5. Norwegian Business School, 2018.
-  L. Kristoufek, “Bitcoin meets google trends and wikipedia: Quantifying the relationship between phenomena of the internet era,” Scientific reports, vol. 3, p. 3415, 2013.
-  M. Matta, I. Lunesu, and M. Marchesi, “Bitcoin spread prediction using social and web search media.” in UMAP Workshops, 2015, pp. 1–10.
-  D. Garcia, C. J. Tessone, P. Mavrodiev, and N. Perony, “The digital traces of bubbles: feedback cycles between socio-economic signals in the bitcoin economy,” Journal of the Royal Society Interface, vol. 11, no. 99, p. 20140623, 2014.
-  Y. B. Kim, J. G. Kim, W. Kim, J. H. Im, T. H. Kim, S. J. Kang, and C. H. Kim, “Predicting fluctuations incryptocurrency transactions based on user comments and replies,” PLoS ONE, 2016.
-  J. Bukovina and M. Martiček, “Sentiment and bitcoin volatility,” in MENDELU Working Papers in Business and Economics, vol. 58, 2016.
D. R. Pant, P. Neupane, A. Poudel, A. K. Pokhrel, and B. K. Lama, “Recurrent neural network based bitcoin price prediction by twitter sentiment analysis,” in2018 IEEE 3rd International Conference on Computing, Communication and Security (ICCCS). IEEE, 2018, pp. 128–132.
-  N. Smuts, “What drives cryptocurrency prices?: An investigation of google trends and telegram sentiment,” in ACM SIGMETRICS Performance Evaluation Review, vol. 46, no. 3. ACM, 2018, pp. 131–134.
-  J. Abraham, D. Higdon, J. Nelson, and J. Ibarra, “Cryptocurrency price prediction using tweet volumes and sentiment analysis,” in SMU Data Science Review, vol. 1, no. 3. SMU, 2018.
-  P. Sen, G. Namata, M. Bilgic, L. Getoor, B. Galligher, and T. Eliassi-Rad, “Collective classification in network data,” AI magazine, vol. 29, no. 3, p. 93, 2008.