Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/revmischa/crypto-trader
Automating crypto trading with python in a jupyter notebook
https://github.com/revmischa/crypto-trader
bot crypto jupyter notebook trading
Last synced: 1 day ago
JSON representation
Automating crypto trading with python in a jupyter notebook
- Host: GitHub
- URL: https://github.com/revmischa/crypto-trader
- Owner: revmischa
- License: mit
- Created: 2021-09-12T17:22:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-12T14:48:59.000Z (about 3 years ago)
- Last Synced: 2024-10-18T07:54:27.079Z (3 months ago)
- Topics: bot, crypto, jupyter, notebook, trading
- Language: Jupyter Notebook
- Homepage:
- Size: 7.72 MB
- Stars: 40
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://spiegelmock.com/2021/11/09/how-to-trade-crypto-in-your-sleep-with-python/) for more details and how to use it yourself.
## How does it work?
Allows you to [pick a strategy](https://github.com/twopirllc/pandas-ta/blob/main/examples/PandasTA_Strategy_Examples.ipynb) and optimize the parameters to the trading bot and strategy automatically. Different parameters are tried and net profit calculated during backtesting.* Uses [pyjuque](https://github.com/tudorelu/pyjuque) to perform backtesting and trading and bot framework.
* Technical analysis performed by [ta-lib](https://www.ta-lib.org/) and [pandas-ta](https://github.com/twopirllc/pandas-ta/) - generate buy and sell signals from time series exchange data.
* Crypto exchange abstraction provided by [CCXT](https://ccxt.readthedocs.io/en/latest/) - connects to any crypto exchange.
* Parameter tuning with [scikit-optimize](https://scikit-optimize.github.io/) - Minimizes objective function in trading bot and strategy parameter space.## How do I test strategies?
Load up [the notebook](strategize-skopt.ipynb) in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/).## Screenshots
![backtesting](backtest.png)
## How do I run the bot?
Create a .env file with your exchange API key
```env
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.