Genetic optimization. Application in TradeStation environment.: Curve Fitting. Fighting with the “OVERFITTING” of the system
Fighting with the “OVERFITTING” of the systems (Curve Fitting)
There are different ways of fighting the so-called “overfitting” of the systems or “overoptmimization” as it frequently called. Let’s consider those variants which we apply in the field of genetic
optimization:
- “Strict” optimization conditions;
- Usage of “Fresh Blood” function from TSGO arsenal;
- Building of non-trivial optimization criterion.
“Strict” optimization conditions.
We interpret strict optimization conditions as the following settings of systems
testing:
- Setting of significant slippage, one percent per deal for example;
- Limitations of drawdowns;
- Big number of iterations;
- Big “leverage”.
In practice it was noticed that such testing sets hard conditions for the systems and only really “tough” systems survive. It forces genetic optimizer to select only those systems that are most stable to adverse conditions and impacts. “Survived” systems showed most stable results when were tested on out of sample data.
“FreshBlood” function
“FreshBlood” function causes purposeful perturbance to fitness. As a result the effective size of population increases and convergence improves. It can be considered as a launch of optimizer on variety of price histories that are resulted from initial by perturbance.
Building of non-trivial optimization criterion (Fitness)
In our opinion, building of non-trivial optimization criterion is one of the most essential moments of trading systems building. As it we mentioned above in order to lower the risk of overfitting it is necessary to use another characteristics than NetProfit etc., but those which are associated with desirable behavior of Equity as a whole, not only with its absolute value at the end of the testing period.
We can maximize the average of the following value for example:
[log W(T)/W(0) + 2/T * sum { log (W(t)/Wmax(t) }], t = 0,..., T,
where Wmax(t) = max{Wmax(t),W(t)}
i.e. we tend to condition the monotonous growth of Equity W(t)).
Optimization in case of large amount of parameters.
Disputes between “adherents” and “opponents” of the systems with large amount of parameters don’t fade to this day.
It practice we noticed the following moments that can significantly influence the
results:
- The volume of data and “strictness” of the system.
- If the system has a lot of internal non-controllable degrees of freedom then “overfitting” is possible when there is a little number of
parameters.
- Optimization of digital filer with 100 coefficients and taking into account this number in fitness is not without reason (in our humble
opinion).
|