Skip to content

Jupyter Notebook with a Crypto-currency Historical Data generator

License

Notifications You must be signed in to change notification settings

elbernaderen/jupyter_analysis

Repository files navigation

BTCUSDT_ADAUSDT_XMRUSDT_ETHUSDT_BNBUSDT_30m_hour_day.ipynb

This is the Jupyter Notebook that can be edited, and allow us to see if there exist a correlation in between the technical indicators, like:

macd
macd histogram
macd signal
RSI
media

and the increments of the close values of the next candles. With this notebook, it is easy to interpretate the information using Pandas and Numpy, so then we can edit amplitudes.py following our results and results.

Must install

jupyter notebook and pandas, numpy and scipy libraries are used to work with data frames and lists. sklearn is a library used to create and train the machine learning model. Seaborn is used to make graphs.

analysis.py

Edit a Crypto-currency Historical Data and add some technicals indicators so the Data can be analized with a jupyter notebook.

Must install

pandas, numpy and scipy libraries are used to work with data frames and lists.

Usage

Once we have downloaded the Cryptocurrency Historical Data (one or more) with the same interval in the same directory of the program, we call the program with the Crypto-currency as command line arguments in capital letters as:

py amplitudes_rsi_vol_rsi.py BTCUSDT ETHUSDT ADAUSDT

Then, the program will ask the next variables:

Enter the number of candels (Y) to consider in the model for the prediction:

The increment before mentionated has to be between the Y candels

Enter the number of candels (X) considered in the model for the prediction:

These will be the candels we use to predict

Enter the amount of periods for rsi calculation (14 recomended):

A period for rsi calculation can be better for a candle interval analysis, and not for other one, so, it can be modificated if want it

Enter the interval to consider, ex: 1d or 1h or 30m or 15m or 5m 

The interval of the Crypto-currency Historical Data to consider.

Enter how many candels consider to calculate the volume mean:

To calculate the mean volume,so it can know if the volume has a increment or in other words if there are big participants, ex: 300. Once the program have finished, a classification report will be printed in console, with the accuracy, precission, etc of the model, and a .csv file with all the historical data ready to use with the Jupyter Notebook.

bina.py

Description

This script contains store_ohlcv function, that is used to download the Crypto-currency Historical Data.

Must install

Binance library to download Crypto-currency Historical Data and pandas to work with data frames. Also need yaml to save and read the api data in a yml file.

Usage:

To use it, we need to have a Binance account. If you don't have one, can create a account following this and by doing that will be my refered and also colaborate with this project. Once that you have an account, you need to generate an API, as follows. Then, have to set the API_key and the API_ secret in the config yml file located in the ignore folder.

call_bina.py

Interface to download the Crypto-currency Historical Data to use them as base for analysis.py .

Description

This script calls the function store_ohlcv from bina.py, that is used to download the Crypto-currency Historical Data, setting the name of the Crypto-currency in capital letters, name of the file that will be created, year, month and day since when take in count.

Usage:

To download a Crypto-currency Historical Data for amplitudes.py and a Crypto-currency, for example ETHUSDT since a determinated date, must be called the program in console as continue:

py call_bina.py ETHUSDT base 2019 1 1

To download a Crypto-currency Historical Data for analysis.py and a Crypto-currency, for example BTCUSDT since a determinated date, must be called the program in console as continue:

py call_bina.py BTCUSDT backtest 2022 3 5

References:

license:

MIT Bernardo Derendinger