This is the second part of this series. We will focus here on the price of bitcoin itself and the nature of sentiment analysis. This is still very academic so feel free to jump to part 3 for insights in the development framework and code.

If you want to have a look at the website that we built : http://www.sentcrypt.com/

3 Bitcoin’s price

3 a. How is bitcoin priced?

After explaining what is Bitcoin, how does it compares to traditional assets and how blockchain can offer alternatives to traditional investment vehicles, let’s focus on the actual valuation of bitcoin and see how can we attribute a value to this currency.

An interesting approach was proposed by Garcia and Al, 2014. The paper considers that the fundamental value of a bitcoin equals at least to the cost involved in its production (i.e. mining). This definition has the added value to be completely detached from the market price or speculation. The estimate is given by calculating the total number of SHA-256 hashes needed to mine one bitcoin and then using an approximation of the power requirements for mining those hashes and multiplying it by the price of power. This operation would yield a lower bound estimate of the fundamental value of a bitcoin. If we refer to calculation operated on Investopedia this amount would be around $7,494 in Switzerland on 08.03.2018, if we trust Forbes it was around $8206.64 in June this year (2020), following the halving.

Another way to approach the problem would be to calculate the fair value through the velocity of money. According to Campajola et al, preprint(2019) the standard theory of money velocity assumes that the following equation holds at any point in time :

MV = PQ

Where :

  • M = total money supply in the system
  • V = Velocity, the speed of money
  • P = the overall price levels
  • Q = Transactions, the physical quantity exchanges

In that case the price would be proportional to revenue and not profit, additionally as the price of bitcoin can be very volatile as the velocity changes, self-reinforcing feedback loop between hoarding and higher prices.

If we focus on the market price of Bitcoin, then we have to turn our eyes to the exchanges that are trading the crypto currency. The price of Bitcoin is then driven by the supply and demand mechanism of a classic market. When demand for bitcoin increases, the price increases, and when demand falls, the price falls. Let’s see below what can impact supply and demand and as such the market price of bitcoin.

Supply :

As mentioned earlier the supply of bitcoin is limited to 21 million coins. New coins are minted at a predictable fixed rate when miners process blocks of transactions, the rate at which those new coins are mined is slowly decreasing with time:

With every halving (every 210,000 blocks), the reward to mine a full block (fresh bitcoins) is halved. As new coins are minted slower and slower, the demand can actually increase at a faster rate than the supply increases, rocketing the price up.

Demand :

Bitcoin is not the only cryptocurrency out there and as such experiences the heavy competition from other “alt coins”. It is clear that so far Bitcoin is king and is the most well-known and popular crypto currency. Most of the mainstream funds investing in crypto currencies are taking huge positions in Bitcoin for instance. And as such it still enjoys a very heavy dominance, around 63.17% on 30.11.2020 as shown in the graph below.

Competition from alternative coins can and has proven to impact the price of Bitcoin, especially during the ICO frenzy of 2017 where the bitcoin dominance has melted from a staggering 90% to less than 40%. What is clear is that after the dust has settled following the crypto crash of early 2018 and we entered the crypto winter, Bitcoin has slowly crawled back to a more dominant position. While tokens were dying left and right, the Bitcoin was claiming back its throne, cementing that in the end Bitcoin was indeed the pillar of crypto. 

Demand is also impacted by the availability of the coin on public exchanges, as those are the main channel for mainstream afficionados to acquire the precious coin. The user experience and the overall “easiness” to book purchase transactions and trade bitcoin on those exchanges can represent a barrier to entry to some users. The more it is easy to open an account, transfer FIAT money from your regular bank account to the exchange and buy crypto, the more an exchange can draw additional participants to create a network effect. We can only but acknowledge the efforts that the main exchanges have put in motion in the last years to democratize the access to bitcoins and other cryptocurrencies. We can now buy cryptocurrencies instantly using a credit card or wire money overnight to exchanges to buy bitcoins with fiat in an unprecedented smooth process.

