Reply

Question about Genetic Build using initial population

12 replies

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

7 years ago #115211

Hi SQ team,

 

If I use SQ to perform a genetic evolution build of strategies, with an initial population == population size, does it ever do anything outside of using the existing entry/exit/stop trailing rules already in the initial population, or does it use any random building blocks selected that aren’t in any of the initial population of strategies?

 

Thanks,

 

Mike

0

Threshold

Customer, bbp_participant, community, 723 replies.

Visit profile

7 years ago #137548

-Mutation = new rules
-Cross over = blending strategies
regardless if you load an initial population or generate one within genetic.

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

7 years ago #137558

-Mutation = new rules
-Cross over = blending strategies
regardless if you load an initial population or generate one within genetic.

 

Okay, thanks, so if I crank up Mutation, it will in all probability use more random building blocks selected.  I will give it a try.

0

Threshold

Customer, bbp_participant, community, 723 replies.

Visit profile

7 years ago #137566

Okay, thanks, so if I crank up Mutation, it will in all probability use more random building blocks selected.  I will give it a try.

Definitely, I use the defaults because I usually spend a lot of time getting a good initial population and look to just blend them and let genetic find the best candidate and essentially optimize it for me through lots of genetic loops, but if you have just an avg or low quality initial population turn mutation up.

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

7 years ago #137571

I’m using it because I have some external data feeds setup in SQ as custom indicators.  I’d like to see if these improve the performance of some existing and good strategies that I have.

 

I can’t use Improve, because there is a long standing bug in SQ, that means custom indicators are never used within Improve, they always generate an error in the SQ log.

 

So I’m hoping that by using mutation SQ will pickup these new custom indicators if they improve the strategies at all.

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

7 years ago #137604

Setting mutation at any level does not seem to introduce and new/random rules into the strategy. 

 

Seems to me it doesn’t work.  Every generation is just a combination of existing rules, no new building blocks are every incorporated into a new generation.

 

Looks like the genetic part of SQ3 doesn’t work as you guys think it does…..

 

@Mark @Thomas

 

Can you confirm that mutation should pull in new rules from selected building blocks, including custom indicators?

0

Threshold

Customer, bbp_participant, community, 723 replies.

Visit profile

7 years ago #137617

Upload the same strategy into initial population 50 times (just clone it in the folder via copy n paste), set initial population to 50, put mutation on 100% and let it run. Any strategies in data bank with altered rules means mutation is working.

Do this with an avg or shitty strategy. If you do it with a good strategy the mutations aren’t going to show up in the databank because they’re being filtered out. Give it time.

 

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #137623

Yes, mutation should work properly. After some time you should see rules altered

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

7 years ago #137624

Okay, I will give it another go and report back.

 

Thanks all.

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

7 years ago #137633

I think there might be a bug in the Genetic Build when using high mutation (100%) and custom indicators.

 

All the strategies generated in Last Generation tab are either using the existing rules or the whole tab list of strategies flickers very quickly, and the strategy source code shows:

IndicatorParameters - indicator parameter names is not the same as number of parameters in constants!   0  1

Nothing is logged in the error log, this appears in the Pseudo Code whilst the strategy names are flashing like crazy in the tab list….

 

 

So it looks to me that custom indicators don’t work in genetic build via mutation…..

0

mm07

Customer, bbp_participant, community, 1 replies.

Visit profile

7 years ago #139951

Could you pls describe me how does selection of individuals work in genetic evolution? I mean which individuals will be picked for mating?
What is the method of selecion parents from which are generated new individuals (offspring)?
 
Thanks for answers.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139961

Hello,

 

members of the population are compared against each other based on their fitness (i.e. Net Profit or any other optimization criteria). The fitter members are selected as “parents” to produce a new member of the population which replaces weaker (less fit) members.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #141519

I just add that selection is done randomly using probability. If the strategy has bigger fitness, it is also more probable that it will be chosen as a parent for a new strategy.

 

 

Mike – thanks for error report. It is possible that there is some bug in Custom indicators used in mutation or evolution. Or maybe the problem is that custom indicator cannot mutate and it just keep on copying the same custom indicator into every strategy.

Mark
StrategyQuant architect

0

Viewing 12 replies - 1 through 12 (of 12 total)