PureBytes Links
Trading Reference Links
|
David,
I have no answer to your question (which was actually posted several
weeks ago). I'm just wondering how to use custom metrics in the
walk-forward optimization at all. According to what TJ wrote on
http://www.amibroker.com/kb/2008/02/12/getting-started-with-automatic-walk-forward-optimization/ ,
any metric defined in the custom backtester can be used as optimization
target. Well, not on my system. While my custom metrics are calculated
and plotted as they should in "normal" backtests/optimizations they are
not shown in the list of possible optimization targets in the
walk-forward tab of AA. Does it work for you?
Greetings,
Thomas
> I am trying to make a custom metric for walk forward optimization
> testing. This custom metric includes parameters that need input from
> the walk forward periods. For example, if I were making a custom
> metric K Ratio, I would need the number of bars in the IS and OOS
> periods to figure Standard Error, Standard Deviation, and Linear
> Regression slope. How do I do this? And is there a better way?
>
> Here's a custom metric AFL with parameter boxes that would be
> replaced with whatever is needed to make this work when running walk
> forward optimization.
>
> LRPeriods=Param("LinRegPeriods",10,1,500,1);
> LR=LinRegSlope(e,LRPeriods);
>
> SEPeriods=Param("SEPeriods",10,1,500,1);
>
> SE=StdErr(e,SEPeriods);
>
> SDPeriods=Param("SDPeriods",10,1,500,1);
>
> SD=StDev(e,SDPeriods);
>
> NewKRatio= LR / ((SE/SD)* sqrt(SDPeriods));
>
> SetCustomBacktestProc("");
>
> if (Status("Action") == actionPortfolio)
>
> {
>
> bo = GetBacktesterObject();
>
> bo.backtest();
>
> st = bo.getperformancestats(0);
>
> NewKRatio = st.getvalue("NewKRatio");
>
> bo.addcustommetric("NewKRatio", NewKRatio);
>
> }
>
> Thanks
>
> Dave
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|