In order to propose bitcoins and crypto currencies to the masses, we cannot oversee the regulations and legal matters impact on the demand. In the last years we have witnessed over and over again how news concerning potential bans of cryptocurrencies had a visible impact on the price of bitcoin. As most regulators are still wrapping their head around the blockchain space and have troubles to come up with a viable and universal regulation it is quite clear that nothing is set in stone concerning the availability of the crypto currencies globally. While it is starting to get quite clear that no country will simply ban blockchain or access to cryptocurrencies in order to avoid a technological lockout, we can fathom how making it more difficult to trade or acquire bitcoin might have an impact on demand.

Finally, it can be assumed from past academic research that there is a link of causality between media headlines, activity on social medias and the price of bitcoin. We will abord this subject more in detail in the following sections so let’s leave it at that for the moment.

As of today, 31.11.2020, the bitcoin is currently priced at USD 19,335.50. Quite near it’s all time high from December 2017. 

So in the end, why does bitcoin has any value ? Well, let’s cite www.bitcoin.org on that one :“Bitcoins have value because they are useful as a form of money. Bitcoin has the characteristics of money (durability, portability, fungibility, scarcity, divisibility, and recognizability) based on the properties of mathematics rather than relying on physical properties (like gold and silver) or trust in central authorities (like fiat currencies). In short, Bitcoin is backed by mathematics. With these attributes, all that is required for a form of money to hold value is trust and adoption. In the case of Bitcoin, this can be measured by its growing base of users, merchants, and start-ups. As with all currency, bitcoin’s value comes only and directly from people willing to accept them as payment.”

3 b. Is it an efficient market?

According to Wikipedia, the efficient-market hypothesis is a hypothesis in financial economics that states that asset prices reflect all available information at an instant t. A direct implication from that is that it is impossible to beat the market consistently on a risk-adjusted basis since market prices have already all known parameters “priced in” and as such should only react to new information.

After reviewing the literature it seems clear that bitcoin and cryptocurrencies should not be considered as an efficient market. Olivier Kraaikeveld and Johannes De Smedt provided a fine overview concerning the nature of the cryptocurrency markets in regards to the efficient market hypothesis :  

Ciaian and al. (2018) find that bitcoin’s market and other alt coins are heavily interdependent and that the correlation is stronger during the short-term than the long term. Whereas, by definition, in an efficient market successive price changes are completely independent (Fama, 1970).

Additionally, in an efficient market investors are assumed to be rational and give value to an asset based on its fundamental value. However in an article by Silverman and al (2017), an economist states that due to the lack of intrinsic value and the impact of speculation on cryptocurrencies price, there is no possibility for cryptocurrencies to be valued fundamentally, and thus making the market irrational.

We can also observe varying exchanges for Bitcoin from one exchange to another.

At the time that we speak :

  • Kraken BTC/USD : $19,317.1
  • Binance BTC/USD : $19,339.33
  • Coinbase BTC/USD : $19,321.57
  • Crypto.com BTC/USD : $19,332.67


This of course encourages operating arbitrage by simultaneously selling at high and buying at lower prices on different exchanges to profit from the difference in price. Arbitrage is of course a characteristic of inefficient markets. In practice Arbitrage is not always feasible by taking into consideration the transactional costs, delays in filling the orders and the default risk (i.e. MtGox).

Urquhat (2016) concludes his research by affirming that the bitcoin market is inefficient but might be progressively transitioning into a more efficient market after analysing the price of bitcoin over the period 2010 to 2016.

Mensi and al. (2019) also find price patterns between Ethereum and Bitcoin, implying that both currency’s markets are inefficient.

Hanlin Yang finds strong price momentum in cryptocurrency prices, which should not happen in an efficient market.

In a nutshell, the consensus still seems to tend towards the fact that bitcoin and cryptocurrencies are not an efficient market.

3 b. Trends, Sentiment and social interactions

