Fit to existing portfolio cannot possibly be right: two bugs found

BUG #1 FALSE POSITIVES: I have only 1 strategy in my results tab which is also the target for the correlation check, how could 20% of newly generated (COMPLETELY RANDOM as the init pop isn't even filled yet) strategies possibly be >0.9 correlated to Daily PL with this one strategy? Not even 10% of new randomly generated strategies are profitable let alone 20% being correlated to this one strategy! 

BUG #2 CORRELATION FILTER IS AN INIT POP FILTER INSTEAD OF RANKING FILTER: The correlation check is probably the most resource-demanding check, it should probably be the last check made after all the ranking filters have already been checked... (thankfully this bug existed and allowed us to spot the first bug easier though lol.)  In fact, it seems correlation check is being checked as an init pop filter. I think it's better to have strategies correlated with the existing portfolio allowed into the gene pool as they may mutate to something less correlated. We aren't really preventing a stoppage by applying the correlation filter to init pop because a stoppage can still occur in the builder if it can't find any viable genes for the init pop. And ya, should save a lot of CPU / increase build speed. Turning this on cuts my strat per hour down significantly.

It might be cool if the "strategy too similar" filter was configurable.


EDIT:
OK there are some other complaints about the speed with fit to existing portfolio turned on :
https://roadmap.strategyquant.com/tasks/sq4_8261

https://roadmap.strategyquant.com/tasks/sq4_7523


I've been watching the process carefully and reading the related tickets.

What's actually happening with the LOW CPU USAGE is that during the initial fill stage when no islands are full yet CPU is still using 100% BUT the islands take 10x as long to fill up (because of a double whammy: there are false positives as I've shown in my screenshot above AND because the correlation filter is incorrectly used as a init pop filter instead of a ranking filter.) CPU usage does eventually drop to 50% when only one or two or three islands are actually full (which, once the first island actually finally fills, is often. It might take 30 minutes or 60 minutes to get there but it drops to 50% once the first island is completely full) 

Attachments
buildcor.cfx
(36.83 KiB)
2022-01-30 2.png
(114.28 KiB)
  • Votes +8
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

b
#1

bentra

30.01.2022 21:38

Task created

b
#2

bentra

30.01.2022 22:06

Attachment Strategy 21480.sqx added

Strategy 21480.sqx
(88.80 KiB)
A quick comment from the dev team asking for the strategy in my portfolio is a hopeful sign..

my entire portfolio of one strategy is attached. I'd be surprised if another strategy didn't produce the same or similar results though...  
b
#3

bentra

30.01.2022 22:45
Voted for this task.
b
#4

bentra

02.02.2022 22:03

Subject changed from Fit to existing portfolio cannot possibly be right to Fit to existing portfolio cannot possibly be right: two bugs found

HH
#5

Hans

04.02.2022 00:00
Voted for this task.
E
#6

Emmanuel

04.02.2022 16:54
Voted for this task.
a
#7

astral

05.02.2022 15:11
Voted for this task.
o
#8

Enric

26.02.2022 16:43
Voted for this task.
4
#9

Jordan

04.03.2022 03:46
Voted for this task.
c
#10

crazyhedgehog

31.08.2022 10:04
Voted for this task.
b
#11

bentra

31.10.2022 14:17
I've been thinking about the init pop filter. Having it as init pop saves resources. May I suggest instead of the init pop filter, just making the correlated strats have a penalty to fitness? Such as if [strategy too similar then fitness=fitness*0.5 (or 0.66)]  In this way we might prevent stoppage and slow down, but still give "too similar" strats a chance to mutate.
k
#12

Karish

02.11.2022 00:06
Voted for this task.
TT
#13

Tamas

23.11.2022 14:09

BUG #1 FALSE POSITIVES

correlation itself is calculated correctly. 


In the attached config file the option "Allow negative correlation" is off.

I assume that this is a reason why your strategies are dismissed. 

Check Engine log for messages like - Fit to existing portfolio - dismissed: corr_test correlation -0.13 < 0


BUG #2 CORRELATION FILTER IS AN INIT POP FILTER INSTEAD OF RANKING FILTER

thanks for pointing it out, fixed

b
#14

bentra

24.11.2022 01:18
BUG #1. Yes you're right, but why on earth would anyone want to block negatively corelated strategies anyways? And then arbitrarily pick precisely zero as the limit? For instance if I picked 0.9 as the limit for correlation then shouldn't -0.9 be the negative correlation limit? I don't think this should be turned on for the default setting...
MF
#15

Mark Fric

24.11.2022 08:32
this i sexactly what this switch Allow negative correlation does.


If turned OFF, it removes all strategies whose correlation is > 0.3 or < 0


If turned ON,  it removes all strategies whose correlation is > 0.3, and keeps strategies with any negative correlation.


Perhaps it should be set ON on default.

b
#16

bentra

24.11.2022 09:04
Oh hi Mark...

I'm curious, why would someone want < 0 to be removed?

Assuming there is a valid reason, my idea is > 0.3 or < -0.3

But I can't think of any scenario where we would want to actually remove NEGATIVELY corelated strategies, they should be the goal I think....

Votes: +8

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please