Problem in returned value of custom criteria on tester

Back to topics list To post a new topic, please log in or register
avatar
6
lumbrjack 2016.03.11 02:55
 

Hello

 I have a problem with the values returned on tester when I use the genetic algorithm to optimize. Using the same parameter in EA, the return value of the function OnTester() dont match when I compare the test individually  with the return value in optimization.

Here is the Step by step:

1-First I made a custom criteria to run the optimization:

double OnTester()
{
double parameter=-(1-P)*(0.3*RMSET+0.7*RMSE+nmedio);//-0.5*(1-ninput/ntinput));
if(parameter<-1) parameter=-1;
return(parameter);
}

 when P, RMSET, RMSE and nmedio are global variables.

2- I ran the optimization with genetic algorithm and show theses results: 

Tests results 

3-I select the first result and select input parameter to run the test individually and I obtein the following result:

 Result

When we compare the individual result with the declarad result of optimization, we see which the results are diverging.

I dont change anything about the two tests. The time period is the same and paramters too, but the results are diferent. I did the calculation manually and, the right result, is the result from a test that ran individually.

What could be happen here?

 Thanks 

avatar
12995
WHRoeder 2016.03.11 14:19 #
 

lumbrjack:

I dont change anything about the two tests.

What could be happen here?

Did you use a fixed spread? Current spread means the value is taken from the chart at the moment the test started. And that can vary.
avatar
6
lumbrjack 2016.03.11 15:28 #
 
WHRoeder:

lumbrjack:

I dont change anything about the two tests.

What could be happen here?

Did you use a fixed spread? Current spread means the value is taken from the chart at the moment the test started. And that can vary.

WHROEDER

 The spread is variable but I think that hasn´t impact in the custom criteria result due the optimization isn´t in function of trades but math calculations from indicators that use bid price only.

 I suspect, that in GA optimization, the program is rounding the result and it could impact the output. The scale of results is in fractions and sensitive to rounding, so to verify if is true, im running now the same test but the custom results are multiplied by 100. 

When finish, I will post a feedback.

 Thanks. 

avatar
6
lumbrjack 2016.03.12 01:39 #
 

I made a test again but changing the scale of results multiplying by 100 and the results generated by Ga and the result generated individually are matching.

 So, I think that the difference of the results described above, is related to the fraction scale of results and we can resolve it increasing the scale of results:

GA

 Individual test:

test

Back to topics list  

To add comments, please log in or register