/Live_Analysis_Bitcoin_Price

Live analysis of the Bitcoin's price from different exchanges with asynchronous python programmation and cython

Primary LanguagePython

Live analysis of Bitcoin price from Bitfinex, OKEx, Binance and Poloniex


Description:

This is a class project where I used asynchronous programmation to download data and analyse it in the same time, and I used cython to speed-up the analysis. I also used my own econometric tools, they are surely not the best ones, but I kept control over them.

When Price_Analysis.py or Return_Analysis.py is run a screen split into four appears. At the top left there is the graph of the price (or return) of Bitcoin in USD for each exchange, at the top right and at down left there are respectively drawing the autocorrelogram and the kernel density function. And at the down right there are some statistics and the estimation of the best order ARMA(p,q). Analysis and graphs are continuously updated as shown in the GIF below.

Short demo:

Contents:

  • Price_Analysis.py is the main script for analyse the raw price of bitcoin in US dollar.
  • Return_Analysis.py is the main script for analyse the first difference of the price of bitcoin in US dollar.
  • websocket_API_data.py some classes to download ticker data from websockets API.
  • econometric_tools.py contain some statistic, econometric or optimization tools.
  • script_cython.pyx are some cython loops faster than python code.
  • setup.py is a script to compile the cython code in C.

Installation:

If you clone the scripts and try to run it, you will have to compile the cython code before. Go in the folder containing the scripts, and from the command line:

$ python setup.py build_ext --inplace