Bitcoin Value Cryptocurrencies: Miracle or Menace?

Posted on Apr 25, 2019

Project GitHub | LinkedIn:   Niki   Moritz   Hao-Wei   Matthew   Oren

The skills we demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.


I really like Bitcoin. I own Bitcoins. It’s a store of value, a distributed ledger. It’s also a good investment vehicle if you have an appetite for risk. But it won’t be a currency until volatility slows down. - David Marcus, CEO of Paypal

On January 12, 2009, the first bitcoin transaction of 10 BTC was made from the so-called creator of Bitcoin, Satoshi Nakamoto, to one of the early supporters, Hal Finney. It was a historical moment in history because it marked the transfer of value between two individuals without the need of a facilitator, like a bank. Moreover, the transaction was anonymous and completely secure.

Bitcoin Transaction

Only 10 years after the first Bitcoin transaction, there are now more than 2000 cryptocurrencies, hundreds of crypto exchange platforms and millions of traders. Crytocurrencies have been in the spotlight since then because of their high volatility and associated gains.

So, was cryptocurrency investment a pure nonsense? How did their price, market capitalization and volatility change over time? What is the correlation of volatility with market capitalization? Which countries are more interested in cryptos? Would I be rich now if I bought 100$ worth of Bitcoin in 2013? Which businesses are accepting Bitcoin as payment?

I created a tiny but powerful Shiny application to provide visual answers to these questions. If you are interested, please go ahead and check the  Cryptograph. Simply go to project's Github page for the source code.

Data & Methodology

Main dataset consists of daily historical price, transaction volume and market capitalization info of 2,071 crypto coins. Total number of rows is 942,000. Yet, for the sake of performance of the Shiny application, I focused on top 100 coins in terms of market capitalization.

I used Google Trends Bitcoin popularity index for the past 5 years (2014 - 2019) to examine the popularity of Bitcoin in different countries. I added the country vs. continent mapping to the index data for further analysis on continent level.

Finally, I connected to Coinmap API to get the list of businesses around the world that accept Bitcoin as a valid payment method. The data consist of 14,650 businesses from several categories. Other variables are date of acceptance, latitude and longitude.

Main Dataset

On top of the ones I had in my main dataset, I calculated extra columns of log returns for price and market capitalization to have a better understanding of when big sharp changes occurred. Moreover, I manually estimated the volatility for each cryptocurrency. The steps are as follows:

  • Calculate 1-day lag differences of daily prices.
  • Calculate percentage change in daily price changes.
  • Estimate standard deviation of daily percentage changes for a specific month.
  • The value of the standard deviation is defined as the daily volatility for that month.
  • Multiply daily volatility by square root of number of trading days in a month (30 for cryptos) to have the monthly volatility.
  • Annualize the daily volatility by multiplying it with square root of number of trading days in a year (360 for cryptos).

How to Use Cryptograph

About tab gives a brief introduction. Nothing more than what you have read so far, but you may still want to watch the 3-min Cryptocurrency video.

Data tab shows the main dataset. You can select the coin and the metric to visually see the fluctuations. The chart below displays Bitcoin's log returns throughout the years:

The log returns chart indicate that there had been two separate time periods in the history of Bitcoin in which Bitcoin investors experienced huge gains. Interestingly, first one was from Oct'13 to Dec'13 and the second one was again from October to December but in 2017. Actually, it raises the question if there is seasonality in the prices of Bitcoin but it is not the scope of this project. 

Profit/Loss tab is for the ones who would like to see if they missed the chance of being incredibly rich. Or you could be proud of yourself for not having the decision of making a 100$ investment in a specific crypto type for a selected date range, which yielded only 10$.

Let's say, you made a fantastic decision and made a lot of money. Wouldn't you want to know where you could spend your coins? Using the interactive map on the Stores tab, you can locate the store, find its name and the type of business.

The figure above shows the number of stores opened for each store type and year. Having observed the spikes in 2014 and 2017, it may be suggested that there is a correlation between cryptocurrency prices and number of stores opened. In general, number of ATMs opened each year has gradually increased until 2018, while number of stores in categories food, shopping and attraction are following the same pattern over the course of the years.

Google provides an index from 0 to 100 by calculating the search trends of various countries. According to this data, Bitcoin seems like to be more popular in some African countries such as Nigeria, South Africa and Botswana as well as countries in the North such as Greenland, Canada and the Netherlands. I assume the reasons behind the interest of those regions in Bitcoin is the economical conditions for the African countries and the ecological concerns of people living in the North.

Finally, volatility tab introduces the risk involved in crypto investments. You can first select coins and then months from the drop-down list to check for volatility associated with coins.

The last interactive graph visualizes the correlation between volatility and average market capitalization of top-20 coins. From Oct'2017 to Feb'2018, both the volatility and average market capitalization increases for almost all of the top-20 coins. After Feb'2018, the wind changes and both of them begin to decrease. It means that the market shrinks and stabilizes.

Future Research

I aim to improve Cryptograph by adding data related to crypto mining, especially electricity consumption and GPU prices, so that I can analyze the correlation of them with crypto prices. I also want to test for the existence of seasonality in crypto prices.

About Author

Ali Uysal

Ali is a passionate data scientist with an educational background in Engineering and Economics. He has more than 9 years of work experience in various IT roles. He started his career as a Support Engineer at Vodafone Turkey...
View all posts by Ali Uysal >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI