Crypto-coin correlations over time

2 min read Original article ↗

One of the sensible portfolio-making objectives is to pick a subset of possible assets within which the pair-wise correlations are minimized, similarly to finding an orthogonal basis of a set of vectors in linear algebra. Such portfolio is less risky, because it aims to avoid ‘cascading failures’ where if one asset starts to crash, it shouldn’t pull down the others with it.

To manage such portfolio, one has to track correlations over time. In the charts below I attempted to:

  1. Get the USD<->BTC daily exchange rate history by taking an average of the 4 major exchanges. Get ALTCOIN<->BTC history and then combine the 2 datasets. I used this awesome tutorial as a basis for my notebook.
  2. Plot all cryptocurrencies against USD, to see whether my poloniex.com and Quandl dataset makes sense.
  3. Plot pair-wise correlation matrix for BTC and a few major altcoins.
  4. Plot a 2D embedding of the correlation matrix to see if there are clusters using t-SNE.
  5. Roll a window of 7 days across recent history and calculate the correlation matrix for each window, to see how it evolves over time (tldr: everything is getting more correlated recently).

Plans for future analysis:

  • Add more currencies, say top 100 by the market cap (https://coinmarketcap.com/).
  • Make bigger, interactive charts.
  • Perhaps build a website with a few useful visualizations updated each minute or so.

Let me know on Twitter if you manage to read some insight out of these!

image
image
image
image
image
image
image