Gab0 / japonicus

Genetic Algorithm for Gekko Trading Bot.
MIT License
284 stars 102 forks source link

[Community Request] Test Run #96

Closed Gab0 closed 6 years ago

Gab0 commented 6 years ago

Cheers! Can anyone with a good rig run this bash script of japonicus runs, then share related logs? That would have practical purposes on finding good params, also would help me on tweaking genetic algorithm evolutionary parameters. Of course theres a chance of crashing, so share tracebacks in case XD Thanks!

#!/bin/bash
#japonicus_run.sh

python3 japonicus.py -gc --strat RSI_BULL_BEAR_ADX --deltaDays 20 --candleSize 10
python3 japonicus.py -gc --strat RSI_BULL_BEAR_ADX --deltaDays 60 --candleSize 10
python3 japonicus.py -gc --strat RSI_BULL_BEAR_ADX --deltaDays 20 --candleSize 5
python3 japonicus.py -gc --strat RSI_BULL_BEAR_ADX --deltaDays 60 --candleSize 5
Resources:
strategy: https://github.com/Gab0/gekko-adapted-strategies.git
indicators: https://github.com/Gab0/gekko-extra-indicators.git
candles: https://github.com/Gab0/gekko-candlesticks.git
jthope commented 6 years ago

Gab0, I am running backtests right now using the latest code (and modified strats/indicators). However, I am using mongodb as my database, are you expecting results based on the data from the candle repos you provided?

Also, is the --candleSize param working in the latest version? settings.py appears to have a hardcoded value. Setting each test manually in settings.py and running them individually for now.

Gab0 commented 6 years ago

hey, no... the database provided is optional, any db does good. It's really hardcoded? Oh no dam bugs I'm checking this later, if it is h.c. I'l commit the fix. Thanks! go backtesting ^^ cheers

jthope commented 6 years ago

python3 japonicus.py -gc --strat RSI_BULL_BEAR_ADX --deltaDays 20 --candleSize 5 RSI_BULL_BEAR_ADX-binance-USDT-BTC-146035.log

python3 japonicus.py -gc --strat RSI_BULL_BEAR_ADX --deltaDays 60 --candleSize 5 RSI_BULL_BEAR_ADX-binance-USDT-BTC-236141.log

python3 japonicus.py -gc --strat RSI_BULL_BEAR_ADX --deltaDays 20 --candleSize 10 RSI_BULL_BEAR_ADX-binance-USDT-BTC-833134.log

python3 japonicus.py -gc --strat RSI_BULL_BEAR_ADX --deltaDays 60 --candleSize 10 RSI_BULL_BEAR_ADX-binance-USDT-BTC-211091.log

Question about the log file -- do I select the last one, or scan through the set for the best profit? With the last one selected, the backtest from Gekko provided a +20.78%, where the overall market was -17%. Not bad results, but the output says Annual profit of 136.4% -- which I assume is a prediction based on the output of the 2 months of data the backtest ran on?

@Gab0 - Update, best result so far (last run still in progress) image

BEAR_RSI = 11.863636363636363 BULL_RSI_high = 93.81818181818181 SMA_long = 900.0 BEAR_RSI_high = 49.54545454545455 ADX_low = 54.54545454545455 BULL_RSI = 9.90909090909091 SMA_short = 40.0 ADX = 3.4636363636363634 BULL_RSI_low = 66.0 BEAR_RSI_low = 24.18181818181818 ADX_high = 70.63636363636364

BradT7 commented 6 years ago

I’m currently running these tests for you as well. Does -gc differ from -g in that you can pass it custom variables? If so this is excellent, and handles one of the features requested too. Thanks a lot! It looks like it ignores the settings.py variable, and overrides it with the one passed, while pulling in all the other variables not defined. I'll know after this second run is finished, and therefore no apparent bug.

Gab0 commented 6 years ago

@jthope thanks. Annual profit is 12 random deltaDays periods backtested in sequence. Thats good results... may even try it on real trading.

@BradT7 -gc is a GA representation mode that is more complex than -g... custom variables works the same for both. So we pray for no bugs XD