Gatsiva + Python: Visualizing Bitcoin Corrections

Gatsiva
Gatsiva
Jan 10, 2018 · 1 min read

We’ve been watching the recent three day correction of Bitcoin and reading the boards. There is a lot of fear and doubt, but raw numbers don’t lie.

There’s also a good argument in that one of the best ways to trade an emotional market like cryptocurrencies is to look at the price action. Price reflect attitudes.

We wondered ourselves today if we could use our own Gatsiva API to quickly look at the returns after various correction levels for Bitcoin. While producing this visualization for Twitter, we thought we might want to explain how we did it.

What follows is a quick walkthrough of how to look at the correction points for Bitcoin using Python and the Gatsiva API.

Using Python, we decided to use the Gatsiva return profile API call. This call gives us the returns by period after a condition is true. First we imported a bunch of libraries we will need.

We set up our input data, including an iterator to create range of thresholds we were interested in using numpy.

Next we iterated over our values, dynamically constructing a rule to evaluate and putting the results in our list.

Then, utilizing Plot.ly to render the visualization, we add a color scale, create the plots with the appropriate legends, then plot the result.

Voila!

To see the full code, visit our repository on Github. To learn more about Gatsiva visit gatsiva.com.

Gatsiva

Written by

Gatsiva

Gatsiva provides models, genetic algorithms, and dashboards that provide insights to empower cryptocurrency analysts and traders.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade