Exploring the Cryptocurrency Market in R Shiny
Posted by Alex Ellman
Updated: Jun 4, 2020
Cryptocurrencies entered the mainstream with the rapid rise in value of bitcoin, which was introduced in 2009 but didn’t begin its value ascent until 2017. Though intended to be a true currency and used as a store of value and medium of exchange like the US dollar, bitcoin has instead been mostly utilized as an electronic commodity to be traded similarly to stocks. With the rise in popularity of bitcoin, thousands of “altcoins” were developed and released to be traded on online exchanges. Investors can enter these markets by exchanging US dollars or other fiat currencies for bitcoin or ethereum, a popular altcoin, and then trading either of these for any altcoin.
The cryptocurrency market is extremely volatile, much more so than the stock market, with regular daily swings of 10-20% in value against the US dollar being quite normal for most currencies. The novelty of such technology and the high volatility lead to a bull market in late 2017 and into 2018 that saw the overall market cap (value of all cryptocurrency in USD) shoot from around $200 billion to $800 in less than 3 months. This was followed by a period of extreme downturn with the overall market cap nearing its pre-bubble level of $200 billion about 3 months after the peak.
Being interested in seeing how the market has changed since the 2017-2018 bubble and empowering users to develop delve into the market themselves, I created an R Shiny app that provides an overview of what has happened in the market since 2016 and allows the user to create their own portfolio and track its value.
The creation of the app was possible due to my discovering of this data set which includes the daily high trading value and market cap for bitcoin and 2000 altcoins.
The main features of the app are the “Overview” section and the “Portfolio” section. In the overview section the user is displayed two charts: one showing the market cap of bitcoin, ethereum and those of all altcoins added together and the other showing the daily volatility of these market caps, calculated by taking the rolling standard deviation of the percent change in value of the previous 30 days. These charts can be seen below:
Here users can filter to their desired begin and end dates as well as choose to display any combination of the three currency groups in order to hone in on specific comparisons.
The portfolio section allows users to input their choice of any 6 cryptocurrencies included in the data, input a desired investment amount in US dollars and select a buy and sell date to create a hypothetical portfolio. User input interface can be seen below with a portfolio created:
Once this is done the user is displayed a table which provides information on how each asset in their portfolio would have performed. The table for the above portfolio can be seen below:
Though I left most of the researching to be done to the user with the use of the portfolio section, I did come across some interesting findings in the overview tab. The first is that bitcoin clearly “lead” the bubble at the 2017, seeing an increase in its market cap shortly before the altcoin market cap increase, better seen below with the chart adjusted to zoom in to the bubble period:
What else can be seen here is that this initial sharp increase in the bitcoin market cap was followed by a sharp decrease bringing its market cap equal to that of the altcoin market with the altcoin market cap soon taking off and surpassing bitcoin. This suggests a possible selling off of bitcoin by bitcoin holders in order to buy into the more volatile altcoin market (the respective volatilities during this time can be seen below):
Since the bubble, bitcoin is the only segment of the market that has shown recovery, shown in the chart below:
Moving forward, it is hard to picture a resurgence in altcoins where they regain the market cap they once had as bitcoin has already shown flares of upside in July of 2019 with no evidence of excitement in the altcoin market following as it did in early 2018. Investors have seemingly grown wise to the instability in the altcoin market and are not considering it as they did before, however, there is still a clear belief in bitcoin.
Seeing as the market has seemingly chosen a “winner” in bitcoin I would be interested in futher developing this app to focus specifically on bitcoin. A possibility would be to create a tab that allows the user to see the daily value of bitcoin against alternative investments such as the S&P, user-selected stocks or commodities. More interesting features, data availability permitting, would be widgets that convey the level of bitcoin’s adoption as a true currency as bitcoin’s value would seemingly benefit from more people needing to hold it to make transactions. Such widgets could include a transaction tracker which displays the volume of bitcoin being traded and in what amounts/trade. Such information could indicate if a trade was for an investment purpose (larger amount) or for a service or good (smaller amount). Another widget could display the number of current bitcoin holders and businesses accepting bitcoin as payment, with more holders and businesses indicating wider adoption.
Data scientist with background in ecommerce. Analytical problem solver with demonstrated history of leveraging data to achieve business goals. Able to combine previous business experience and domain knowledge with data science and machine learning skillset to create and...View all articles