Adding Custom Strategy: Simple RSI BULL/BEAR strategy
Hi, i found a viable Strategy in https://forum.gekko.wizb.it/thread-100-page-1.html is there a way to make it available in Japonicus with basic Python knowledge?
Seems a nice strat. Thanks, we need more of that XD.
They use some strange Tulind indicators there, so we should expect poor EPOCH/second on japonicus.
Name the strat to RSIBULLBEAR.js, place it on gekko, update configStrategies.py, adding following key to cS.:
"RSIBULLBEAR" : {
"BULL_RSI_high": (60,100),
"BULL_RSI_low" = (40,80),
# BEAR
"BEAR_RSI": (8,27),
"BEAR_RSI_high": (35,70),
"BEAR_RSI_low" : (10,30)
}
Then run japonicus with --strat RSIBULLBEARflag.
it still doesn't work. the Erorr message is: `/gekko/core/tulind.js:41 throw tulindError + paramName + ' needs to be a number'; ^ Gekko was unable to configure Tulip Indicators: optInTimePeriod needs to be a number xxx POST /api/backtest 500 699ms -
Error: non-error thrown: Child process has died.`
Sorry, that previous config was lacking:
"RSIBULLBEAR" : {
# SMA Trends
"SMA_long": (700,1400),
"SMA_short": (40,60),
# BULL
"BULL_RSI": (5,18),
"BULL_RSI_high": (60,100),
"BULL_RSI_low" : (40,80),
# BEAR
"BEAR_RSI": (8,27),
"BEAR_RSI_high": (35,70),
"BEAR_RSI_low" : (10,30)
}
Each backtest takes 25s on standard settings on my Athlon 445.
Actually that's a very good strat :D
yes it is a very good strategy :) It has still a weeknes on sideward movements.
It still doesn't work for me.
last part of my stacktrace:
{'BEAR_RSI': 8.0, 'BEAR_RSI_high': 62.4, 'BEAR_RSI_low': 29.4, 'BULL_RSI': 6.04, 'BULL_RSI_high': 76.0, 'BULL_RSI_low': 78.0, 'IDLE_RSI': 13.799999999999999, 'IDLE_RSI_high': 67.2, 'IDLE_RSI_low': 41.0, 'ROC': 6 .08, 'ROC_lvl': 0.0, 'SMA_long': 1162.0, 'SMA_short': 49.2} first unevaluated: 0 0 individues removed due to equality [0] Traceback (most recent call last): File "japonicus.py", line 99, in <module> gekko_generations(TargetParameters, GenerationMethod, EvaluationMode, web=APP) File "/mnt/d/Users/japonicus/evolution_generations.py", line 106, in gekko_generations World.runEPOCH() File "/mnt/d/Users/japonicus/promoterz/sequence/parallel_world.py", line 12, in world_EPOCH LOCALE.run() File "/mnt/d/Users/japonicus/promoterz/locale.py", line 51, in run self.loop(self.World, self) File "/mnt/d/Users/japonicus/promoterz/sequence/standard_loop.py", line 36, in standard_loop assert(len(locale.population)) AssertionError
But i am not sure if we have the same version of the strategy. there is an improvement in https://forum.gekko.wizb.it/thread-100-page-3.html `"RSIBULLBEAR": { # SMA Trends "SMA_long": (700,1400), "SMA_short": (40,60),
# BULL
"BULL_RSI": (5,18),
"BULL_RSI_high": (60,100),
"BULL_RSI_low" : (40,80),
# BEAR
"BEAR_RSI": (8,27),
"BEAR_RSI_high": (35,70),
"BEAR_RSI_low" : (10,30),
#IDLE
"IDLE_RSI": (22, 2),
"IDLE_RSI_high": (75, 55),
"IDLE_RSI_low": (49, 29),
"BEAR_RSI": (25, 5),
"BEAR_RSI_high": (80, 60),
"BEAR_RSI_low": (40, 20),
#ROC
"ROC": (8, 4),
"ROC_lvl": (1, 0)
} `
@nimasTT
There is my original strategy, simply named "RSI BULL/BEAR", and then there are a few modifications of the strategy within that thread.
The one you posted above is a modification done by the user susitronix. The last modification (or test) was done by me and is called RSI BULL/BEAR ADX. That modification adds ADX that measures a trends current strength.
In practice it slighly modifies the RSI levels depending on the ADX values. You can read more about it on the forums and check the insane results i got when testing USDT-ETH (over +90 000% profit @ 1 year 9 months with DEFAULT settings ... lol). It does however not solve the sideways problem, but some tweaking of the values could potentially do that even though i don't think so since at its core this strategy uses moving averages which isn't great for sideways movements (but great to detect when the price really moves = when we really can make a profit).
You can read more about it at the forums.
Please let me know if you get it working using this genetic algorithm. I've been wanting to try it out... but time... :/
i could run your version with genetic algorithm but it ends in error, when using bayesian optimization.
i moved your hard coded params in a toml `SMA_long = 1000 SMA_short = 50
BULL_RSI = 10 BULL_RSI_high = 80 BULL_RSI_low = 60 BEAR_RSI = 15 BEAR_RSI_high = 60 BEAR_RSI_low = 20 ADX = 3 ADX_high = 70 ADX_low = 50`
and then used this configuration in configStrategies.py as Gab0 described
"RSIBULLBEARADX": { # SMA Trends "SMA_long": (700,1400), "SMA_short": (40,60),
# BULL
"BULL_RSI": (5,18),
"BULL_RSI_high": (60,100),
"BULL_RSI_low" : (40,80),
# BEAR
"BEAR_RSI": (8,27),
"BEAR_RSI_high": (35,70),
"BEAR_RSI_low" : (10,30),
#ADX
"ADX": (1,9),
"ADX_high": (50,70),
"ADX_low": (30,70)
}
it crashes after a while:
Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/usr/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "/mnt/d/Users/japonicus/evolution_generations.py", line 39, in bEvaluate DateRange, phenotype, gekkoUrl) File "/mnt/d/Users/japonicus/promoterz/evaluation/gekko.py", line 265, in Evaluate Debug=genconf.gekkoDebug) for DR in DateRange ] File "/mnt/d/Users/japonicus/promoterz/evaluation/gekko.py", line 265, in <listcomp> Debug=genconf.gekkoDebug) for DR in DateRange ] File "/mnt/d/Users/japonicus/promoterz/evaluation/gekko.py", line 108, in runBacktest result = httpPost(url, gekko_config) File "/mnt/d/Users/japonicus/promoterz/evaluation/gekko.py", line 39, in httpPost raise e File "/mnt/d/Users/japonicus/promoterz/evaluation/gekko.py", line 31, in httpPost Response = json.loads(Request.text) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) """
It seems to be a general python error, i can't help with that unfortunately. I think @Gab0 has a better idea.
I never got Bayesian to work realy with my own strategy. It needs more settings in the gekko sample config. What i do is set all debug settings to false and run only 1 backtest otherwise I get a memory error. I'm just running genetic. Started yesterday and have reached almost 100 epochs. Would be my first test to complete. Even with standard settings that's an awesome strat. Testing the original one without adx. That would be my next test.
Just one thing : during the test. The intermediate results don't look that good. What does it mean exactly max min profit is always minus.
i also tried the original algorithm without adx and it works. XD
it works also with bayesian which works faster. Just had to install sudo apt-get install python3.6-tk
The problem seems to relate with adx or too many params
@nimasTT That error seems to be a timeout from Gekko, backtests are taking too long with all those tulind indicators. To proper run that strat on japonicus with no crash, no two-day runs and no too poor jap settings that leads to weak results we should port at least most of those indicators to native gekko. I will try to do it on the following days.
I'm doing some backstests on RSI_BULL_BEAR, as RSI_BULL_BEAR_ADX gives error on my gekko/develop, anyone got that? anyway, with japonicus running on
poloniex | USDT | BTC | 2017-01-01 00:12 to 2017-08-21 08:12
7 months, 2 weeks, 5 days, 6 hours
$japonicus -gc --strat RSI_BULL_BEAR
@ standard settings.
benchmarks on
poloniex | USDT | ETH | 2017-01-12 14:49 to 2017-07-11 20:18
5 months, 4 weeks, 59 minutes
candleSize=15
market profit is 1877%
RSI_BULL_BEAR public TOML settings -> 1156% profit output of EPOCH 20 -> 1766.48597% profit output of EPOCH 40 -> 1766.48597% profit (same settings) output of EPOCH 60 -> 1337.80758% profit (sad) otput of EPOCH 80 -> 1337.80758% (same as last)
result of EPOCH 60 did much better than of EPOCH 40 on the candle data used for evolution, just to remind us of how market-specific a setting set can be XD. Maybe to get a general set of settings we should grab those of early epoches? I will let it run some more and report if something goes interesting.
EDIT: After four hours of runtime it surpassed market profit with 1967.81242% @ epoch 280.
Here is the config:
SMA_long = 992.4242424242425
SMA_short = 43.56060606060606
BULL_RSI_low = 57.27272727272727
BULL_RSI_high = 86.06060606060606
BULL_RSI = 10.606060606060606
BEAR_RSI = 13.75
BEAR_RSI_low = 21.363636363636363
BEAR_RSI_high = 48.86363636363636
Even though the GA had freedom to move those parameters on a 50% range (ie SMA_long could have been 750 to 1250) all the params are very close to the original ones XDD. @tommiehansen how did you came up with those values? Anyway those small variations almost doubled the profit on a blind backtest, which lets me wonder what the hell of technology are we messing around with, those trading bots :c
FINAL EDIT:
# RSI_BULL_BEAR
# 1958.03075% profit on poloniex/ETH @epoch 400
BULL_RSI_high = 86.06060606060606
SMA_long = 992.4242424242425
SMA_short = 44.696969696969695
BULL_RSI_low = 53.18181818181818
BEAR_RSI_low = 21.363636363636363
BEAR_RSI_high = 48.86363636363636
BULL_RSI = 10.606060606060606
BEAR_RSI = 12.727272727272727
nice1 Gab0. i got the ADX to work. but it seems as if it does not give any good results but no errors have to do further testing. will report back
How to fix japonicus and adx strategy? I have errors too. I read somewhere that gekko api have problems with some strategies - nested something I forgot what it was.
@xFFFFF do you also get error on ADX from gekko alone?
@Gab0 I came up with it by studying the candles at 15 min and the output very closely... and of course by running a lot of backtests (and having experience in running such things before).
Those are in fact not the best settings though. The ADX-mod does wonders though, you should get that working.
here is the output of my first epochs. these strats dont seem to work. i tested without adx at first. did not get positive results (or maybe i just misunderstand it) now testing with adx. does not give me errors but strat fails. im at epoch 150 now . failed every time. Tested on gdax EUR/BTC
evaluated parameters ranges: SMA_long (800, 1000) SMA_short (40, 50) BULL_RSI (8, 10) BULL_RSI_high (70, 80) BULL_RSI_low (40, 60) BEAR_RSI (10, 15) BEAR_RSI_high (40, 50) BEAR_RSI_low (15, 20) ADX (2, 4) ADX_high (65, 75) ADX_low (45, 55)
using candlestick dataset 2015-04-23 01:42:00 to 2016-09-17 15:16:00
====== EPOCH 0/400 ======
Locale1 first unevaluated: 30 0 individues removed due to equality [30] EPOCH 0 &30 Maximum profit -8.535 Average profit -16.327 Minimum profit -24.555 Profit variation 4.346 Population size 30 Max population size 30 Avg trade number 82.825 Avg sharpe ratio -0.819
Elder dies 0
Locale2 first unevaluated: 30 0 individues removed due to equality [30] EPOCH 0 &30 Maximum profit -13.918 Average profit -20.412 Minimum profit -29.251 Profit variation 3.912 Population size 30 Max population size 30 Avg trade number 82.058 Avg sharpe ratio -0.954
Elder dies 0
Epoch runs in 1532.81 seconds;
====== EPOCH 1/400 ======
Locale1 first unevaluated: 25 1 individues removed due to equality [24] EPOCH 1 &24 Maximum profit -8.535 Average profit -14.939 Minimum profit -24.268 Profit variation 4.090 Population size 39 Max population size 30 Avg trade number 98.062 Avg sharpe ratio -0.827
Elder dies 0
Locale2 first unevaluated: 17 4 individues removed due to equality [13] EPOCH 1 &13 Maximum profit -13.918 Average profit -19.803 Minimum profit -24.113 Profit variation 2.708 Population size 24 Max population size 30 Avg trade number 87.462 Avg sharpe ratio -0.974
Elder dies 0
Epoch runs in 953.69 seconds;
====== EPOCH 2/400 ======
Locale1 first unevaluated: 12 1 individues removed due to equality [11] EPOCH 2 &11 Maximum profit -8.535 Average profit -13.353 Minimum profit -20.620 Profit variation 2.623 Population size 36 Max population size 30 Avg trade number 96.318 Avg sharpe ratio -0.777
Elder dies 0
Locale2 first unevaluated: 19 2 individues removed due to equality [17] EPOCH 2 &17 Maximum profit -13.918 Average profit -19.907 Minimum profit -27.457 Profit variation 3.038 Population size 26 Max population size 30 Avg trade number 85.559 Avg sharpe ratio -0.992
Elder dies 0
Epoch runs in 730.82 seconds;
====== EPOCH 3/400 ======
Locale1 first unevaluated: 11 0 individues removed due to equality [11] EPOCH 3 &11 Maximum profit -8.535 Average profit -12.803 Minimum profit -20.466 Profit variation 2.635 Population size 40 Max population size 30 Avg trade number 90.114 Avg sharpe ratio -0.774
Elder dies 0
Locale2 first unevaluated: 23 0 individues removed due to equality [23] EPOCH 3 &23 Maximum profit -13.918 Average profit -22.474 Minimum profit -28.292 Profit variation 3.821 Population size 33 Max population size 30 Avg trade number 75.467 Avg sharpe ratio -0.997
Elder dies 0
Epoch runs in 898.36 seconds;
====== EPOCH 4/400 ======
Locale1 first unevaluated: 10 1 individues removed due to equality [9] EPOCH 4 &9 Maximum profit -8.535 Average profit -12.459 Minimum profit -25.302 Profit variation 3.439 Population size 37 Max population size 30 Avg trade number 95.278 Avg sharpe ratio -0.795
Elder dies 0
Locale2 first unevaluated: 23 3 individues removed due to equality [20] EPOCH 4 &20 Maximum profit -13.918 Average profit -21.813 Minimum profit -28.311 Profit variation 3.519 Population size 28 Max population size 30 Avg trade number 74.987 Avg sharpe ratio -0.965
Elder dies 0
Epoch runs in 782.05 seconds;
====== EPOCH 5/400 ======
Locale1 first unevaluated: 7 0 individues removed due to equality [7] EPOCH 5 &7 Maximum profit -8.535 Average profit -12.280 Minimum profit -22.793 Profit variation 2.988 Population size 36 Max population size 30 Avg trade number 100.821 Avg sharpe ratio -0.820
Elder dies 0
Locale2 first unevaluated: 24 4 individues removed due to equality [20] EPOCH 5 &20 Maximum profit -13.469 Average profit -20.554 Minimum profit -24.974 Profit variation 3.409 Population size 34 Max population size 30 Avg trade number 72.075 Avg sharpe ratio -0.925
Elder dies 0
Epoch runs in 814.81 seconds;
====== EPOCH 6/400 ======
Locale1 first unevaluated: 5 1 individues removed due to equality [4] EPOCH 6 &4 Maximum profit -8.535 Average profit -11.361 Minimum profit -16.055 Profit variation 1.619 Population size 36 Max population size 30 Avg trade number 95.125 Avg sharpe ratio -0.802
Elder dies 0
Locale2 first unevaluated: 15 9 individues removed due to equality [6] EPOCH 6 &6 Maximum profit -13.469 Average profit -20.389 Minimum profit -24.344 Profit variation 3.510 Population size 19 Max population size 28 Avg trade number 78.250 Avg sharpe ratio -0.934
Elder dies 0
Epoch runs in 382.18 seconds;
====== EPOCH 7/400 ======
Locale1 first unevaluated: 11 0 individues removed due to equality [11] EPOCH 7 &11 Maximum profit -10.140 Average profit -12.581 Minimum profit -23.785 Profit variation 3.553 Population size 40 Max population size 30 Avg trade number 93.955 Avg sharpe ratio -0.843
Elder dies 0
Locale2 first unevaluated: 14 6 individues removed due to equality [8] EPOCH 7 &8 Maximum profit -13.469 Average profit -20.393 Minimum profit -24.344 Profit variation 3.364 Population size 21 Max population size 28 Avg trade number 76.188 Avg sharpe ratio -0.937
Elder dies 0
Epoch runs in 653.69 seconds;
====== EPOCH 8/400 ======
Locale1 first unevaluated: 10 3 individues removed due to equality [7] EPOCH 8 &7 Maximum profit -10.140 Average profit -12.208 Minimum profit -22.285 Profit variation 3.108 Population size 44 Max population size 41 Avg trade number 92.179 Avg sharpe ratio -0.834
Elder dies 0
Locale2 first unevaluated: 17 5 individues removed due to equality [12] EPOCH 8 &12 Maximum profit -13.469 Average profit -20.607 Minimum profit -27.990 Profit variation 4.340 Population size 20 Max population size 28 Avg trade number 78.896 Avg sharpe ratio -0.962
Elder dies 0
Epoch runs in 693.25 seconds;
====== EPOCH 9/400 ======
Locale1 first unevaluated: 5 0 individues removed due to equality [5] EPOCH 9 &5 Maximum profit -8.535 Average profit -11.708 Minimum profit -20.261 Profit variation 2.223 Population size 48 Max population size 41 Avg trade number 99 Avg sharpe ratio -0.820
Elder dies 0
Locale2 first unevaluated: 27 15 individues removed due to equality [12] EPOCH 9 &12 Maximum profit -13.469 Average profit -19.331 Minimum profit -26.502 Profit variation 4.172 Population size 21 Max population size 28 Avg trade number 75.771 Avg sharpe ratio -0.911
Elder dies 0
Epoch runs in 602.91 seconds; Backend power [36.50104707479477]
====== EPOCH 10/400 ======
Locale1 first unevaluated: 16 3 individues removed due to equality [13] EPOCH 10 &13 Maximum profit -10.140 Average profit -12.974 Minimum profit -24.903 Profit variation 4.770 Population size 41 Max population size 28 Avg trade number 98.654 Avg sharpe ratio -0.867
Elder dies 0
Locale2 first unevaluated: 16 5 individues removed due to equality [11] EPOCH 10 &11 Maximum profit -13.513 Average profit -19.268 Minimum profit -26.996 Profit variation 4.026 Population size 22 Max population size 28 Avg trade number 74.273 Avg sharpe ratio -0.908
Elder dies 0
Epoch runs in 871.50 seconds;
====== EPOCH 11/400 ======
Locale1 first unevaluated: 15 2 individues removed due to equality [13] EPOCH 11 &13 Maximum profit -8.558 Average profit -12.819 Minimum profit -23.333 Profit variation 4.140 Population size 40 Max population size 38 Avg trade number 106.308 Avg sharpe ratio -0.859
Elder dies 0
Locale2 first unevaluated: 18 8 individues removed due to equality [10] EPOCH 11 &10 Maximum profit -13.513 Average profit -20.242 Minimum profit -26.996 Profit variation 4.217 Population size 21 Max population size 28 Avg trade number 79.900 Avg sharpe ratio -0.938
Elder dies 0
Epoch runs in 689.21 seconds;
====== EPOCH 12/400 ======
Locale1 first unevaluated: 13 0 individues removed due to equality [13] EPOCH 12 &13 Maximum profit -10.140 Average profit -12.853 Minimum profit -22.818 Profit variation 3.716 Population size 40 Max population size 26 Avg trade number 95.788 Avg sharpe ratio -0.847
Elder dies 0
Locale2 first unevaluated: 19 10 individues removed due to equality [9] EPOCH 12 &9 Maximum profit -13.513 Average profit -20.337 Minimum profit -28.381 Profit variation 4.462 Population size 18 Max population size 28 Avg trade number 79.639 Avg sharpe ratio -0.946
Elder dies 0
Epoch runs in 660.77 seconds;
====== EPOCH 13/400 ======
Locale1 first unevaluated: 5 0 individues removed due to equality [5] EPOCH 13 &5 Maximum profit -10.140 Average profit -11.856 Minimum profit -17.476 Profit variation 2.229 Population size 38 Max population size 35 Avg trade number 112.350 Avg sharpe ratio -0.837
Elder dies 0
Locale2 first unevaluated: 21 9 individues removed due to equality [12] EPOCH 13 &12 Maximum profit -13.513 Average profit -20.560 Minimum profit -28.381 Profit variation 4.656 Population size 22 Max population size 28 Avg trade number 80.333 Avg sharpe ratio -0.963
Elder dies 0
Epoch runs in 535.95 seconds;
====== EPOCH 14/400 ======
Locale1 first unevaluated: 14 0 individues removed due to equality [14] EPOCH 14 &14 Maximum profit -10.140 Average profit -13.568 Minimum profit -23.929 Profit variation 4.302 Population size 44 Max population size 35 Avg trade number 98.071 Avg sharpe ratio -0.861
Elder dies 0
Locale2 first unevaluated: 18 10 individues removed due to equality [8] EPOCH 14 &8 Maximum profit -13.513 Average profit -19.954 Minimum profit -27.990 Profit variation 4.112 Population size 20 Max population size 28 Avg trade number 82.875 Avg sharpe ratio -0.925
Elder dies 0
Epoch runs in 663.84 seconds;
====== EPOCH 15/400 ======
Locale1 first unevaluated: 17 0 individues removed due to equality [17] EPOCH 15 &17 Maximum profit -8.558 Average profit -13.957 Minimum profit -25.626 Profit variation 4.112 Population size 50 Max population size 35 Avg trade number 94.382 Avg sharpe ratio -0.862
Elder dies 0
Locale2 first unevaluated: 25 9 individues removed due to equality [16] EPOCH 15 &16 Maximum profit -13.513 Average profit -20.110 Minimum profit -27.164 Profit variation 4.054 Population size 25 Max population size 28 Avg trade number 81.109 Avg sharpe ratio -0.943
Elder dies 0
Epoch runs in 1071.86 seconds;
====== EPOCH 16/400 ======
Locale1 first unevaluated: 4 0 individues removed due to equality [4] EPOCH 16 &4 Maximum profit -8.558 Average profit -12.653 Minimum profit -21.576 Profit variation 2.882 Population size 30 Max population size 24 Avg trade number 81.500 Avg sharpe ratio -0.850
Elder dies 0
Locale2 first unevaluated: 21 13 individues removed due to equality [8] EPOCH 16 &8 Maximum profit -13.513 Average profit -19.477 Minimum profit -24.981 Profit variation 3.666 Population size 16 Max population size 28 Avg trade number 79.719 Avg sharpe ratio -0.903
Elder dies 0
Epoch runs in 407.12 seconds;
====== EPOCH 17/400 ======
Locale1 first unevaluated: 6 0 individues removed due to equality [6] EPOCH 17 &6 Maximum profit -10.302 Average profit -13.317 Minimum profit -25.258 Profit variation 3.065 Population size 30 Max population size 24 Avg trade number 109.083 Avg sharpe ratio -0.883
Elder dies 0
Locale2 first unevaluated: 20 13 individues removed due to equality [7] EPOCH 17 &7 Maximum profit -13.513 Average profit -19.848 Minimum profit -27.164 Profit variation 3.686 Population size 18 Max population size 28 Avg trade number 84.821 Avg sharpe ratio -0.926
Elder dies 0
Epoch runs in 551.42 seconds;
====== EPOCH 18/400 ======
Locale1 first unevaluated: 7 2 individues removed due to equality [5] EPOCH 18 &5 Maximum profit -5.798 Average profit -12.407 Minimum profit -19.083 Profit variation 2.580 Population size 26 Max population size 33 Avg trade number 91.650 Avg sharpe ratio -0.850
Elder dies 0
Locale2 first unevaluated: 24 18 individues removed due to equality [6] EPOCH 18 &6 Maximum profit -13.513 Average profit -19.948 Minimum profit -27.164 Profit variation 3.878 Population size 16 Max population size 28 Avg trade number 88.667 Avg sharpe ratio -0.930
Elder dies 0
Epoch runs in 398.51 seconds;
====== EPOCH 19/400 ======
Locale1 first unevaluated: 11 1 individues removed due to equality [10] EPOCH 19 &10 Maximum profit -8.411 Average profit -14.286 Minimum profit -22.678 Profit variation 2.846 Population size 24 Max population size 15 Avg trade number 100.925 Avg sharpe ratio -0.889
Elder dies 0
Locale2 first unevaluated: 17 11 individues removed due to equality [6] EPOCH 19 &6 Maximum profit -13.513 Average profit -20.208 Minimum profit -27.053 Profit variation 3.670 Population size 20 Max population size 28 Avg trade number 87.500 Avg sharpe ratio -0.940
Elder dies 0
Epoch runs in 532.57 seconds; Backend power [40.125022768974304]
Selecting 1+0 individues, random test; 0 selected; 1 selected; Testing monthly profit -25.643 nbTrades: 90.0 Testing monthly profit -11.035 nbTrades: 51.0 Testing monthly profit -9.547 nbTrades: 121.0 Testing monthly profit 1.269 nbTrades: 48.0 Testing monthly profit -17.872 nbTrades: 71.0 Testing monthly profit -7.789 nbTrades: 51.0 Testing monthly profit -11.331 nbTrades: 105.0 Testing monthly profit 18.775 nbTrades: 101.0 Testing monthly profit -17.857 nbTrades: 71.0 Testing monthly profit -6.426 nbTrades: 100.0 Testing monthly profit -14.280 nbTrades: 58.0 Testing monthly profit 16.901 nbTrades: 107.0 Annual profit -62.776% Testing Strategy:
Strategy Fails.
-62.776 final profit ~~~~
-- Settings for Gekko config.js --
{
"ADX": 2.7,
"ADX_high": 71.1,
"ADX_low": 52.6,
"BEAR_RSI": 12.65,
"BEAR_RSI_high": 46.0,
"BEAR_RSI_low": 19.6,
"BULL_RSI": 8.46,
"BULL_RSI_high": 77.6,
"BULL_RSI_low": 58.6,
"SMA_long": 956.0,
"SMA_short": 45.3
}
-- Settings for Gekko --ui webpage --
ADX = 2.7
ADX_high = 71.1
ADX_low = 52.6
BEAR_RSI = 12.65
BEAR_RSI_high = 46.0
BEAR_RSI_low = 19.6
BULL_RSI = 8.46
BULL_RSI_high = 77.6
BULL_RSI_low = 58.6
SMA_long = 956.0
SMA_short = 45.3
Remember to check MAX and MIN values for each parameter.
results may improve with extended ranges.
Selecting 1+0 individues, random test;
0 selected;
1 selected;
Testing monthly profit -39.406 nbTrades: 66.0
Testing monthly profit -4.445 nbTrades: 39.0
Testing monthly profit 0.978 nbTrades: 75.0
Testing monthly profit -0.665 nbTrades: 34.0
Testing monthly profit -14.269 nbTrades: 51.0
Testing monthly profit -7.427 nbTrades: 47.0
Testing monthly profit -2.451 nbTrades: 71.0
Testing monthly profit 24.177 nbTrades: 83.0
Testing monthly profit -15.148 nbTrades: 41.0
Testing monthly profit -0.385 nbTrades: 74.0
Testing monthly profit -8.724 nbTrades: 46.0
Testing monthly profit 21.246 nbTrades: 86.0
Annual profit -47.771%
Testing Strategy:
Strategy Fails.
-47.771 final profit ~~~~ -- Settings for Gekko config.js -- { "ADX": 2.64, "ADX_high": 73.8, "ADX_low": 47.1, "BEAR_RSI": 11.5, "BEAR_RSI_high": 42.8, "BEAR_RSI_low": 18.65, "BULL_RSI": 9.54, "BULL_RSI_high": 79.3, "BULL_RSI_low": 54.6, "SMA_long": 968.0, "SMA_short": 42.9 } -- Settings for Gekko --ui webpage -- ADX = 2.64 ADX_high = 73.8 ADX_low = 47.1 BEAR_RSI = 11.5 BEAR_RSI_high = 42.8 BEAR_RSI_low = 18.65 BULL_RSI = 9.54 BULL_RSI_high = 79.3 BULL_RSI_low = 54.6 SMA_long = 968.0 SMA_short = 42.9
Remember to check MAX and MIN values for each parameter. results may improve with extended ranges.
To fail to such an extent is actually pretty awesome. :)
Below are a couple of sample runs without much modifications from default (BTC-USDT @ Poloniex): https://user-images.githubusercontent.com/8710941/36351647-7828497e-14ad-11e8-9fa2-cf4b81a12cbf.png https://user-images.githubusercontent.com/8710941/36351670-b3f2fbe8-14ad-11e8-8df2-9e994204adcd.png https://user-images.githubusercontent.com/8710941/36351681-dfbe33b4-14ad-11e8-9d0a-b37a3c0022be.png
Do note that this is a custom backtesting screen and that my browser screencap-extension can't get all the Roundtrip results in one screen (because this dataset is from 2015-02 > 2018-02) so much of that is simply cut off.
For these runs i've basically only modified SMA_long and SMA_short and used a candle size of 5 minutes. The rest should be self-explanatory.
lol yeah. i have no idea whats going on. its only when i backtest in japonicus. when i do manual backtests in gekko it works just fine.
That should really be your benchmark because if japonicus is showing A and Gekko backtest B ... well.. then something is obviously screwed up.
yeah . thx for the reply. i use gekkos results as "real" benchmarks and go from there. japonicus should/could just be a tool to finetune besides this. i just dont seem to get it to work properly. sry but im just a bloody noob. i ve learned much in the past weeks so im eager to find out whats going on. i will keep it up.
yeah i have (at least only in gekko) tried it on many different pairs.
its an awesome strat. i have to say that. i have never seen anything like it. its very generous from you tommie to share it with us. i am very thankful for that
Sure you're not running latest version of RBB ADX and then haven't just added the new oarams that exist in the newest version?
yeah thats true. i modified the "intermediate" version and made my own toml file. just saw that in the new version there are even more parameters to set. but on the funny side: just tested my own ADX version with standard params against your updated version with added params (set @ standard) and get the exact same result.
i had many trail and errors when getting everything to work. so i did not do that many japonicus epoch runs (mostly because of finding the best backtesting platform). tried at first with my own botched strat :D and then with your different versions of the Bull_Bear. and i have to say i always seem to have bad results. with all different strat epoch runs. but just to be clear. i read them correctly. those are indeed very bad results i posted !?
You guys should plz read the first lines that japonicus outputs on runtime... Shown profit != backtest profit.
@donkykong017 did you manually set the parameter config ranges on configStrategies.py? Those pranges are not usual, and are capped on upper limits. I had good results with standard parameters and param_spread = 50. Also ./japonicus.py -gc seems better.
@Gab0 Which 'you guys' are you referring to ... ?
thx @Gab0. yeah i know that. just trying to get sense out of the results.
yeah i did. will try again with 50 spread like you did before. also will try -gc.
haa @tommiehansen, its you and @donkykong017 ;}.. japonicus never shows 'B', the result of Gekko backtest. btw nice work on manual optimization of the parameters, the best settings I found were near them on every parameter. I have problems running ADX version. I suspect my proc doesnt handle all those tulind indicators, I will se what I do and hopefully do a GA run on it.
If you have other ideas on strats, please bring 'em, me and fellow contributors can help on implementation/testing.
@Gab0 i guess i got the ADX version to run now. wanted to post before in the same moment japonic stopped with config failure haha :D . now it seems to work. i am in epoch 1 , which for me is a good sign. if its to loaded with parameters or backtests it usually stops in locale 1 epoch 0.
i did change a few things though:
cleared
console.clear
this gave me an error on Win10 bash. obviously a problem on my platform as on the EC2 it worked fine (latest gekko, japonicus)
i had the feeling that there was something with the fact that the strat needs historySize as it says in the log (sry did not look through the strat where it is and how it worked) thought it should work anyways. but i thought the Settings.py need a historySize parameter setting for genetic. i saw for bayesian there is such a setting. so i just wrote in in the genetic settings. have absolutly no idea if that does something.
one thing that became obvious to me: i had to run only 1 parallel backtest at a time. otherwise it would crash for shure. it seems to overload otherwise. even 2 was too much. runnung on my i7 laptop 8gb ram win10 for now (seems to be the best backtesting platform.
running just now with no errors but it seems its destroying all my parameters one after another:
--destroying invalid citizen-- (missing parameter ADX)
...
Thanks for the update @donkykong017. Has there been any progress on the ADX version?