Build to existing portfolio, correlation calculation bug

Correlation do not work at all. It is easy to check . Just build on last 5 weeks data on 15 min with no ranking and merge them and test it and you see that they are very correlated. If i set 0.1 daily i do not want them to be 1 or 0.8..
Attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Feature
  • Status New
  • Priority Low

History

m
#1

mabi

26.02.2021 00:08

Task created

h
#2

hankeys

26.02.2021 07:46
and did you add those strats to existing ptf databank or just build to it? because if i was testing it, it works i think


https://strategyquant.com/doc/strategyquant/fit-strategy-to-existing-portfolio/

MF
#3

Mark Fric

26.02.2021 11:16

Status changed from New to Waiting for information

mabi, didn't you misunderstood how correlation works? 


It tests correlation of newly generated strategies with the ones from Existing portfolio databank, not between generated strategies themselves

m
#4

mabi

26.02.2021 12:12
it works good . i take it back. Seems it was a hole bunch of -1 and -0.85 o saw wich was correct since i hade it allowed. Stupid,  also i had buildt to it directly with 34 years data on 0.1 and the first thing that happend was that 7 CHFJPY trades open long  of 12 which can happen ofcourse on long history since it is an average.
MF
#5

Mark Fric

26.02.2021 13:29

Status changed from Waiting for information to Refused

ok, thanks for reviewing it
m
#6

mabi

27.02.2021 01:01

Attachment 1.jpg added

1.jpg
(290.53 KiB)
tried it again this is set to 0.1,   But amount of strategies is 17 mio/h so something can slip thrue i suppose but most of those strategies should not be there.
MF
#7

Mark Fric

01.03.2021 12:23

Status changed from Refused to Waiting for information

sorry, I don't understand. is it still not working for you?


I don't see from your screenshot what is wrong. Fit to portfolio compares generated strategy with strategies in Existing portfolio databank and filters only the generated strategies.


It does nothing with the strategies in Existing portfolio databank.

m
#8

mabi

01.03.2021 23:57
I build directly to it . Been doing that for a 8 weeks.  If i do not set "Allow negative correlation" it seems to work good in SQx.  If i set "Allow negative correlation" i get posetive correlated strategies as per the pitcure above. I suppose the -X signed means negative correlated strategies and as you see from pitcure above they are posetivly correlated when i set "Allowe negative correlated strategies"  . 


I am also trading them on a real account this week well been doing it for 8 weeks now building new ones evry weekend. And indeed they are very correlated. At the moment i have 3 buy on XAG that are supposed to be uncorrelated all 3 taken within acouple of pips. It is probably better to not rely on this and check the code instead manually.

MF
#9

Mark Fric

02.03.2021 10:41

Type changed from Bug to Feature

Status changed from Waiting for information to New

Priority changed from Normal to Low

ok, so you set Existing portfolio as a target for generating strategies. 


That's creative, but we didn't intend it to be used this way. It will not work correctly because the existing strategies are cached before the build for quick computation of correlation.


We could make it work, but it is a feature request, and I'm afraid it is low on our list of priorities right now.

m
#10

mabi

03.03.2021 22:56
Well should work already anyway it seems to. Just the first one so i sort those manually and then start to build next build and have a base created by the first . So I have a build session then switch to another build and another and so on using the same folder. Build workflow nr2 will use the first one for the next instrument and so on. Seems to me it is when allowing  negative correlation that gives very bad result in regards to correlation.

Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please