gekkowarez / gekkoga

Genetic Algorithm for solving optimization of trading strategies using Gekko
313 stars 104 forks source link

Questions - Number of Epochs & relaunch of GA session #58

Open Yetzira opened 5 years ago

Yetzira commented 5 years ago

Hi,

  1. Is it possible to evaluate the number of epochs GA will perform ?
  2. Also, when we relaunch a GA session, it uses results/* as basis for its new computations. But is it statefull, I mean will GA be sure to not test again previous epochs ? How ?

Thanks, Yetz

WilbertNL commented 5 years ago

As far as I know:

  1. You will always get an epoch as long as you keep it running. There is no fixed set of maximum epoch to run based on your variables/parameters. After each epoch, GA mutates a couple of "genes", this can/will continue forever. This probably also answers question number 2:

  2. Looking at the json result file I have to say "no". There is no history of the trades, each new epoch is a slightly altered version of the previous one (or actually, I think maybe it's a slightly altered version of the best so far).

I'm not a gekkoga developer but based on my findings, I have to say it works as described above. Anyone is welcome to correct me if I'm wrong of course :-)

Yetzira commented 5 years ago

I (really) quickly looked at the code and could not see any history handling. Therefore, yes, I think nothing will prevent Gekkoga to randomly or after mutation try some combinations it may already have tested; so no convergence path to a final result which could end the loop.

Thanks WilbertNL.