{"id":70,"date":"2008-02-12T07:54:31","date_gmt":"2008-02-12T12:54:31","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/2008\/02\/12\/getting-started-with-automatic-walk-forward-optimization\/"},"modified":"2014-12-04T08:25:03","modified_gmt":"2014-12-04T13:25:03","slug":"getting-started-with-automatic-walk-forward-optimization","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2008\/02\/12\/getting-started-with-automatic-walk-forward-optimization\/","title":{"rendered":"Getting started with automatic Walk-Forward optimization"},"content":{"rendered":"
Recently released AmiBroker 5.05 BETA features the automatic Walk-Forward Optimization mode.<\/p>
The automatic Walk forward optimization is a system design and validation technique in which you optimize the parameter values on a past segment of market data (“in-sample”), then test the system forward in time on data following the optimization segment (“out-of-sample”). You evaluate the system based on how well it performs on the test data (“out-of-sample”), not the data it was optimized on. <\/p>
To use Walk-Forward optimization please follow these steps:<\/p>
By default an “EASY MODE” is selected which simplifies the process of setting up WF parameters.
It assumes that:
a) Out-of-sample segment immediatelly follows in-sample segment
b) the length of out-of-sample segment equals to the walk-forward step<\/p>
Based on these two assumptions the “EASY” mode takes in-sample END date and sets
out-of-sample START date to the following day. Then adds in-sample STEP and this becomes out-of-sample END date.
In-sample and Out-of-sample step values are set to the same values.<\/p>
The “EASY” mode guarantees correctness of WF procedure settings.<\/p>
In the “ADVANCED” mode, the user has complete control over all values, to the extent that
they may not constitute valid WF procedure.
The interface allows to selectivelly disable in-sample and out-of-sample phases using checkboxes at top
(for special things like runnign sequential backtests without optimization). <\/p>
All settings are immediatelly reflected in the PREVIEW list that shows all generated IS\/OOS segments and their dates.<\/p>
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.<\/p>
This will run sequence of optimizaitons and backtest and the results will be displayed in the “Walk Forward” document that is open in the main application frame.
When optimization is running you can click “MINIMIZE” button on the Progress dialog to minimize it – this allows to see the Walk Forward output during the optimization steps.<\/p>
IN-SAMPLE and OUT-OF-SAMPLE combined equity<\/b><\/p>
Combined in-sample and out-sample equities are available by Recently released AmiBroker 5.05 BETA features the automatic Walk-Forward Optimization mode.The automatic Walk forward optimization is a system design and validation technique in which you optimize the parameter values on a past segment of market data (“in-sample”), then test the system forward in time on data following the optimization segment (“out-of-sample”). You evaluate the system […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[53,14,26,27],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/70"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":1,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":795,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/70\/revisions\/795"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
~~~ISEQUITY and ~~~OSEQUITY composite tickers (consecutive periods of IS and OOS are concatenated and scaled to
maintain continuity of equity line – this approach assumes that you generally speaking are compounding profits)
To display IS and OOS equity you may use for example this:<\/p>PlotForeign<\/span>(<\/span>"~~~ISEQUITY"<\/span>,<\/span>"In-Sample Equity"<\/span>, <\/span>colorRed<\/span>, <\/span>styleLine<\/span>);
<\/span>PlotForeign<\/span>(<\/span>"~~~OSEQUITY"<\/span>,<\/span>"Out-Of-Sample Equity"<\/span>, <\/span>colorGreen<\/span>, <\/span>styleLine<\/span>);
<\/span>Title <\/span>= <\/span>"{{NAME}} - {{INTERVAL}} {{DATE}} {{VALUES}}"<\/span><\/code>","protected":false},"excerpt":{"rendered":"