Hardcoded number of trades coefficient is calculating fitness adjuster from main data only even when portfolio fitness is selected

It is not logical to apply this fitness adjuster snippet to main data trades when fitness itself is being calculated from portfolio trades. In that case it is logical to apply this snippet to portfolio trades. 

if(trades < 20) {
   fitness *= 0.3;
} else if(trades < 30) {
   fitness *= 0.4;
} else if(trades < 50) {
   fitness *= 0.6;
} else if(trades < 70) {
   fitness *= 0.8;
} else if(trades < 100) {
   fitness *= 0.85;
} else if(trades < 150) {
   fitness *= 0.9;
}

Ideally it would be nice to be able to turn this on or off or modify these calculations in a snippet. Sometimes I just don't need this because I've already accounted for number of trades in my custom fitness calculations.

Attachments
No attachments
  • Votes +6
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

b
#1

bentra

01.01.2023 16:44

Task created

b
#2

bentra

01.01.2023 17:07
Voted for this task.
E
#3

Emmanuel

15.01.2023 10:10
Voted for this task.
TT
#4

Tamas

06.02.2023 12:18

Type changed from Bug to Feature

b
#5

bentra

07.02.2023 10:44
It is not logical to apply this fitness adjuster snippet to main data trades when fitness itself is being calculated from portfolio trades. In that case it is logical to apply this snippet to portfolio trades. That part is a bug.

Do you intend to fix this bug by introducing a new feature such as control of the snippet itself?
b
#6

bentra

07.02.2023 10:49
...just trying to figure out why you would categorize this very-easy-to-fix bug report as a feature request....
l
#7

Loonly

07.02.2023 10:54
Voted for this task.
l
#8

Loonly

07.02.2023 10:54
that's clearlya bug not a feature i pray this to be fixed. thank you .
b
#9

bentra

07.02.2023 17:41

Subject changed from hardcoded number of trades coefficient is calculating fitness adjuster from main data only even when portfolio fitness is selected to Hardcoded number of trades coefficient is calculating fitness adjuster from main data only even when portfolio fitness is selected

Type changed from Feature to Bug

Hello, I have made the bug more clear in the title. I'm sure you can see now this is a bug.
KB
#10

kbtech

07.02.2023 19:50
Voted for this task.
b
#11

binhsir

08.02.2023 02:15
Voted for this task.
JJ
#12

jjsb41

08.02.2023 05:46
Voted for this task.
TT
#13

Tamas

08.02.2023 08:24
Hello, ok maybe we can make it customizable in the next build 138. 

But it is not so easy, there is also a function for transforming the value to fitness range so on.


We can discuss it later. Now the priority for SQX137 is fix the most serious bugs. 137 final should be ready at end of the month.

b
#14

bentra

10.02.2023 17:28
To me this is not a minor bug. This is effecting me deeply when I build for 20 or more pairs. I may have only ~100 trades on the main data symbol but there is no need to penalize it because the portfolio of all pairs has 2000+ trades! Please allow some kind of workaround at least until then.....

PS I would think this fitness adjuster function is applied lastly after the fitness range is already calculated...
MF
#15

Mark Fric

13.02.2023 11:11

Status changed from New to In progress

I looked at the code, but this special coefficient by number of trades is used ONLY if you have fitness setting xomputed from main backtest.

If fitness is computed from portfolio then:

- if it is Portfolio it doesn't apply this coefficient at all.

- if it is Existing portfolio it uses the coefficient, but uses # of trades from portfolio, not just main result


So I'd say everything already is as you want it.

b
#16

bentra

14.02.2023 02:16
It didn't seem so, I'll see if I can reproduce it again.
MF
#17

Mark Fric

20.02.2023 10:49

Status changed from In progress to Refused

it should really be like this, if it works differently let me know, but I'm closing this task for now

Votes: +6

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please