Understanding of the Generic Algo

Created at 24 Feb 2019, 03:36
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TradeMingZhi's avatar

TradeMingZhi

Joined 05.02.2019

Understanding of the Generic Algo
24 Feb 2019, 03:36


Hey!,

I would like to find out if there is a way for me to edit how the evoluation processes work / understand them.

I have a bot ready that possibly has everything to be profitable, but as it has so many parameters, the Grid search would take over 900000 days, Algo test stops after 20 mins to 1 hour.

Ideally it would be good to have a sim running on top 10 fitness bots infinately till stopped. (Trying to find better settings).

I do have GetFitnessMethod ready aswell. I just don't get why it stops when there is still room for improvement.


@TradeMingZhi
Replies

TradeMingZhi
24 Feb 2019, 16:24

My question is do bots improve mid test? or they must finish the whole backtest to then try to improve their scores?

I couldnt find any articles about Generic algorythim, only the basic stuff that is avilable in the UI, but nothing about coding aspects of it.


@TradeMingZhi

TradeMingZhi
24 Feb 2019, 16:27

I would want to kill certain bots that do certain things, mid way while testing, but all that would do is kill of the genetic evolution and whole optimisation test will stop very soon.

by just using Stop();


@TradeMingZhi

TradeMingZhi
24 Feb 2019, 16:38

for example bots that did no trades in first 5 days i could kill, that would speed up things insanely.


@TradeMingZhi

bart1
25 Feb 2019, 10:56

You can try to tweak your fitness function. Genetic optimization stops when there are no improvements after several iterations (fitness function return the same result). Which means you stuck at the local maximum.

Ideally it would be good to have a sim running on top 10 fitness bots infinately till stopped. (Trying to find better settings).

Don't do this, you will quickly find a local maximum without exploring other possibly more profitable areas.

 

 

Here is a very good video lecture from MIT about Genetic Algorithms.
https://www.youtube.com/watch?v=kHyNqSnzP8Y

Besides explaining how GA works, it shows simple examples of how you can stuck on a local maximum without exploring the whole area of possible outcomes.
 

Regards,
Bart


@bart1

TradeMingZhi
27 Feb 2019, 01:51

RE:

bart1 said:

You can try to tweak your fitness function. Genetic optimization stops when there are no improvements after several iterations (fitness function return the same result). Which means you stuck at the local maximum.

Ideally it would be good to have a sim running on top 10 fitness bots infinately till stopped. (Trying to find better settings).

Don't do this, you will quickly find a local maximum without exploring other possibly more profitable areas.

 

 

Here is a very good video lecture from MIT about Genetic Algorithms.
https://www.youtube.com/watch?v=kHyNqSnzP8Y

Besides explaining how GA works, it shows simple examples of how you can stuck on a local maximum without exploring the whole area of possible outcomes.
 

Regards,
Bart

Thanks the video seemed helpful!


@TradeMingZhi