Behavioural psychology approaches to the stock market analysis and by analogy, to bitcoin trading, offers a plausible and promising alternative to the EMH. Daniel Kahneman is also sceptic concerning our ability to beat the market “they are not going to do it. It’s just not going to happen”, even by using behavioural psychology. But what about Bitcoin?  Bitcoin is surely a less mature asset class than traditional finance and as such may be more prone to trends, social interactions and sentiment. In general, behavioural bias leads investors to invest non-rationally and as such can have an impact on the pricing of an asset, especially in a young market where institutional investments are less dominant.  Lo, (2012) agrees with this affirmation, stating that “a relatively new market is likely to be less efficient than a market that has been in existence for decades”.

The adaptive markets hypothesis, showcased by Lo (2004) is probably more pertinent in the context of cryptocurrencies. In Lo’s opinion EMH is not completely wrong but probably incomplete as it does not fully explain market behaviour and the concept of rationality. Lo states that “markets are not always efficient, but are usually competitive and adaptive, varying in their degree of efficiency as the environment and investor population change over time” Lo (2014).

In regards to our document and our work, what is of interest to us is to determine if we can identify a strong correlation between the price of bitcoin and the activity on social medias, social interactions and social factors.

In terms of Media attention, Yannick Zjörjen from the university of Zurich has touched the subject in his work  “Predicting Bitcoin – Gauging the market for bitcoin using web search queries”. From an empirical perspective we can see in the quick screenshot below that we can find indeed a pattern in google trends for bitcoin and the price of bitcoin. To be noted that this observation is less visible today as showcased in the introduction section of this document.

Nevertheless, this topic was already heavily studied in the literature.

Engelberg and Parsons (2011) have found evidences that media sentiment has an impact on trading by identifying a link between the sentiment and the trading activity when this link is broken following natural disasters.

Kristoufek (2013) has showed that there exists a strong correlation between the price of bitcoin, daily Wikipedia and weekly search volumes.

Following Kristoufek’s study we can cite David Garcia and Al. (2014) that has identified two positive feedback loops that lead to price bubbles in the absence of exogeneous stimuli: one driven by word of mouth and the other by new bitcoin adopters. The research group has observed that:

Social cycle: search volume increases with price, word of mouth increases with search  volume and price increases with word of mouth. This represents the feedback cycle between social dynamics and price in the bitcoin economy.

User adoption cycle : search volume increases with price, amount of new users increases with search interest and price increases with increases in user adoption.

What is quite surprising is that the team also identified a negative relation between search and price. Indeed 3 of 4 largest daily price drops at that time (2014) were preceded by the 1st, 4th and 8th largest increases in google search volume the day before. It would be interesting to see if this phenomena has continued in the following years.

In the following paper, Garcia and Schweitzer (2015) combined in their observations economic signals of volume  and price of Bitcoin, adoption of the bitcoin technology, transaction volume with social signals related to information search, word of mouth volume, emotional valence and opinion polarization from tweets related to bitcoin in order to predict increases or decreases in the price of bitcoin. They then applied these insights and predictions to design and test algorithmic trading strategies to finally confirm the hypothesis that trading based social media sentiment has the potential to yield positive returns on investment.

Kaminsiki and Gloor (2014) affirmed through their study that negative tweets and tweets that express uncertainty correlate moderately positive with the bitcoin trading volume and negatively with the bitcoin price, they finally concluded that Twitter sentiment mirrors but does not predict the market price of bitcoin.

Vytautas Karalevicius and Al. (2017) identified that interaction between media sentiment and the bitcoin price exists, and that there is a tendency for investors to overreact on news in a short period of time through their study.

Olivier Kraaijeveld and Al. (2018) also found that twitter sentiment has predictive power for the returns of bitcoin, bitcoin cash and Litecoin.

In fine, after reviewing the academic literature on the subject, analysing the global sentiment from social medias seems to be a good option to try to predict the price of bitcoin. Twitter seemed to be the most relevant social media source as twitter users often post sentiment infused posts to the community, looking to discuss and to broadcast opinions. In addition twitter possesses a good API in order to retrieve streaming tweets.

4 Sentiment Analysis

4 a. Sentiment analysis in a nutshell

