Guide To CoinMarketCap Dataset For Time Series Analysis – Historical prices Of All Cryptocurrencies

CoinMarketCap is the world's largest crypto market capitalization’s most trusted and accurate source for pricing and information. CoinMarketCap is a U.S. based company. Since its launch in 2013, CoinMarketCap has been the go-to place for the price-tracking website for cryptocurrencies.

Cryptocurrencies are a fast adapting medium of digital currency over the globe. These digital currencies are easily available to purchase with authenticity on many different websites, making it accessible to everyone, and with retailers accepting and trading various cryptocurrencies, money market scenarios are changing and going through a major change. Cryptocurrency is based on blockchain technology, which is a revolutionarily distributed digital backbone. Blockchain implements secure, decentralized systems that can aid in conquering organizational issues of trust, privacy, and security that have been around the work culture throughout the ages. 

CoinMarketCap is the world’s largest crypto market capitalization’s most trusted and accurate source for pricing and information. CoinMarketCap is a U.S. based company. Since its launch in 2013, CoinMarketCap has been the go-to place for the price-tracking website for cryptocurrencies. Every trading market references CoinMarketCap for comparing crypto entities on every minute, rapidly changing cryptocurrency space. CoinMarketCap is best known for its unbiased, timely, accurate information that enables each user to conclude the data.

Time Series 

For these continuous changes of values over a while, time series analysis and forecasting are used. Recurrent Neural Networks and Long Short Term Memory are an important part of machine learning algorithms being used for time-series predictions.

For demonstration, we will be using complete cryptocurrency market history data from Kaggle, which has data scrapped from CoinMarketCap 2014 to 2018 containing 887 cryptos token information. Now let’s do some time series analysis on this data to infer insights out of it. 

 # importing libraries
 import pandas as pd
 import numpy as np
 import matplotlib.pyplot as plt 
 # data exploration
 # making date as index
 df = pd.read_csv("cryptocurrency-market-history-coinmarketcap/all_currencies.csv",parse_dates=["Date"], index_col="Date")

The dataset consists of 8 attributes:

  • Date: The date of observation.
  • Symbol: The symbol of a particular crypto token.
  • Open: The opening price of the stock of each day.
  • High: The highest value over the period.
  • Low: The lowest value over the period.
  • Close: The closing price each day of the stock.
  • Volume: The total amount of security changes over a given period. 
  • Market Cap: It is the total amount in the dollar market value of a company’s outstanding shares.
 # Statistical analysis
 # Bar graph showing each year closing price
 # A lag plot compares data points from each observation in the dataset against data points from a previous observation
 from pandas.plotting import lag_plot
 # Top 10 cryptocurrencies in 2018 Market Cap wise
 ax = df.groupby(['Symbol'])['Market Cap'].last().sort_values(ascending=False).head(10).sort_values().plot(kind='barh')
 ax.set_xlabel("Market cap (in billion USD)")
 plt.title("Top 10 Currencies by Market Cap") 
 # Top 10 cryptocurrencies in 2018 Volume-wise
 ax = df.groupby(['Symbol'])['Volume'].last().sort_values(ascending=False).head(10).sort_values().plot(kind='barh')
 ax.set_xlabel("Transaction Volume (in million)")
 plt.title("Top 10 Currencies by Transaction Volume") 
 # Defining The top 5 cryptocurrencies
 top_5_currency_names = df.groupby(['Symbol'])['Market Cap'].last().sort_values(ascending=False).head(5).index
 data_top_5_currencies = df[df['Symbol'].isin(top_5_currency_names)]
 # Yearly Trend Charts 
 # Closing Price
 ax = data_top_5_currencies.groupby(['Date', 'Symbol'])['Close'].mean().unstack().plot();
 ax.set_ylabel("Price per 1 unit (in USD)");
 plt.title("Price per unit of currency"); 
 # Market Capitalization
 ax = data_top_5_currencies.groupby(['Date', 'Symbol'])['Market Cap'].mean().unstack().plot();
 ax.set_ylabel("Market Cap (in billion USD)");
 plt.title("Market cap per Currency"); 
 # Volume
 ax = data_top_5_currencies.groupby(['Date', 'Symbol'])['Volume'].mean().unstack().plot();
 ax.set_ylabel("Transaction Volume (in million)");
 plt.title("Transaction Volume per Currency"); 

The complete notebook is available here.


In this article, we’ve successfully implemented time series analysis over the CoinMarketCap dataset for all cryptocurrency prices and had a clear understanding of the trends with respect to volume, closing price, and market capitalization.

Download our Mobile App

Jayita Bhattacharyya
Machine learning and data science enthusiast. Eager to learn new technology advances. A self-taught techie who loves to do cool stuff using technology for fun and worthwhile.

Subscribe to our newsletter

Join our editors every weekday evening as they steer you through the most significant news of the day.
Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.

Our Recent Stories

Our Upcoming Events

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox