This project explains how to compute price correlations between different cryptocurrencies in Python based on price history files of cryptocurrencies of interest.
- Download
virtualenvif you do not alread have it
pip install virtualenv- Create virtual environment in your folder of interest
virtualenv crypto-correlations- Activate the virtual environment
source crypto-correlations/bin/activate- Install the libraries of interest in the virtual environment based on the
requirements.txtfile
pip install -r requirements.txtsource crypto-correlations/bin/activateEach cryptocurrency history data file should be stored in the folder crypto_history. The price correlation script
price_correlations.py will extract the history data based on the following format:
price volume time buy/sell market/limit miscellaneous Since
1.114431 18.07332223 1606777316.4328 b l 1606777200.0
1.121256 17.96331051 1606777381.7706 b l 1606777200.0
1.125000 998.40255591 1606777840.5439 b m 1606777200.0
...
The input file crypto_history/LSKEUR_close_price.txt was provided as an example. In case you want to use a different
format, make sure to modify the function extract_mean_price_ph in the script price_correlation.py. My cryptocurrency
price history extraction workflow can be found in my repository crypto-history-extraction.
The start date and end date timestamps should be defined in config.txt (please refer to the file for more details
regarding the format). The graph first start and second start dates, which are simply two different time frames for
the graphs should be defined in this same configuration file. A large list of cryptocurrency symbols should be defined
in this same configuration file to compute large correlations. A short list of cryptocurrency symbols should be defined
in this same configuration file.
Once the input price history files and the configuration file are ready, the following command will compute the correlations:
python3 price_correlation.pyThere seems to be an issue with the significance symbol association on the plots.
- Start Date: November 27, 2020
- Completion Date: November 28, 2020
- Maintenance status: Inactive


