crypto-trader

Automating crypto trading with python in a jupyter notebook

MIT License

Stars
40

Mischa's Crypto Trader

Automating crypto trading with python.

What is this?

A jupyter notebook to demonstrate automating crypto trading. Includes defining a strategy with automated parameter tuning and backtesting.

Please read my article describing how it works for more details and how to use it yourself.

How does it work?

Allows you to pick a strategy and optimize the parameters to the trading bot and strategy automatically. Different parameters are tried and net profit calculated during backtesting.

  • Uses pyjuque to perform backtesting and trading and bot framework.
  • Technical analysis performed by ta-lib and pandas-ta - generate buy and sell signals from time series exchange data.
  • Crypto exchange abstraction provided by CCXT - connects to any crypto exchange.
  • Parameter tuning with scikit-optimize - Minimizes objective function in trading bot and strategy parameter space.

How do I test strategies?

Load up the notebook in JupyterLab.

Screenshots

How do I run the bot?

Create a .env file with your exchange API key

EXCHG_API_KEY=daJF91jf9soq01j9wwl
EXCHG_SECRET=8ABC9130181DEB9131
#EXCHG_SUBACCOUNT=trader

Run ./run-bot.py

For more details about building and running the bot see the Dockerfile.