biases caused by genetic optimizer, please give an option to turn it off and either do exhaustive or just make random optimization similar to MonteCarlo

-Sometimes an exhaustive search is preferable during an optimization.

-In the WF there is a potential look-ahead bias:
sim/sim mode will use the whole sample at once for an initial optimization. The genetics kicks in on the whole sample causing more iterations to converge around the higher fitness iterations on the whole sample. So when the best settings are chosen for a specific segment it is more likely to choose one that works well OOS as there will be more of those to choose from. This could be a small look-ahead bias but it exists and is not good. 

-In the SPP study there is a similar bias:
The genetics kick in around the higher fitness and so we have more of the higher fitness iterations than we would if it was just random or exhaustive so stats such as % profitable iterations etc will be overrepresented. 

If we could turn off genetics for the optimizer then the distribution could be exhaustion (run every single possibility) or random (similar to Monte-Carlo) instead of skewed towards what works well on the whole sample so that would be nice to alleviate these biases. Even if you finally add the exact/exact function (EDIT: it appears SQX team finally added exact/exact) of WF, this feature would still be nice so we can run sim/sim without bias and save cpu.

 EDIT: can we also have this option for Seq Opt and all forms of optimizations too  if needed?

EDIT: It just occurred to me that some people will want to run optimizations or SPP to absolute exhaustion. So, when turning off genetics, could we please choose between attempting to run every single combination once (exhaustion) as well as being able to make it jump around randomly like monte-carlo? Or perhaps it could even be automatic for instance if max optimizations is set for 1000 and genetics is turned off and the total possible combos are only 500 then of course just do an exhaustive search but if total possible combos are 2000 and maz optimizations are set for 1000 then use montecarlo style.

On a side note, It turns out that even searching a 4x4 area with only 16 combos in an SPP will give a different random result every time. Running a search to exhaustion means we can reproduce the same results instead of being random every time.
Attachments
No attachments
  • Votes +16
  • Project StrategyQuant X
  • Type Feature
  • Status In progress
  • Priority High

History

b
#1

bentra

16.01.2022 13:26

Task created

b
#2

bentra

16.01.2022 13:29
Voted for this task.
IH
#3

clonex / Ivan Hudec

16.01.2022 16:20
Voted for this task.
AS
#4

ali.senobary

16.01.2022 17:07
Voted for this task.
JJ
#5

jjsb41

16.01.2022 17:13
Voted for this task.
o
#6

Enric

16.01.2022 17:47
Voted for this task.
JH
#7

Jabezz

17.01.2022 02:36
Voted for this task.
E
#8

Emmanuel

29.01.2022 14:52
Voted for this task.
KB
#9

kbtech

17.02.2022 02:41
Voted for this task.
m
#10

mabi

17.02.2022 14:21
Voted for this task.
CG
#11

Chris G

16.04.2022 18:26
Voted for this task.
IN
#12

altenburg90

18.04.2022 02:03
Voted for this task.
l
#13

Loonly

13.06.2022 11:19
Voted for this task.
JB
#14

0xjoeblack@proton.me

18.11.2022 15:20
Voted for this task.
k
#15

Karish

18.11.2022 21:21
Voted for this task.
b
#16

bentra

06.12.2022 21:47

Description changed:

In the WF there is a potential look-ahead bias:
sim/sim mode will use the whole sample at once for an initial optimization. The genetics kicks in on the whole sample causing more iterations to converge around the higher fitness iterations on the whole sample. So when the best settings are chosen for a specific segment it is more likely to choose one that works well OOS as there will be more of those to choose from. This could be a small look-ahead bias but it exists and is not good. 

In the SPP study there is a similar bias:
The genetics kick in around the higher fitness and so we have more of the higher fitness iterations than we would if it was just random or exhaustive so stats such as % profitable iterations etc will be overrepresented. 

If we could turn off genetics for the optimizer then the distribution would be random similar to Monte-Carlo instead of skewed towards what works well on the whole sample so that would be nice to alleviate these biases. Even if you finally add the exact/exact function (EDIT: it appears SQX team finally added exact/exact) of WF, this feature would still be nice so we can run sim/sim without bias and save cpu.

 EDIT: can we also have this option for Seq Opt too if needed?

EDIT: It just occurred to me that some people will want to run large (1000+) optimizations to absolute exhaustion. So, when turning off genetics, could we please choose between attempting to run every single combination once (exhaustion) as well as being able to make it jump around randomly like montecarlo? Or perhaps it could even be automatic for instance if max optimizations is set for 1000 and genetics is turned off and the total possible combos are only 500 then of course just do an exhaustive search but if total possible combos are 2000 then use montecarlo style.

w
#17

wiraputu

06.12.2022 21:52
Voted for this task.
b
#18

bentra

25.12.2022 00:32
It turns out that even searching a 4x4 area with only 16 combos in an SPP will give a different random result every time so turning off genetics is preferable here so we can reproduce the test exactly as before by doing an exhaustive search. There is no reason not to try all the combos if there are only 16 possibilities!
k
#19

Karish

25.12.2022 13:53

This must be fixed..

MF
#20

Mark Fric

01.03.2023 11:36

Status changed from New to In progress

Priority changed from Normal to High


You are able to select max optimizations limit to up to 10.000.000 for all WF and optimization crosschecks, as well as in Optimizer. This is the way how to "turn" genetics off.

If the max optimizations limit is set to 10.000.000 it will use brute force if the total number of combinations is smaller than this.


But 10.000.000 optimizations is extreme number, if your strategy has that many combinations you'd wait for days to finish optimization of one such strategy using brute force.


If your strategy has "normal" number of parameters and optimizations then this is the way how to make it use brute force.




> It turns out that even searching a 4x4 area with only 16 combos in an SPP will give a different random result every time so turning off genetics is preferable here so we can reproduce the test exactly as before > by doing an exhaustive search. There is no reason not to try all the combos if there are only 16 possibilities!


you didn't say how did you configure Max optimizations limit. It is genetics, so the results could differ, but the bigger the limit you set the more it should converge to the "correct" numbers.



Anyway, we'll increase limit of max. optimizations to 1.000.000.000, but I don't know who would really use it.


I think the key is in producing strategies with as small level of complexity as possible, which means also small number of params to optimize.


b
#21

bentra

16.04.2023 04:59
Thanks Mark! I'm playing around with optimizer in B137 RC 1...

It would be nice though if we could actually turn off genetics and use a monte-carlo (random) engine instead of genetics. Running to exhaustion is too much for me yet I do not want the bias of the genetic engine during SPP or during a "simulated/simulated" optimization. As per the original request of this ticket.)

>you didn't say how did you configure Max optimizations limit. It is genetics, so the results could differ, but the bigger the limit you set the more it should converge to the "correct" numbers.
I meant total optimizations possible was only 16 so the lowest selectable option of 100 still easily covers all the optimizations possible, in this case the old genetics were making the optimization impossible to reproduce consistently even though there were only 16 combos. Looks like you fixed that part now so all good.


Votes: +16

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please