How to use other metrics with Genetic Optimizer
Author: akuzn
Creation Date: 2/10/2012 7:59 AM
profile picture

akuzn

#1
Hi
There are 2 ideas in wiki article concerning using of genetic optimizer
1. It is possible to use any metrics to optimize.
2. It is possible to use use companion Genetic Optimizer Test application to quickly determine optimal population and generation counts.

So 2 questions:
1. Where it is possible to get such companion?

2. I have commumity components istalled but no additional metrics based on different scorecards appeared. Could you explain may be i do something wrong.
( Btw in Monte Carlo Optimizer i can choose ascending or descending order to optimize ).

Is it possible to extend criteria to optimize in GA?
How i can extend such criterias myself. I d like to test some more statistical ratios than coming with GA.
profile picture

Eugene

#2
QUOTE:
1. It is possible to use any metrics to optimize.

Yes, it's possible to optimize Fitness using any performance metric. Select any performance metric available from Scorecards installed in Wealth-Lab – such as Basic, Extended or Community (if installed). To change a Scorecard, switch to the "Results" tab, select a different Scorecard, click "Begin optimization" and "Cancel optimization", then re-open "Settings".
QUOTE:
2. It is possible to use use companion Genetic Optimizer Test application to quickly determine optimal population and generation counts.

AFAIR it's possible to feed the helper app with saved results of exhaustive optimizations (in XML files).
QUOTE:
2. I have commumity components istalled but no additional metrics based on different scorecards appeared.

That's right. The Community Components has never contained no scorecards. As the download page and the Wiki online guide suggest, MS123 Scorecard is a part of MS123 Performance Visualizer library.
profile picture

akuzn

#3
Certainly i have Performance Visualizer library
so what it gives to me - only possiblity to arrange results of optimization, but no new metrics to optimize

And what i have as metrics to oprimize:
1. Net profit (by default)
2. APR% -
3. trades - how to use it?)
4. winnings, but as one of first steps
5. avg profit ( already more or less interesting feature after winnings)
6. avg bars held - dont know how it may help optimization
7. Max Drawdown - certainly would like to have min drawdown to optimize
8. Profit Factor
9. Recovery Factor
10. Payoff ratio
----- the end

But i d like to use other metric based on more promoted statistics.
So there is only one way - to make new optimizer?
i
profile picture

Eugene

#4
QUOTE:
so what it gives to me - only possiblity to arrange results of optimization, but no new metrics to optimize

From the dropdown menu (Optimization > Results > Scorecard), switch to MS123 Scorecard before running an optimization. Next optimization run will be using the scorecard you just selected.
QUOTE:
But i d like to use other metric based on more promoted statistics.
So there is only one way - to make new optimizer?

Right on the money. MS123 Scorecard will serve as an example: its source code is open and is included with the MS123 Performance Visualizer solution. Grab the attachment from the project's Wiki home page.
QUOTE:
7. Max Drawdown - certainly would like to have min drawdown to optimize

Sure, just click on the title to sort it in reverse order and there you have - "Min Drawdown". ;)
profile picture

Eugene

#5
P.S. You might want to take a look at the PerformanceEngine.cs class: it "drives" the scorecard, supplying it with the performance metrics.
profile picture

wl64bit

#6
When using Genetic Optimizer to optimize for Ulcer Index, the optimizer is trying to find the results with the bigger Ulcer Index while it should make efforts to look for the results with the lower Ulcer Index.
profile picture

Eugene

#7
You can plug any metric from the installed Scorecards. The GA optimizer will not make such assumption because it does not know the details of a particular optimization metric (aka the fitness function) i.e. how to treat it (to prefer lower or higher values).
profile picture

wl64bit

#8
In that case it is useless to perform such an optimization for Ulcer Index, is not it?
profile picture

Eugene

#9
I'm not a GA expert but it sounds like you're right. A workaround could be to take some related fitness function that works the other way round (the higher the better). If programming your own Scorecard is an option, it could be as simple as taking the Ulcer Index with negative sign.

Also I'd recommend to enter a support ticket with the enhancement request (change the sort order of fitness function).