Hi,
I tried this one out, but when performing Walk-Forward Analysis, I cannot
choose my custom metric as objective function. Effectively, I'd like to
MINIMIZE Ulcer-Index when performing WFA. Portfolio: "enable CBT" is ticked,
path is specified. Metric appears in the report, and the column is added, but
cannot be chosen from "Walk-Forward" "Optimization Target".
SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
bo = GetBacktesterObject();
bo.Backtest(); // run default backtest procedure
st = bo.GetPerformanceStats(0); // get stats for all trades
Ulcer = -1*st.GetValue("UlcerIndex");
bo.AddCustomMetric( "Ulcer-Index-II",Ulcer );
}
Also checked the links where it states:
"The "Optimization target" field defines the optimization raport COLUMN NAME
that
will be used for sorting results and finding the BEST one. Any built-in column
can be used
(as appears in the optimization output), or you can use any custom metric that
you define
in custom backtester. The default is CAR/MDD, you can however select any other
built-in metric from the combo.
You can also TYPE-IN any custom metric that you have added via custom
backtester interface."
Any suggestions?
Matthias
--- In [email protected], "Mike" <sfclimb...@...> wrote:
>
> Add your own custom metric to be used as the optimization target. Simply
> calculate your metric as the negative of your intended metric. The result
> will be that originally large values become smaller (i.e. more negative) and
> originally small values become larger (i.e. less negative).
>
> Refer to custom metrics for more detail:
> http://www.amibroker.com/guide/a_custommetrics.html
>
> Set custom target on WFA settings (applies to regular optimization too, not
> just walk forward):
> http://www.amibroker.com/kb/2008/02/12/getting-started-with-automatic-walk-forward-optimization/
>
> Mike
>
> --- In [email protected], "elizabeth19852002" <elizabeth.kennedy@>
> wrote:
> >
> > Hello all,
> >
> > I would appreciate if someone can please tell me how to configure
> > optimizations like CAME so that it looks for a MINIMUM (as opposed to a
> > Maximum) of an optimization target (such as user defined objective
> > function).
> >
> > Just by adding OptimizerSetEngine("cmae"); in AFL and setting the
> > Optimization target in the "Walkforward" tab does not tell it to look for a
> > MINIMUM or MAXIMUM of the optimization target during optimization ???
> >
> > Thanking you
> >
> > Liz
> >
>