Supports 45 crypto exchanges (see exchanges
command), 20 technical indicators and genetic config generation.
Awesome. Awesome to the max.
- BTC:
1K7Uc9MDzokCGEsUxrQQXn59VQ1Q9AWGvZ
- BCH:
1BHM8oACVN6F4xksXAAP3nR9EoAkfd8sGF
- ETH:
0x8CcA7589d8061ad4D3D913412d1EAD71cbEae081
- LTC:
LRJ4Evzmyynp8Uswiy7e2uWhPKBNiSHroq
You take full responsibility for actions of this bot. Any loss of money, getting banned from an exchange or blocked by ISP are on you.
Please start with running against existing market data first before you use it with a live exchange.
Quickest way is to use Docker (first you need to install it for your operating system):
$ docker run --rm suda/that-guy COMMAND
Gets history data from the exchange for the specified pair and stores in data/EXCHANGE/CURRENCY,CURRENCY/TIMESTAMP_FROM-TIMESTAMP_TO.csv
file.
$ docker run --rm -v ${PWD}:/data suda/that-guy \
backfill <exchange> --days 7 <fsym> <tsym>
Number of days to back fill. Default: 7.
Runs trading settings against backfilled market data.
$ docker run --rm -v ${PWD}:/data suda/that-guy \
backtest <exchange> <fsym> <tsym>
Takes the same arguments as Live Trading except for exchange credentials.
Report will be printed on the stdout
in a key: value
format for easier parseability.
Runs the current settings against live market. This actually creates buy/sell orders.
$ docker run --rm suda/that-guy \
live <exchange> --api-key API_KEY --api-secret API_SECRET <fsym> <tsym>
Specify the id of exchange you want That Guy to trade on. You can see the full list using the exchanges command.
-ak/--api-key
Exchange API key.
-as/--api-secret
Exchange API secret.
-u/--uid
Exchange UID.
-l/--login
Exchange login.
-p/--password
Exchange password.
From currency symbol.
To currency symbol.
Start balance of the first currency/cryptocurrency pair. Defaults to whole balance for this symbol.
Start balance of the second currency/cryptocurrency pair. Defaults to whole balance for this symbol.
Specify how often to make decisions. Default: 15m.
Loss percentage at which to sell. Default: 50.
Profit percentage at which to sell. Default: 50.
Percentage of exchange fees. Default: 0.25.
- CLI:
--adl --adx-period=14 --bb-period=20 --bb-stddev=2
(passing indicator arguments enables it by default) - Environment variables:
THAT_GUY_INDICATORS_ADL
THAT_GUY_INDICATORS_ADX_PERIOD=14
THAT_GUY_INDICATORS_BB_PERIOD=20
THAT_GUY_INDICATORS_BB_STDDEV=2
- YAML:
indicators:
- adl:
- adx:
period=14
- bb:
period=20
stddev=2
Lists all supported exchanges.
List pairs supported by exchange.
All options can be specified in one of the three ways:
- CLI arguments as described above
- Environment variables. Name of the variable will be uppercased, separated with underscores and prefixed with
THAT_GUY
, i.e.--exchange-fees
will beTHAT_GUY_EXCHANGE_FEES
- YAML file passed with
-c/--config
CLI argument
When specifying the YAML file, it must be accessible inside the Docker container. Either by building a custom image based on this one or by mounting it with -v
Docker flag.
List of all available indicators (name, shorthand and default values of arguments):
- Accumulation Distribution Line (ADL)
- Average Directional Index (ADX)
period=14
- Average True Range (ATR)
period=14
- Bollinger Bands (BB)
period=20
stddev=2
- Commodity Channel Index (CCI)
period=14
- Force Index (FI)
period=14
- Know Sure Thing (KST)
period=14
rocper1=10
rocper2=15
rocper3=20
rocper4=30
smrocper1=10
smrocper2=10
smrocper3=10
smrocper4=15
- Moving Average Convergence Divergence (MACD)
fast-period=12
slow-period=26
signal-period=9
- On Balance Volume (OBV)
- Parabolic Stop and Reverse (PSAR)
steps=0.02
max=0.2
- Rate of Change (ROC)
period=14
- Relative Strength Index (RSI)
period=14
- Simple Moving Average (SMA)
short-period=3
long-period=14
- Stochastic Oscillator (KD)
period=14
signal-period=14
- Triple Exponentially Smoothed Average (TRIX)
period=14
- Volume Weighted Average Price (VWAP)
- Exponential Moving Average (EMA)
short-period=3
long-period=14
- Weighted Moving Average (WMA)
period=14
- Wilderβs Smoothing (Smoothed Moving Average, WEMA)
period=14
- WilliamsR (WPR AKA W%R)
period=14
The process of genetic algorithm works as follows:
- Create a handful of random set of indicators to use
- Run That Guy against an archived market data (from the same exchange and currency pair it's intended to be use later)
- Comparing results of the sets and picking the winner
- if That Guy exits with non-zero code ignore this set (it's probably invalid/out of bounds)
- the highest return the bigger change of survival
- Introduce mutation
- from the winners, create another set by randomly changing few arguments
- add some cross breeding by copying parts of winners with other winners?
- If the number of generations is high enough stop and save the config.
GOTO 2
For every generation/set pair, config file is created at reports/:generation/:set_id.yml
as well a summary file in reports/:generation/summary.csv
. Those summaries can be used to visualize how different indicators and their arguments were being used. Useful statistics to pull out of them:
- Return per generation
- Used indicators per generation
- Original strain/family?
This bot is licensed on GNU GPLv3.
ccxt
team for creating this amazing libraryanandanand84
and contributors for comprehensive technical indicators libraryautonio
for building the first usable GUI allowing to create crypto algos and some sensible defaults