Test bitcoin trading strategies using Backtrader framework (see https://backtrader.com).
Current implementation contains simple MACD based strategy (see MACDStrategy.py).
-
Python 3.6+: https://www.python.org/downloads/
-
Backtrader module:
pip install backtrader -
Matplotlib module:
pip install matplotlibNote: On Ubuntu 18 you might need:
sudo apt-get install -y python-matplotlib sudo apt-get install -y python3-matplotlib
Execute this command:
python Main.py
btc-eur-history.csv: CSV file which contains BTC to EUR data since 2011-08-27 until 2020-01-13 (on daily basis).
-
FetchHistoricalData.py: Script which fetches historical data and updatesdata/btc-eur-history.csvfile. Data are fetched from:https://min-api.cryptocompare.com/data/v2/histoday?fsym=BTC&tsym=EUR&allData=true