Gab0 / japonicus

Genetic Algorithm for Gekko Trading Bot.
MIT License
283 stars 103 forks source link

TOML Strategy Parameters #105

Closed jthope closed 6 years ago

jthope commented 6 years ago

Gab0, this is a great feature! However, I am running into a bit of an issue with it and wanted to make you aware. When using the TOML files, I noticed random attempts will miss parameters. Here is the output (see bold text):

` ====== EPOCH 0/800 ====== Locale1 first unevaluated: 30 0 individues removed due to equality [30] 192.168.1.5 - - [15/Mar/2018 17:07:37] "POST /_dash-update-component HTTP/1.1" 200 - 192.168.1.5 - - [15/Mar/2018 17:07:37] "POST /_dash-update-component HTTP/1.1" 200 - 192.168.1.5 - - [15/Mar/2018 17:07:52] "POST /_dash-update-component HTTP/1.1" 200 - 192.168.1.5 - - [15/Mar/2018 17:07:52] "POST /_dash-update-component HTTP/1.1" 200 - EPOCH 0 &30 Maximum profit 36.918 Average profit -51.710
Minimum profit -97.536 Profit variation 35.590 Population size 30 Max population size 30
Avg trade number 354.100 Avg sharpe ratio -0.572

Elder dies 0

Loading Locale2 first unevaluated: 30 0 individues removed due to equality [30] 192.168.1.5 - - [15/Mar/2018 17:08:07] "POST /_dash-update-component HTTP/1.1" 200 - 192.168.1.5 - - [15/Mar/2018 17:08:07] "POST /_dash-update-component HTTP/1.1" 200 - EPOCH 0 &30 Maximum profit 44.133 Average profit -44.277
Minimum profit -97.535 Profit variation 23.976 Population size 30 Max population size 30
Avg trade number 175.100 Avg sharpe ratio -0.383

Elder dies 0

Loading Epoch runs in 45.84 seconds;

======  EPOCH 1/800  ======

Locale1 first unevaluated: 17 13 individues removed due to equality [4] EPOCH 1 &4 Maximum profit 44.133 Average profit 2.726
Minimum profit -95.467 Profit variation 48.705 Population size 17 Max population size 30
Avg trade number 81.250 Avg sharpe ratio -0.571

Elder dies 0

Loading Locale2 first unevaluated: 26 23 individues removed due to equality [3] EPOCH 1 &3 Maximum profit 44.133 Average profit -20.285
Minimum profit -94.632 Profit variation 56.328 Population size 10 Max population size 30
Avg trade number 319.333 Avg sharpe ratio -0.486

Elder dies 0

Loading Epoch runs in 6.99 seconds;

======  EPOCH 2/800  ======

Locale1 first unevaluated: 35 27 individues removed due to equality [8] 192.168.1.5 - - [15/Mar/2018 17:08:22] "POST /_dash-update-component HTTP/1.1" 200 - 192.168.1.5 - - [15/Mar/2018 17:08:22] "POST /_dash-update-component HTTP/1.1" 200 - EPOCH 2 &8 Maximum profit 44.133 Average profit 20.847
Minimum profit -67.885 Profit variation 39.685 Population size 33 Max population size 53
Avg trade number 145.875 Avg sharpe ratio -0.378

Elder dies 0

Loading Locale2 first unevaluated: 23 22 individues removed due to equality [1] EPOCH 2 &1 Maximum profit 44.133 Average profit 12.576
Minimum profit -94.632 Profit variation 50.638 Population size 7 Max population size 30
Avg trade number 48 Avg sharpe ratio -0.394

Elder dies 0

Loading Epoch runs in 9.84 seconds;

======  EPOCH 3/800  ======

Locale1 first unevaluated: 28 26 individues removed due to equality [2] EPOCH 3 &2 Maximum profit 44.133 Average profit 39.091
Minimum profit -30.788 Profit variation 13.467 Population size 30 Max population size 53
Avg trade number 24.500 Avg sharpe ratio -0.349

Elder dies 0

Loading Locale2 first unevaluated: 25 16 individues removed due to equality [9] 192.168.1.5 - - [15/Mar/2018 17:08:37] "POST /_dash-update-component HTTP/1.1" 200 - 192.168.1.5 - - [15/Mar/2018 17:08:37] "POST /_dash-update-component HTTP/1.1" 200 - EPOCH 3 &9 Maximum profit 44.133 Average profit -2.518
Minimum profit -94.632 Profit variation 54.617 Population size 19 Max population size 30
Avg trade number 228 Avg sharpe ratio -0.434

Elder dies 0

Loading Epoch runs in 10.24 seconds;

======  EPOCH 4/800  ======

Locale1 first unevaluated: 25 20 individues removed due to equality [5] EPOCH 4 &5 Maximum profit 44.133 Average profit 31.832
Minimum profit -66.634 Profit variation 29.461 Population size 36 Max population size 53
Avg trade number 132.800 Avg sharpe ratio -0.344

Elder dies 0

Loading Locale2 --destroying invalid citizen-- (missing parameter BULL_MOD_high)

first unevaluated: 18 16 individues removed due to equality [2] EPOCH 4 &2 Maximum profit 44.133 Average profit 42.524
Minimum profit 34.440 Profit variation 3.258
Population size 15 Max population size 30
Avg trade number 64 Avg sharpe ratio -0.326

Elder dies 0

Loading Epoch runs in 6.62 seconds;

======  EPOCH 5/800  ======

Locale1 --destroying invalid citizen-- (missing parameter BULL_RSI)

first unevaluated: 20 17 individues removed due to equality [3] EPOCH 5 &3 Maximum profit 44.133 Average profit 37.896
Minimum profit -40.354 Profit variation 18.408 Population size 37 Max population size 53
Avg trade number 36 Avg sharpe ratio -0.338

Elder dies 0

Loading Locale2 first unevaluated: 16 9 individues removed due to equality [7] 192.168.1.5 - - [15/Mar/2018 17:08:52] "POST /_dash-update-component HTTP/1.1" 200 - 192.168.1.5 - - [15/Mar/2018 17:08:52] "POST /_dash-update-component HTTP/1.1" 200 - EPOCH 5 &7 Maximum profit 44.133 Average profit 20.786
Minimum profit -65.821 Profit variation 41.685 Population size 27 Max population size 30
Avg trade number 150 Avg sharpe ratio -0.343

Elder dies 0

Loading Epoch runs in 9.51 seconds;

======  EPOCH 6/800  ======

Locale1 first unevaluated: 18 15 individues removed due to equality [3] EPOCH 6 &3 Maximum profit 44.133 Average profit 38.965
Minimum profit -93.907 Profit variation 21.246 Population size 41 Max population size 53
Avg trade number 423.333 Avg sharpe ratio -0.359

Elder dies 0 `

The parameters exist in the TOML and runs successfully on some, and fails on others. Any idea why this would happen?

Gab0 commented 6 years ago

Hey, I guess this error is independent of TOML files else every backtest would fail (TOML files are read once per jap execution), also guess you are running -gc on a strategy with like 10 parameters. If thats it, that happens due a to bug on -gc representation model. I'm trying to fix it on a constructive way... although it does not cause big losses :)