As mentioned in the previous section, we have established that there is some kind of correlation between the news and social media and the cryptocurrency market. Probably due to the very nature of the cryptocurrency market and its young age, events and sentiment in news or social media have a tendency to impact positively or negatively the price of bitcoin. It is quite clear then that having the ability to analyse on the fly the global sentiment and key indicators can offer an edge to an intelligent investor. Of course this task is not trivial and requires good knowledge in natural language processing, trained and operational models, custom made for specific fields of finance. This field of research is of course not only applicable to crypto currencies,  in the regular financial markets most of the big investment firms and asset managers developed some kind of automatic trading based on AI powered algorithms, by crawling through the earnings reports of companies or acting on specific alerts and indicators. It is quite an interesting field to explore. 

Anyway, at its roots sentiment analysis is part of natural language processing, focusing on identifying the sentiment or emotion or “affective state” in textual communication, be it tweets, Facebook posts or whole news articles. Sentiment analysis (SA) is a subdiscipline of deep learning and is itself composed of a multitude of tools and techniques in order to find the right classification for the right data set. In the context of cryptocurrencies we can identify a few types of SA that could provide us with interesting findings.

Polarity: Analysis of a text and determining whether the sentiment is rather negative, neutral or positive. In most of the SA tools that we reviewed the sentiment is classified on a discrete range of values that can for instance go from -1 (very negative) to 0 (neutral) to 1 (positive). As an example, we can take a few tweets from our database as this exactly the type of sentiment analysis that we have used.

  • Tweet 1 : “AVOID THIS SCAM!! Bitcoin mining scam will take your money. Avoid working with the following at all costs;… “
  • Polarity : -0.9306
  • Tweet 2 : ” Best performing asset class Bitcoin. Best performing stock Tesla. 2020″
  • Polarity: 0.8979

Emotion: The classifier has a set of different emotions such as “happiness”, “sadness”, “anger”, “despair”, “rage” and will try to associate those emotions to a text, giving an idea about the state of emotion the author is in.

Aspect Sentiment: This type of SA goes a bit further and will try to assign a sentiment to specific features or topics in the text. It will break down the text into chunks and will permit to generate more granular insights into it. As such, we can for instance get the general sentiment towards Trump in an article concerning American politics for instance.

For the sake of simplicity and as it seems to be a good trade-off  we chose to go with Polarity for this exercise. In order to apply sentiment analysis in the context of cryptocurrencies we need first to identify were to find the data. At first glance the usual sources for this type of exercise are either Reddit or Twitter. As an avid Redditor myself I was first keen to try it but after further investigations I decided to go with Twitter. First because it was a new field for me, as I am not tweeting, secondly because it seemed to be a more relevant source to get valuable personal messages. Brandwatch reported that there are 330 million monthly active users, 500 million people visit the website each month without logging in, 500 million tweets are sent each day (6,000 tweets per second). Additionally 24.6% of verified accounts are held by journalists and the dominant age bracket of tweeter users is the 25-34 segment as mentioned on Statista. The facts that the majority of the users are young, informed and prone to technology are all parameters that pushed me to take the decision to go with twitter as my data source. If you also add the fact that Twitter proposes a native API for developers to plug in and collect streaming tweets, then it seemed as the go-to solution in order to collect some sentiment on Bitcoin! To further convince us to use twitter as the data source we can cite Tafti et al. (2016) and Li and al. (2017) that affirm that micro blogging platforms such as Twitter  are well suited to provide a broad and general live market snapshot. Twitter is able to spread content, sentiment, news before mainstream media have the time to react and publish articles, which makes it even better concerning the analysis of the effect of sentiment in the context of crypto markets. We will collect the tweets from twitter with a filter to gather only tweets relative to bitcoin and then attempt to assign a polarity rating to each of them.

4 b. Crypto currencies specifics and challenges

We have seen above that in general crypto currencies can be considered as partly irrational, prone to behavioural bias and an inefficient market. In this context it seems clear that it would be possible to use sentiment analysis in order to predict price swings in the price of bitcoin. But in reality implementing a fully functional sentiment analysis classifier and especially  in the context of crypto currencies represents a set of challenges and difficulties.

