Internet-Defense-League

2019-01-20

Intrinsic time for cryptocurrency data

This week, I attended a three-day hacking event of the Crypto Traders Berlin Meetup group.

The aim was to find relationships between sentiment data of bitcointalk and twitter and the price of crypto currencies. In practise, it turns out to be not that easy. For starters, it is not easy to determine if the social media discussion spikes up after a significant price change or the other way round.

During this meetup series, I explored the concept of "intrinsic time", as proposed by a team at the University of Essex. The idea is to summarize price data not by fixed intervals, but by directional changes in the price. This, they argue, has the advantage of covering more extreme points of the price data (a longer coast line). Also, some empirical scaling laws emerge when looking at the data this way.

The R code I came up with can be found here at pastebin, and here is a chart showing the output:


There is still a lot to explore, for instance if the cryptocurrency price do follow some empirical scaling laws and identify market regimes based on this kind of summary, but it was a good start.

Being a trading rooky, it was also interesting to learn some ideas, like the maker-taker model and the metapher of "surfing the waves" for trend following.

It was a friendly meetup with interesting people to get acquainted with, I recommend this meetup if you are in the area and interested in this topic. Thanks to the organizers and sponsor, as well!

EDIT 27. Jan. 2019: there was an error in the code at pastebin. This is now fixed I think. However, when processing real tick data, the code seems to be too slow. Also, for tick data, a smaller threshold is recommened (such as 0.02% or 0.1%). A sample of tick data can be found here. I will look for a faster solution, maybe using sql or a better vectorized version.