Let's say I want to find the parameters that give the maximum Net Profit on the Optimizer.
These are the initial values for optimization on two variables: https://i.imgur.com/sxX92N3.png
But as you could see, it couldn't find the global maximum on net profit: https://i.imgur.com/M1x1Wmx.png
So, I've tried to narrow the parameters: https://i.imgur.com/RIyLgzn.png
But again is unable to find the global maximum on net profit: https://i.imgur.com/WyzOVn4.png
So, I've tried to narrow the parameters for the third time: https://i.imgur.com/dwcKFEi.png
And finally it found the global maximum: https://i.imgur.com/3cpwguH.png
So everytime I have to optimize parameters based on some metric, I have to see 3D Optimization Chart to narrow the parameters manually and find the global maximum.
It could be nice if it could be done automatically.
What happen if I try to optimize three variables at the same time? It couldn't find a better net profit than the original strat: https://i.imgur.com/FM7UAZD.png
Later on, I closed and opened sqx and it gave another result: https://i.imgur.com/oGvUkmN.png
And I did it again, giving another result: https://i.imgur.com/hBtsXf8.png
In the case of more than two variables, I have to optimize two variables at a time, narrow down the parameters and later on optimize another two variables and narrow down the parameters again in order to find the right value.
Status changed from New to Fixed
The idea is that backtests with low number of trades have also lower fitness.
So SQ correctly optimizes the results but by fitness.
There is one more bug in v131 that Fitness is not shown in the 3D chart, I fixed it.
The coefficients are as follows:
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;
}
Because I had to narrow down parameters manually, in order to make the optimization work.
There's no way to avoid this, and it is intentional. With small number of trades the statistical significance is small.