Analyzing Cryptocurrencies Stocks

Introduction

Cryptocurrencies continue to draw a lot of attention from investors, entrepreneurs, regulators and the general public. Much recent public discussions of cryptocurrencies have been triggered by the substantial changes in their prices so the most efficient and swift way to keep track of the cryptocurrency market its to make an exploratory analysis.

Cryptocurrencies are digital financial assets, for which records and transfers of ownership are guaranteed by a cryptographic technology rather than a bank or other trusted third party. They can be viewed as financial assets because they bear some value holders, even though they represent no matching liability of any other party and are not backed by any physical asset of value, like gold for example.

Objetive

The purpose of this project is to analyze a real world scenario: The cryptocurrency market. Whether you are a crypto enthusiast, crypto investor, a day trader or just someone who wants to learn about cryptocurrencies and data visualization.

Data

We will be analyzing and visualizing 12 major cryptocurrencies, which combined together represents almost 90 to 95% of the cryptocurrencies market:

The data set contains historical OHLC Price, which is commonly known as open price, high price, low price and close price, and the volume of sales in terms of USD.

We are going to use yfinane to gather our data. This module offers a reliable, threaded, and Pythonic way to download historical market data from Yahoo! finance by knowing the ticker symbols of your interest. For this analysis we are going to gather data from January 1st, 2016 to this day.

In this dataframe we have more than 5 years of historical data. The columns are prices open price, high price, low price, close price and adjacent close price. We have a column named Volume, which gives us daily transaction volume in terms of USD.

These values are calculated on 24 hour basis for the price section. We're going to use close price as it is the most accurate representation of price among open, high and low, depending on the finance analysts. Some consider adjacent close price as the most accurate representation, which is particularly true for stocks as it includes calculations that involves dividends and stock splits. However for Cryptocurrency, there is no such thing as dividends. So for visualization porpuses, we're going to use the close price.

The above summary shows that half of the currencies have a total count of 2055 rows while others have less. This means that there are younger cryptocurrencies that havent been around in the market like others.

Exploratory Analysis

Price

Now let's use boxplots to compare currencies in terms of its price. Remember we will be using close price as it is the best representation of price in this situation. Lets also use the log_y parameter to make visible all currencies, since the major currencies (like bitcoin and Ethereum) have skewed the data.

The top 3 cryptocurrencies respecting to price are Bitcoin, Bitcoin Cash and Ethereum. Smaller coins wouldnt be visible if we havent used the logarithmic view since some of them have a very less price, even sold in pennies.

Volume

Lets start by comparing all the currencies with each other In the terms of the volume of transactions, we will use violin charts for this purpose. The reason we're using violin plot is that it provides us with statistical details like median, max, min, Quartile one and quartile three, which would be very useful for financial analysis.

If you are a crypto enthusiast or an investor, you should know that the highest trading Cryptocurrency in terms of volume on average is not Bitcoin.

As you can see, Bitcoin and Tether dominates in terms of volume as a graph clearly shows: the transaction volume of Tether is higher than that of Bitcoin.

This is because Tether is wildly popular in China and East Asia. Tether is pegged at $1 which makes it easiest way to transfer money from one country to another, especially in countries were taking money out of the country is difficult. If you hover to the tail of the cryptocurrencies, it shows you all the statistical value that we need for financial analysis like median, mean, quartiles, min and max values.

The pie chart below can give us the percentage of the market share of each currency.

Tether has the highest volume with 41% followed by Bitcoin with 30% and Ethereum with almost 14%. Therefore, 70% of the cryptocurrency market is dominated by Tether and Bitcoin in terms of volume. Let's go a step further and visualize the entire cryptocurrency market volume in one graph by using a scatterplot.

Similar to the price chart, the use of the log_Y parameter was necesary since bitcoin is the more dominant and makes the other coins invisible by concetrating them in a small area.

As you can see , Bitcoin, which is represented by the blue color at the top right, dominates the entire graph. This implies it is one of the highest price and the highest volume. Apart from Bitcoin, Tether stands out too with its low price, but with one of the highest volume at near $100 billion.

Oher coins that have a good performance are Bitcoin Cash, Ethereum, Dash Litecoin and Chainlink in that order. More volume means more liquidity.

Bitcoin Case

Price behavior

Since we have already explore the market like an all, lets specifically visualize one coin among them: Bitcoin, the one that started it all and the most popular Cryptocurrency out there.

In the line chart you can see the price of Bitcoin started to grow untill early 2017, 8 years since its launch. Later it had an explosion in terms of its price. If you hover here to early 2017 you can see that on January 2017 the price of Bitcoin was less than 1,000 USD, however in December 2017 the price of Bitcoin was around 19,000 USD. One year later, again, in 2018 December, the price of Bitcoin was around 3800 USD. By the 4th quarter of 2020 noone was expecting the hugest grow in cryptocurrencies history with a top value of 63,500 USD.

Volume behavior

As you can see, the transaction volume of Bitcoin in the chart below has an increasing trend. We have had three major peaks. The first in 2018 when the price of Bitcoin was at $20,000 and the Bitcoin bubble had just burst, leading to millions of people selling the Bitcoin. In early 2020 when the stock market crashed because of the coronavirus lockdown, investors ran towards Cryptocurrency and gold as a hedge against the stock market crash. An then a third one at the firt quarter of 2021 which has the highest point. Ups and downs in terms of volume, but the trend it is still rising.

Since our data set has OHLC columns referring to open price, high price, low price and close price, we can vizualize this as a candlestick chart.

These small candles represents how Bitcoin performed on that day. The green candles represent days where Bitcoin had a higher close price than the open price that is Bitcoin closed higher for that day, while the red ones are the days with Bitcoin closed lower than it started. This format is very useful to understand the behavior of the stock price.

Conclusions and recomendations

Using Python we can get quite useful insights from the data analysis and visualizations which might not be clear if we looked the data at finance related websites since these just show charts one by one for each currency.

The cryptocurrency market has always been volatile, therefore a analysis of the historical data can help you to make acurate decisions if you are an investor.

You are very welcome to follow the same analysis and vizualization process for the other 11 coins if you have curiosity. Meaby you can get new insights and make some money.