The first one would be probably the fact that even if today it is quite easy to use premade SA libraries without any knowledge in deep learning, those are rather generic et do not extrapolate well into context specific jargon. They can be used fine to get a first glimpse on the general sentiment on simple regular sentences like “I love watching a good movie on a Sunday night” but they are not specialized in particular fields. Specific market terminology is important when trying to get accurate sentiment from text treating of a very specific niche subject. As an example we can cite the CRIX index that provides also a daily tweet sentiment and who has incorporated specific crypto jargon into the calculation of the sentiment to make it more precise.

In the literature we can of course cite Loughran and McDonald (2011) who have observed that the performance of a sentiment analysis classifier improves when using a specific dictionary or lexicon.

A second challenge to use sentiment analysis in the context of Bitcoin and Twitter would be the noisiness and the contextualization. Indeed, well written, informative news should be written in a neutral tone and as such should generate a roughly neutral sentiment, on the other hand social media and especially Twitter contain sentiment and heavy polarization but they usually react to already known events. In addition, social medias can produce misleading polarization as they are noisy and highly subjective. The crypto space is rather dynamic and full of unexpected events that polarizes even more the general sentiment pushing it into the extremes and further away from objectivity.

Finally, as Bitcoin and cryptocurrencies are still considered as young technologies, they evolve very fast and as such the jargon and lexical field also evolves rapidly. Terms that were used yesterday might be irrelevant tomorrow and new terms are introduced every day. Who was using “Airdrops” 4 years ago?  What is “moon” referring to? Is it the reddit’s crypto currency or the raise in price for another currency? An evolving lexicon is obviously a nightmare for a specialized sentiment analysis machine learning algorithm.

If the goal is to predict the price of bitcoin then using solely sentiment analysis on tweets seems to be too narrow, a more holistic approach encapsulating multiple data sources, capturing all three areas of sentiment analysis described in the previous section would probably grant better and exploitable results. Luckily, we are merely doing an education project and for that purpose sentiment analysis on a twitter feed will be considered as a realistic and interesting goal.

4 c. What exists on the market

In this section, let’s have a look at what exists on internet in the field of sentiment analysis for crypto currencies and bitcoin.

Crypto Fear & Greed Index: Link

The crypto fear and greed index is pretty popular on internet, it is quite similar to the CNN’s fear & greed index but measures the sentiment in the crypto market rather than in the stock market. They crunch the numbers from a multitude of data sources into a single score. According to the website, the crypto market is very emotional and as such people tend to get greedy when the price is rising with increasing FOMO (fear of missing out) effect and over-sell coins when the market is in a down trend. According to the meter, in case of extreme fear it can be a good opportunity to buy coins, when the greed is high than that means that a correction is coming. As we can see from the screen shot, we can expect a correction coming soon according to the website. 

The data sources used by the crypto fear & Greed index are : volatility (25%), Market momentum/volume (25%), Social Media (15%), Surveys (15%), Dominance (10%) and trends (10%).

Bulls & Bears Index: Link

The bulls & bears index is measuring social media sentiment to showcase how bullish or bearish social interactions are in the context of bitcoins. The index is collecting data from Twitter, Reddit and Bitcoin talk for instance and crunch it using a classifier trained on crypto-specific dictionaries. The algorithm used is taking into account 93 different sentiments and topics in order to determine the mood of the market.

Bitcoin Sentiment Index: Link

The bitcoin sentiment index also crunches posts and interactions on social media platform in order to calculate a bitcoin sentiment index that seems to correlate only moderately to the price of bitcoin if we refer to the charts available on the website. In addition to the bitcoin sentiment the index offers as well the volume of bitcoin’s mentions on social media and an indicator concerning the “buzz” around specific cryptocurrencies. Unfortunately, the website does not disclose any explanation on the methodology used to calculate the different indicators and requires a paid plan in order to retrieve live values.