I implemented a custom fitness function called PrfPct(which highly correlates with net profit) and used it as the fitness function for my project. However in the databank I saw very different results between the columns “PrfPct” and “fitness”. A pattern seems to be: for most strategies with PrfPct>0, the corresponding “fitness” is 0.3. The strategies whose “fitness” > 0.3 have negative Prfpct. This difference is persistent when I use different data settings.
1). As I understands it, the “fitness” column is the fitness used in the internal GP process of SQX. (although this column applies to the whole data while in GP selection only the fitness for IS data is used) . And I also assume it should have a monotonic relationship with the one fitness function I choose in “weight fitness” – in this case, PrfPct. Am I correct on these understandings?
2). If my understandings in 1) are correct, thenthe custom fitness PrfPct is not working correctly in GP as I intends.(to be used in GP selection) Am I correct?
Attachments:You must be logged in to view attached files.
computing fitness from databank column is not so straighforward.
Range of the new value can be various, including negative, and there is a mechanism to convert it to 0 – 1scale required for fitness.
It would help if you’d post your snippet here, but in general:
> The strategies whose “fitness” > 0.3 have negative Prfpct.
if this is the case it looks like your snippet is not configured correctly. Do you use ValueTypes.Maximize in the constructor? And what are the average min and max values?
It should be other way around – strategies with negative Prfpct should have fitness below 0.3.
As for your question 1) – I’m not sure how you compute your value. But if you want to use it in genetic evolution you should compute it only from In Sample part of the trades.
The compute() method of DatabankColumn is called multiple times, for every possible Sample type combination. So if you made it in a similar way to other our snippets it should work correctly.
You must be logged in to reply to this topic.