Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

CryptocurrencyData

Tech Notes

  • Crypto-currencies data acquisition with visualization
  • Cryptocurrencies data explorations

Symbols

  • CryptocurrencyData
Cryptocurrencies data explorations
Introduction
Nearest neighbors graphs
Cryptocurrencies data
Other types of analysis
Significant cryptocurrencies
Load packages
Related events
Definitions
Cryptocurrency time series with events
References
Time series correlations
​
Introduction
The main goal of this notebook is to provide some basic views and insights into the landscape of cryptocurrencies. The “landscape” we consider consists of price action and trading volume time series for cryptocurrencies found in
Yahoo Finance
.
Here is the work plan followed in this notebook:
1
.
Get cryptocurrency data
2
.
Do basic data analysis over suitable date ranges
3
.
Gather important cryptocurrency events
4
.
Plot together cryptocurrency prices and trading volume time series together with the events
5
.
Make observations and conjectures over the plots
6
.
Find “global” correlations between the different cryptocurrencies
7
.
Find clusters of cryptocurrencies based on time series correlations
Here are some details for the steps above:
◼
  • The procedure of obtaining the cryptocurrencies data, point 1, is explained in detail in [
    AA1
    ].
  • ◼
  • There is a dedicated resource object
    CrypocurrencyData
    that provides cryptocurrency data and related documentation.
  • ◼
  • The cryptocurrency events data, point 3, is taken from different news sites.
  • ◼
  • Links are provided in the corresponding dataset.
  • ◼
  • The points 6 and 7 follow similar explorations (and code) described in [
    AA2
    ,
    AA3
    ].
  • ◼
  • Those two articles deal with COVID-19 time series.
  • Remark: Note that in this notebook we do not discuss philosophical, macro-economic, and environmental issues with cryptocurrencies. We only discuss financial time series data.
    Cryptocurrencies data
    The cryptocurrencies data used in this notebook is obtained from found in
    Yahoo Finance
    . The procedure of obtaining the cryptocurrencies data is explained in detail in [
    AA1
    ]. There is a dedicated function provided by this paclet,
    CryptocurrencyData
    , that provides the cryptocurrency data (and related documentation.)
    Load the paclet
    In[136]:=
    Needs["AntonAntonov`CryptocurrencyData`"]
    Here are all cryptocurrencies we have data for:
    In[137]:=
    CryptocurrencyData
    ["CryptocurrencyNames"]
    Out[137]=
    BTCBitcoin,ETHEthereum,USDTTether,BNBBinanceCoin,ADACardano,XRPXRP,USDCCoin,DOGEDogecoin,DOT1Polkadot,HEXHEX,UNI3Uniswap,BCHBitcoinCash,LTCLitecoin,LINKChainlink,SOL1Solana,MATICMaticNetwork,THETATHETA,XLMStellar,VETVeChain,ICP1InternetComputer,ETCEthereumClassic,TRXTRON,FILFilecoinFutures,XMRMonero,EOSEOS
    Remark:
    FinancialData
    is “aware” of 10 cryptocurrencies, but that is not documented (as far as I can tell) and only prices are provided. (For more details see the discussion in
    CryptocurrencyData
    .) Here are examples:
    In[138]:=
    Row[DateListPlot[FinancialData[#,"Jan 1 2021"],ImageSizeMedium,AspectRatio1/4,PlotLabel#]&/@{"BTC","ETH"}]
    Out[138]=
    DateListPlotMissing[NotAvailable],ImageSizeMedium,AspectRatio
    1
    4
    ,PlotLabelBTC
    Significant cryptocurrencies
    In this section we analyze the summaries of cryptocurrencies data in order to derive a list of the most significant ones.
    We choose the phrase "significant cryptocurrency" to mean "a cryptocurrency with high market capitalization, price, or trading volume.”
    Together with the summaries we look into the
    Pareto principle
    adherence of the corresponding values.
    Remark: The Pareto principle adherence should be interpreted carefully here -- the cryptocurrencies are not mutually exclusive when in comes to money invested and trading volumes. Nevertheless, we can interpret the corresponding value ratios as indicators of “mind share” or “significance.”

    By summaries

    Here is a summary of the cryptocurrencies we consider (from
    Yahoo Finance
    ) ordered by “Market Cap” (largest first):
    In[139]:=
    dsCCSummary=
    CryptocurrencyData
    [All,"Summary"]
    Out[139]=
    Symbol
    Name
    Price (Intraday)
    Change
    % Change
    Market Cap
    Volume in Currency (Since 0:00 UTC)
    Volume in Currency (24Hr)
    Total Volume All Currencies (24Hr)
    Circulating Supply
    BTC-USD
    Bitcoin USD
    30374.1
    911.25
    0.0309
    587741000000.
    19211000000.
    19211000000.
    19211000000.
    19350000.
    ETH-USD
    Ethereum USD
    2092.67
    15.72
    0.0076
    249799000000.
    9007000000.
    9007000000.
    9007000000.
    119368000.
    USDT-USD
    Tether USD
    1.0001
    -0.0002
    -0.0002
    81067000000.
    32085000000.
    32085000000.
    32085000000.
    81061000000.
    BNB-USD
    BNB USD
    342.11
    1.62
    0.0048
    53323000000.
    740656000.
    740656000.
    740656000.
    155865000.
    USDC-USD
    USD Coin USD
    0.999832
    0.00013
    0.0001
    31369000000.
    4332000000.
    4332000000.
    4332000000.
    31375000000.
    XRP-USD
    XRP USD
    0.522732
    0.011203
    0.0219
    27052000000.
    1037000000.
    1037000000.
    1037000000.
    51751000000.
    ADA-USD
    Cardano USD
    0.44122
    0.006899
    0.0159
    15346000000.
    341734000.
    341734000.
    341734000.
    34782000000.
    DOGE-USD
    Dogecoin USD
    0.093092
    0.001517
    0.0166
    12939000000.
    821520000.
    821520000.
    821520000.
    138994000000.
    STETH-USD
    Lido Staked ETH USD
    2077.85
    3.47
    0.0017
    12557000000.
    20073000.
    20073000.
    20073000.
    6043000.
    HEX-USD
    HEX USD
    0.068559
    -0.001679
    -0.0239
    11889000000.
    8422000.
    8422000.
    8422000.
    173411000000.
    MATIC-USD
    Polygon USD
    1.1671
    0.0137
    0.0118
    10760000000.
    312021000.
    312021000.
    312021000.
    9219000000.
    SOL-USD
    Solana USD
    24.77
    0.09
    0.0035
    9717000000.
    484643000.
    484643000.
    484643000.
    392327000.
    DOT-USD
    Polkadot USD
    6.8911
    0.2107
    0.0315
    8114000000.
    240466000.
    240466000.
    240466000.
    1177000000.
    LTC-USD
    Litecoin USD
    101.4
    2.94
    0.0298
    7376000000.
    697029000.
    697029000.
    697029000.
    72734000.
    AVAX-USD
    Avalanche USD
    21.12
    0.54
    0.026
    6897000000.
    292323000.
    292323000.
    292323000.
    326613000.
    SHIB-USD
    Shiba Inu USD
    0.000012
    0.0
    0.0138
    6799000000.
    214908000.
    214908000.
    214908000.
    589544000000000.
    WTRX-USD
    Wrapped TRON USD
    0.066435
    0.000463
    0.007
    6755000000.
    395077
    395077
    395077
    101676000000.
    BUSD-USD
    Binance USD USD
    1.0001
    0.0004
    0.0004
    6657000000.
    3334000000.
    3334000000.
    3334000000.
    6656000000.
    TRX-USD
    TRON USD
    0.066522
    0.000713
    0.0108
    6038000000.
    181383000.
    181383000.
    181383000.
    90773000000.
    DAI-USD
    Dai USD
    0.999808
    0.000287
    0.0003
    5057000000.
    120063000.
    120063000.
    120063000.
    5058000000.
    rows 1–20 of
    25
    Here is the summary of summary dataset above:
    In[140]:=
    ResourceFunction["RecordsSummary"][dsCCSummary]
    Out[140]=
    
    1 Symbol
    ADA-USD
    1
    ATOM-USD
    1
    AVAX-USD
    1
    BNB-USD
    1
    BTC-USD
    1
    BUSD-USD
    1
    (Other)
    19
    ,
    2 Name
    Avalanche USD
    1
    Binance USD USD
    1
    Bitcoin USD
    1
    BNB USD
    1
    Cardano USD
    1
    Chainlink USD
    1
    (Other)
    19
    ,
    3 Price (Intraday)
    Min
    0.000012
    1st Qu
    0.502354
    Median
    6.3213
    3rd Qu
    66.0825
    Mean
    2618.25
    Max
    30374.1
    ,
    4 Change
    Min
    -0.001679
    1st Qu
    0.00044725
    Median
    0.09
    3rd Qu
    1.675
    Mean
    71.1586
    Max
    911.25
    ,
    5 % Change
    Min
    -0.0239
    1st Qu
    0.00305
    Median
    0.0118
    Mean
    0.014352
    3rd Qu
    0.028825
    Max
    0.0437
    ,
    6 Market Cap
    Min
    3.259×
    9
    10
    1st Qu
    5.79275×
    9
    10
    Median
    8.114×
    9
    10
    3rd Qu
    1.82725×
    10
    10
    Mean
    4.70736×
    10
    10
    Max
    5.87741×
    11
    10
    ,
    7 Volume in Currency (Since 0:00 UTC)
    Min
    395077
    1st Qu
    1.19395×
    8
    10
    Median
    3.12021×
    8
    10
    3rd Qu
    8.7539×
    8
    10
    Mean
    2.97605×
    9
    10
    Max
    3.2085×
    10
    10
    ,
    8 Volume in Currency (24Hr)
    Min
    395077
    1st Qu
    1.19395×
    8
    10
    Median
    3.12021×
    8
    10
    3rd Qu
    8.7539×
    8
    10
    Mean
    2.97605×
    9
    10
    Max
    3.2085×
    10
    10
    ,
    9 Total Volume All Currencies (24Hr)
    Min
    395077
    1st Qu
    1.19395×
    8
    10
    Median
    3.12021×
    8
    10
    3rd Qu
    8.7539×
    8
    10
    Mean
    2.97605×
    9
    10
    Max
    3.2085×
    10
    10
    ,
    10 Circulating Supply
    Min
    153412
    1st Qu
    1.46741×
    8
    10
    Median
    1.177×
    9
    10
    3rd Qu
    5.90785×
    10
    10
    Mean
    2.36109×
    13
    10
    Max
    5.89544×
    14
    10
    
    Here is a Pareto principle adherence plot for the cryptocurrency market caps:
    In[141]:=
    aMCaps=Normal[dsCCSummary[Association,StringSplit[#Symbol,"-"]〚1〛#["Market Cap"]&]];ResourceFunction["ParetoPrinciplePlot"][aMCaps,PlotRangeAll,PlotLabel"Pareto principle for cryptocurrency market caps"]
    Out[141]=
    Here is the Pareto statistic for the top 12 cryptocurrencies:
    In[142]:=
    Take[AssociationThread[Keys@aMCaps,Accumulate[Values@aMCaps]]/Total[aMCaps],12]
    Out[142]=
    BTC0.499423,ETH0.711686,USDT0.780571,BNB0.825881,USDC0.852536,XRP0.875523,ADA0.888563,DOGE0.899558,STETH0.910228,HEX0.920331,MATIC0.929474,SOL0.937731

    By price

    Get the mean daily closing prices data for the last two weeks and show the corresponding data summary:
    Pareto principle adherence plot:
    Here are the Pareto statistic values for the top 12 cryptocurrencies:
    Plot the daily closing prices of top cryptocurrencies since January 2018:

    By trading volume

    Get the mean daily trading volumes data for the last two weeks and show the corresponding data summary:
    Pareto principle adherence plot:
    Here are the Pareto statistic values for the top 12 cryptocurrencies:
    Plot the daily closing prices of top cryptocurrencies since January 2018:
    Related events
    In this section we make a dataset that has the dates of certain cryptocurrency related events and links to their news announcements.
    Cryptocurrency time series with events
    In this section we discuss possible correlation and causation effects of reported cryptocurrency events.
    Remark: The discussion is based on time series and events only, without considering other operational properties of the cryptocurrencies.
    Here is a date range:
    Here get time series for the daily opening and closing prices for the selected date range:
    Here are the summaries for prices:
    Here are the summaries for trading volumes:
    Here we plot the cryptocurrency events with together with the Bitcoin (BTC) price time series:
    Here we plot the cryptocurrency events with together with the Ether (ETH) price time series:
    Here we plot the cryptocurrency events with together with the BTC trading volume time series:
    ​

    Observations

    Going down

    We can see that opening prices and volume going down correlate with:
    8
    .
    The news announcement that China plans to crackdown on mining and trading
    9
    .
    The news announcement Iran bans crypto mining
    10
    .
    The Sichuan Provincial Development and Reform Commission and the Sichuan Energy Bureau issue of a joint notice, ordering local electricity companies to “screen, clean up and terminate” mining operations
    11
    .
    The start of the “Bitcoin 2021” conference
    Related conjectures:
    ◼
  • We can easily conjecture that 1 and 2 made cryptocurrencies (Bitcoin) less attractive to miners or traders in China and Iran, hence the price and the volume went down.
  • ◼
  • The most active Bitcoin traders were attending the “Bitcoin 2021” conference, hence the price and volume went down.
  • Going up

    We can see the prices and volume going up correlate with:
    12
    .
    The news announcement of El Salvador adopting BTC as legal tender currency
    13
    .
    The news announcement that US Justice Department recovered most of the ransom paid to the Colonial Pipeline hackers
    14
    .
    The end of the “Bitcoin 2021” conference
    Related conjectures:
    ◼
  • Of course, a country deciding to use BTC as legal tender would make (some) traders willing to invest in BTC.
  • ◼
  • The announcement that USA Justice Department, have made (some) traders to more confidently invest in BTC.
  • ◼
  • Although, the opposite could also happen -- for some people if BTC can be recovered by law enforcement, then BTC is less attractive for financial transactions.
  • ◼
  • After the end of “Bitcoin 2021” conference the attending traders resumed their usual activity.
  • ◼
  • That conjecture and the “start of Bitcoin 2021” conjecture above support each other.
  • ◼
  • The same pattern is observed for both BTC and ETH trading volumes.
  • Time series correlations
    In this section we compute and visualize correlations between the time series of a set of cryptocurrencies.

    Getting time series data

    Here are the cryptocurrencies we consider:
    "Cleaning" the data:

    Opening price time series

    Show heat-map plot corresponding to the max-normalized time series with clustering:
    Derive correlation triplets using SpearmanRho :
    Show summary of the correlation triplets:
    Show correlations that too high or too low:
    Cross tabulate the correlation triplets and show the corresponding dataset:
    Cross tabulate the correlation triplets and plot the corresponding matrix with heat-map plot:

    Trading volume time series

    Show heat-map plot corresponding to the max-normalized time series with clustering:
    Derive correlation triplets using SpearmanRho :
    Show summary of the correlation triplets:
    Show correlations that too high or too low:
    Cross tabulate the correlation triplets and show the corresponding dataset:
    Cross tabulate the correlation triplets and plot the corresponding matrix with heat-map plot:

    Observations

    Here are the correlation matrix plots above placed next to each other:
    Generally speaking, the two clustering patterns are different. This is one of the reasons to do the nearest neighbor graph clusterings below.
    Nearest neighbors graphs
    In this section we create nearest neighbor graphs of the correlation matrices computed above and plot clusterings of the nodes.

    Graphs overview

    Here we create the nearest neighbor graphs:
    Here we plot the graphs with clusters:
    Here are the corresponding time series plots for each cluster:
    Other types of analysis
    I investigated the data with several other methods:
    ◼
  • Clustering with different methods and distance functions
  • ◼
  • Clustering after the application of Independent Component Analysis (ICA), [AAw5]
  • ◼
  • Time series analysis with Quantile Regression (QR), [AAw6]
  • None of the outcomes provided some “immediate”, notable insight. The analyses with ICA and QR, though, seem to provide some interesting and fruitful future explorations.
    Load packages
    Definitions
    References

    Articles

    Packages

    Resource functions

    © 2025 Wolfram. All rights reserved.

    • Legal & Privacy Policy
    • Contact Us
    • WolframAlpha.com
    • WolframCloud.com