Giter Site home page Giter Site logo

lele121314 / dtw-cryptocurrencies Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mgarasz/dtw-cryptocurrencies

0.0 1.0 0.0 4 KB

Applied dtaidistance to a set of time-series data (cryptocurrencies), followed by hierarchical clustering (top-down)

Python 100.00%

dtw-cryptocurrencies's Introduction

Dynamic Time Warped crptocurrency series

Applied dtaidistance to a set of time-series data (cryptocurrencies), followed by hierarchical clustering (top-down)

The main premise was to identify group-trajectories (independent of time) in cryptocurrencies; the suspicion was that the largest cluster would consist of alt-coins of dubious quality, and as such, display a momentum pattern reminiscent of a "pump-and-dump".

  • Bitcoin was removed from all analysis, as the premise of this study was to examine alt-coins specifically
  • Date range was 1 year, Nov 2016 to Nov 2017
  • Cryptos delisted in that time range, or facing upcoming delisting were not included in analysis

Process:

  • Fetch JSON cryptocurrency data from Poloniex
  • Reduce dimensionality with pip (perceptually important points) to 100 data points; prices normalized to 0:100 scale
  • Use dynamic time warping as distance metric for clustering

Dendrogram_cryptos

The clustering process identified three clusters among the 54 cryptocurrencies. Further investigation revealed significant variations in average market capitalisation value among clusters. The first cluster, C1 (left) has an average market capitalisation of $3294M USD, followed by $69M USD in the second cluster, C2, and the third cluster (C3) at $1009M USD. Further investigation reveals that C1 contained many high-profile cryptocurrencies, including Ethereum with a current market cap of $44 billion USD. Removing Ethereum from the calculation yields a market cap of $1070M USD, supporting the inference that C2 consists mostly of cryptocurrencies of declining quality. Below are figures describing summarized movements of each cluster shape using DTW averages.

Cluster averages

Comovement pairs

The above plot visualises a clear pattern: DCR precedes LTC’s movements. In contrast, there is no recognizable co-movement relationship between DASH and PPC. These pairs that display sufficient time-lag may lend themselves well to arbitrage strategies. Additionally, and consistent with the findings of Aghabozorgi and Wah Teh (2014), the results have some benefit in risk management in that any dependencies between different cryptocurrencies are uncovered. An investor wishing to diversify her holdings can select cryptocurrencies that are not only uncorrelated, but also show no evidence of co-movement.

However, it is important to consider that pairwise relationships between cryptocurrencies may change over time depending on the time range that these clusters were derived from, in addition to other fundamental factors. To truly assess the robustness of this application, sufficient backtesting will be necessary.

dtw-cryptocurrencies's People

Contributors

mgarasz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.