Bitcoin volatility

The high volatility that exists in bitcoin makes it difficult for it to be used as money, defining it as a generally accepted means of exchange. We are going to study in this article its volatility based on the historical data of the price of BTC and if it is decreasing or increasing over time.

Within the bitcoiner community there are two lines of opinion regarding price volatility:

  • A current that thinks that this will subside over time as its adoption increases and its market capitalization increases, making the variations in supply and demand have less percentage weight and therefore the price fluctuations are less. It will also help if its use as a financial asset decreases, so many investors who are currently susceptible to emotion, fear and euphoria will decrease and with this the extreme reactions in the market will decrease.
  • Another that believes that volatility is intrinsic to the fixed supply of bitcoin and that this inelasticity leads to very significant variations between supply and demand and with it price fluctuations. Bitcoin does not generate cash flow, so changes in sentiment influence the price much more than, for example, in the case of a company share. The fact that the production of bitcoin cannot be increased at any cost prevents speculation that stabilizes the price.

Both in one case and in the other, the fact that a fundamental or approximate price of bitcoin cannot be calculated creates doubts that lead the price to fall and rise sharply.

What is volatility?

The volatility of an asset is the change in price over a given period of time. High volatility is associated with riskier assets. In traditional financial markets, volatility is usually measured over a 30-day period, therefore the measure of volatility for a given day is based on the change in performance over the previous 29 days.

To calculate the volatility in bitcoin we use the classic method where the mobile standard deviation of the percentage changes in the price of BTC is taken during a certain period of time, that is, the percentage of change in the price is calculated day by day during the period , then the mean is calculated and how far the day-to-day values ​​are from that mean (the standard deviation).

Evolution of volatility in the price of bitcoin

We are going to study how the volatility of bitcoin has evolved throughout history and if it is going to decrease or increase over time. We will also compare it to the volatility of the price of gold and the SP 500 index to get an idea of ​​how much the difference is between them.


The conclusions we reached from the analysis carried out on the volatility with the bitcoin price data.

  • Bitcoin is a very volatile digital asset, to get an idea of ​​it, it is 4 times more volatile than gold and the SP500 index.
  • This volatility in the period studied from February 2014 to the present does not seem to be reducing but rather remains more or less stable.
  • The information that the data transmits to us is that the current that maintains that the volatility of the price of bitcoin as something intrinsic and that advocates that it will not be reduced over time would be the one that would be correct.
  • The definition of money would have three legs, a generally accepted medium of exchange, a unit of account, and a store of value. If the volatility continues like this, it will be difficult for bitcoin to be used as a means of exchange since the variability in the price means that neither sellers nor buyers are interested in using it for their daily exchanges and without having that property it is very difficult for it to become a unit of account, so it could not be considered money.
  • That it cannot be considered money does not mean that it does not have other financial uses, to date it has been a very good reserve of value in the medium and long term, since the progression in price has been meteoric, it also allows them to be their own users are the holders of the asset and not that these are guarded by banks or other organizations and the non-existence of intermediaries means that there is no limitation when buying and selling BTC.

Study of volatility based on data

Yahoo’s yfinance module is installed.

!pip install yfinance > /dev/null

The Python libraries that will be used in the study are the following.

import pandas as pd
import requests
import matplotlib.pyplot as plt
import yfinance as yf
from pylab import rcParams
import as px
import seaborn as sns
import warnings


Download the daily bitcoin price data from the Yahoo finance website.

btc_data ='BTC-USD', interval = '1d')[['Close']]

[*********************100%***********************] 1 of 1 completed

Calculation of the standard deviation in a window of 30 days.

volatility_days = 30
btc_data['pct_change'] = btc_data['Close'].pct_change()*100
btc_data['stdev'] = btc_data['pct_change'].rolling(volatility_days).std()

To convert the volatility of a short-term measure to a long-term metric, a multiplication of the measure by a factor that is the square root of the total number of trading periods of the asset in the interested period is usually carried out, for example if we want annualize it and since Bitcoin operates 24 hours a day, 7 days a week, 365 days a year, we have to multiply by np.sqrt(365), which is different from traditional assets where the value of 252 is used as there are 252 stock trading days per year.

# Annualizing the standard deviation to 30 days
btc_data['vol'] = btc_data['stdev']*(365**0.5)

Graph with the volatility of the price of BTC at 30 days from October 2014 to the present.

plt.title(str(volatility_days) + ' day BTC closing price volatility')

The percentage of how the closing price of BTC has changed from one day to the next.

plt.title('Day BTC closing price percentage change')
plt.plot(btc_data['pct_change'], label='Day BTC closing price percentage change')

When making a linear adjustment of the values of the volatility of BTC since October 2014, it is observed that the line is close to the horizontal, which indicates that there is no decrease in volatility over time, but that to date the volatility has has maintained and has even increased slightly.

btc_data['id_'] = range(1, 1+len(btc_data))
sns.regplot(x='id_', y='vol', data=btc_data,
            marker='o', color='blue', scatter_kws={'s':1})

Download data on the price of gold and the SP500 index from the Yahoo finance website.

gold_data ='GC=F', start=btc_data.index[0])[['Close']]
gold_data['pct_change'] = gold_data.pct_change()*100
gold_data['stdev'] = gold_data['pct_change'].rolling(volatility_days).std()
gold_data['vol'] = gold_data['stdev']*(252**0.5)

SP500_data ='^GSPC', start=btc_data.index[0])[['Close']]
SP500_data['pct_change'] = SP500_data.pct_change()*100
SP500_data['stdev'] = SP500_data['pct_change'].rolling(volatility_days).std()
SP500_data['vol'] = SP500_data['stdev']*(252**0.5)

[*********************100%***********************] 1 of 1 completed [*********************100%***********************] 1 of 1 completed

The average of the volatility of bitcoin throughout the period studied is more than four times that of gold and that of the SP 500 index. The high volatility of bitcoin makes it very difficult for it to be used as money, understanding this as a generally accepted means of exchange, since for sellers it implies great uncertainty, since if after the sale of their products the price drop abruptly can mean that they have no benefits or even losses, if on the contrary the price rises substantially their benefits will skyrocket.

print("Bitcoin and SP500 volatility ratio: " + str(round(100 * btc_data['vol'].mean() / SP500_data['vol'].mean(),0)) + "%")
print("Bitcoin and gold volatility ratio: " + str(round(100 * btc_data['vol'].mean() / gold_data['vol'].mean(),0)) + "%")

Bitcoin SP500 volatility ratio: 434.0%

Bitcoin gold volatility ratio: 475.0%

Graph with the comparison between the volatility of bitcoin with that of the price of gold and that of the SP500 index.

plt.title(str(volatility_days) + ' day bitcoin and SP500 closing price volatility')
plt.plot(btc_data.vol, label='BTC')
plt.plot(SP500_data.vol, label='SP500')
plt.plot(gold_data.vol, label='Gold')

Link notebook Python in github: Bitcoin volatility

Categories: Bitcoin, BTC, Price, Python, Script


Leave a Reply

%d bloggers like this: