Caterina, named after my niece, was a project to collect data about events related to cryptocurrencies and their price fluctuation. Then maybe I could find some reproducible patterns to reliably predict it and short or long it. I wanted to identify a function such that
F(cryptocurrency, event category) => (price variation around the event, confidence)
For example, F(ETH, community event) => (+10%, 90%).
Beside getting rich, this project combined three goals:
I wrote a lot about this project, the full writeup is accessible here. I also toured with a talk about this project, called ‘Tame Crypto Events With Streaming’, recording here.
As a brief recap, I didn’t get any richer 😅
I enjoyed very much doing things the right way, starting with proper modeling of the problem space using Event Storming:
Next,
The logical steps from bounded contexts to streaming are shown in this image, and a little code is below:
The top stream (the one just below the ‘CRYPTO EVENTS FLOW’ in the image above) looked like this:
Source
// emits a GiveToken object once a day
.tick(0.seconds, 1.day, GiveToken)
// asks the Token Actor the auth token, is received as a string
.mapAsync(1)(msg => (tokenActor ? msg) (3.seconds).mapTo[String])
// passes it to the event request flow, implmented separately
.via(eventRequestFlow)
// unmarshal the results and maps it to my internal CoinEvent object
.map(eventListUnmarshaller)
.map(_.flatMap(EventAPI.toCoinEvents))
// publishes the result on Google Pub/Sub, implemented separately with Alpakka
.via(eventPubSubFlow)
// forwards the event list to the Coin Actor
.runForeach(ev => coinActor ! ev)
After a few months of data collection, it was time to perform some data analysis; you can read the outcome of it here, with lots of colored graphs.
For instance, a promising first observation that the mean price of a coin in the two days after the event went up in almost all cases:
One issue is the extreme volatility of cryptocurrencies. For example here is the price fluctuation of ETH around an ETH conference in November 2018:
Ideally, you want to buy and sell as per the green line, and avoid the red operation. If you are curious, read more of my conclusions!
All in all, this project was a super learning experience, touching a data project from A to Z and gave me a chance to speak at lots of different conferences.
All Tags |
The Netherlands |
61
|
amsterdam |
35
|
bicycle |
21
|
Chile |
18
|
Valparaiso |
15
|
Australia |
13
|
Art |
12
|
nepal |
8
|
scala |
8
|
akka |
6
|
Santiago |
5
|
community |
4
|
France |
4
|
Gouda |
4
|
Paris |
4
|
akka-stream |
3
|
akka-streams |
3
|
dashain |
3
|
everest trek |
3
|
india |
3
|
Italy |
3
|
Melbourne |
3
|
Perth |
3
|
Road trip |
3
|
Rotterdam |
3
|
akka-http |
2
|
Argentina |
2
|
bicycle touring |
2
|
code |
2
|
custom_image |
2
|
custom_summary |
2
|
Delft |
2
|
event-sourcing |
2
|
Geraldton |
2
|
Haarlem |
2
|
leaf_bundle |
2
|
Lille |
2
|
Milan |
2
|
New Delhi |
2
|
New York |
2
|
Punta Arenas |
2
|
Rome |
2
|
Ushuaia |
2
|
Websocket |
2
|
Abcoude |
1
|
akka-cluster |
1
|
amazon web services |
1
|
android |
1
|
aws |
1
|
Berlin |
1
|
Bloemendaal |
1
|
Brisbane |
1
|
chitwan |
1
|
Circus Maximum |
1
|
covid19 |
1
|
deep learning |
1
|
distributed systems |
1
|
Enkhuizen |
1
|
Esperance |
1
|
expats |
1
|
fans club |
1
|
Fraser Island |
1
|
gps |
1
|
gpx |
1
|
guitars |
1
|
iot |
1
|
Isla Negra |
1
|
japan |
1
|
java |
1
|
Kalgoorlie |
1
|
kathmandu |
1
|
Las Vegas |
1
|
litfiba |
1
|
LoPy |
1
|
lora |
1
|
Markem |
1
|
Matisse |
1
|
Mexico |
1
|
Middelburg |
1
|
misc |
1
|
Muiden |
1
|
neural networks |
1
|
planning |
1
|
play |
1
|
reactive |
1
|
reactjs |
1
|
refluxjs |
1
|
Reims |
1
|
San Francisco |
1
|
Sodaq |
1
|
Sydney |
1
|
Texel |
1
|
Theo Van Doesburg |
1
|
tokyo |
1
|
Travel |
1
|
tulips |
1
|
USA |
1
|
webjars |
1
|
Weesp |
1
|