Option - Delete strategies wit correlation > threshold

Pls, add  the "portfolio" in SQ  in correlation analysis option to delete strategies with correlation > threshold
Attachments
No attachments
  • Votes +10
  • Project StrategyQuant X
  • Type Feature
  • Status Archived
  • Priority Normal
  • Assignee Mark Fric
  • Milestone Archived (To be done later)

History

IH
#1

clonex / Ivan Hudec

20.01.2019 11:53

Task created

g
#2

geektrader

20.01.2019 11:54
Voted for this task.
g
#3

geektrader

20.01.2019 11:56
Absolutely needed if you mean correlation based on equity curve! Yes, please let us set a value from 0% to 100% similarity that will then clean-up the database and also make it an acceptance criterion, please (e.g. "if the equity curve is >98% correlated with another strategy in the database, don´t add it"). This will keep the database from overfilling with similar strategies towards the end of the genetic evolution. And it could be made even more smart, like: "if the equity curve is >98% correlated with another strategy in the database, check if the new strategy that is to be added has a higher fitness than the existing one, if it has higher fitness, add it and remove the existing one from the database". But that is most likely too much to ask for ;-)
IH
#4

clonex / Ivan Hudec

20.01.2019 12:35
Voted for this task.
h
#5

hankeys

20.01.2019 12:45
imagine that you will need to compute the correl between every 2 members of databank - it will be very time consuming and you will have the problem which strategy to choose to throw away. What will be the filtering criteria? Throw away the worse strategy in the meaning of RDD, does this strategy more robust?

After you throw away one member, the correlation matrix could change, so you recalculate it?

So i am afraid that this filter in build process or in retester is not a good solution

I am doing this only on the final pack of strategies - put STR files to QA and manually deleted which has monthly correl higher than 0.5

IH
#6

clonex / Ivan Hudec

20.01.2019 13:04

Attachment Capture.png added

the point is to have an option in retester to delete strategies which have correlation > threshold. not during bulidning 
o
#7

Enric

20.01.2019 13:05

I agree with hankeys. That filter could be time consuming and could delete the more robust strategy which is bad. I also preffer after I passed all the tests analyze the correlation in QA.

Careful because QA is not fully compatible with SQX strategies; there's an open bug

h
#8

hankeys

20.01.2019 13:16
i understand - but which one to delete?


max correl is 0.71 between 1.23.88 and 5.16.77 - which one you delete? what will be the metric for it? RDD? higher RDD means better strategy?


OK - you delete 1.23.88 what next? do you need to recalculate the correl matrix? because it could change significantly after delete of 1 member

Rr
#9

Partizanas

20.01.2019 19:36
Voted for this task.
g
#10

geektrader

20.01.2019 19:59
I can tell you that there must be a quick solution because another platform I use has exactly this and it takes less than a second to calculate for 100 strategies on 32 years of history data. So there must be a way. You also usually use that filter with really high values (99% correlation). This nicely avoid endless duplicates during genetic building on the other platform towards the end and seems to cost no time at all, even for large collections. No idea how they do it there though, but it works :-)

And of course, it should be an OPTION as usually, no one should be FORCED to use it if they don´t like the idea. For me personally, it is a crucial feature that makes me use the other platform a lot and even if it would take 10 seconds to calculate each time, I would not mind.

l
#11

Loonly

20.01.2019 22:13
Voted for this task.
h
#12

hankeys

21.01.2019 07:43
i am not talking here about that it couldnt be done - everything could be done - but only about that, it has some problems, which need to be settled, because this kind of filtering could lead to worse strategies in the meaning of their future performance.


So OK, if someone want to throw away some strategies, he need to tell how...


already for now the SQX could filter "too similar" strategies - i dont remeber it absolutely 100%, but it will take RDD and NetProfit with some light threshold and delete these duplicates and keep the one with higher RDD.


So i think 99%-100% correlation is settled.


I want to keep my pool of strategies as much as low correlated, i told here how i am doing - keep monthly correlation to max 0.5, but i do this only on final strategies from every pack (10+) and manually.


If i have in the final pool lets say 40 strats and make a correlation matrix and see that there is more values higher 0.5 and i dont want do it manually - i will set everything to portfolio master. Lets say, i will tell, that i want to keep only 10 strats max from this pack - i will run portfolio master 10-10, monthly correl max 0.5, rank RDD and keep the strategies from the portfolio with the max RDD

IH
#13

clonex / Ivan Hudec

21.01.2019 08:56
Long time i was working with QA ( 1 year) . You are right i did all the job in QA. Anyway Geektrader has good point too.
g
#14

geektrader

23.01.2019 00:54
@hankeys:


>So OK, if someone want to throw away some strategies, he need to tell how...


We did, by the correlation filter mentioned in this feature request. Your method is nice, but complicated, I am happy to work with a simple balance line correlation filter instead (the one requested here) as I have good experience with it in the other platform that I am mainly using these days. If you have another idea, just open a new feature request, won´t hurt to have even more options. And again, no one has to use the filter if she/he doesn´t want.

MG
#15

maegop

23.01.2019 04:08
Voted for this task.
h
#16

hankeys

23.01.2019 07:45
@geektrader:


max correl is 0.71 between 1.23.88 and 5.16.77 - which one you delete? what will be the metric for it? RDD? higher RDD means better strategy?


from this example you want to throw which strategy? because you want to throw away only 1, right? but which one? i dont read here any solution for this...

KL
#17

kainc301

23.01.2019 08:16
Can you determine a relative fitness for each strategy based on a custom fitness that the user sets and then allow user to delete any highly coorelated strategies below a certain fitness score? It should go back in and delete only the lower performing strategies based on how the user would want it. 


Or just use portfolio masters functionality with the top x strategies below a certain correlation score when put together like @hankeys said. But strategies would first have to be weighed by some custom fitness so that you can only delete strategies with lower fitness scores.

MF
#18

Mark Fric

27.01.2019 16:02

Assignee changed from Mark Fric to Mark Fric

Type changed from Bug to Feature

Milestone changed from None to To be done later

something like this is planned - it will be a new module "Portfolio" where you can keep portfolio of your strategies, and then use Builder to generate new ones that will not correlate too much with your existing portfolio strategies.


We will get to it when we'll be free from most of the bugs, I expect in February- March.

m
#19

mikeyc

13.02.2019 21:59
Voted for this task.
k
#20

Karish

25.02.2019 12:23
Voted for this task.
LC
#21

LuboslavC

20.05.2019 21:17
Voted for this task.
b
#22

beppil

08.11.2019 00:14
Voted for this task.
MF
#23

Mark Fric

16.02.2020 13:52

Status changed from New to Archived

BS
#24

BobS

14.04.2020 15:35
Voted for this task.

Votes: +10

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please