(C) 2021 Mark M. Bailey, PhD
Pi Trader is a cryptocurrency trading bot for Raspberry Pi. This script instantiates a Raspberry Pi trading bot that interfaces with the Coinbase Pro API. First, it optimizes a trading strategy by backtesting against historic data from the Coinbase exchange. The strategy is based on buy/risk parameters defined as multiples of the Exponential Average True Range (eATR). OHLC data are refreshed each iteration, and a buy/sell signal is calculated and executed if appropriate. For buy signals, the maximum possible number of coins are purchased (with a user-specified fiat buffer preserved). For sell signals, all coins are exchanged for fiat. Strategy is re-optimized at user-defined intervals.
This is what I would consider to be a "dumb" trading strategy based solely on price deviations from an indicator. I am curious about exploring machine learning solutions for trading strategy optimization. Future iterations of this project may include that as an option.
Note that this is an experimental bot, and like all trading strategies, I can not guarantee that it will be profitable if implemented.
If anyone is interested in making this project better, I'd be happy to collaborate.
git clone https://github.com/metalcorebear/Pi-Trader.git
.sudo ./setup.sh
to set up the virtual environment.API Key parameters for Coinbase Pro.
Other bot parameters:
./run.sh