{"id":968,"date":"2007-08-16T23:11:03","date_gmt":"2007-08-16T23:11:03","guid":{"rendered":"http:\/\/www.amibroker.org\/userkb\/2007\/08\/16\/io-ease-of-use\/"},"modified":"2012-08-17T11:04:38","modified_gmt":"2012-08-17T11:04:38","slug":"io-ease-of-use","status":"publish","type":"post","link":"http:\/\/www.amibroker.org\/editable_userkb\/2007\/08\/16\/io-ease-of-use\/","title":{"rendered":"IO – Ease of Use"},"content":{"rendered":"

This page is obsolete. Current versions of AmiBroker feature built-in non-exhaustive, smart multithreaded optimizer and walk-forward engine.<\/font><\/b><\/p>\n

As stated previously IO<\/em> Directives will by definition be seen as comments by AB \/ AA \/ AFL and are thus unintrusive.\u00a0 Below is a simple AFL with the required IO<\/em> Directives in it.<\/p>\n

ShrtLen\u00a0\u00a0\u00a0 <\/span>= <\/span>Optimize<\/span>(<\/span>"ShrtLen"<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0 0<\/span>,<\/span>\u00a0\u00a0 500<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0 1<\/span>);\r<\/span>LongLen\u00a0\u00a0\u00a0 <\/span>= <\/span>Optimize<\/span>(<\/span>"LongLen"<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 304<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0 0<\/span>,<\/span>\u00a0\u00a0 500<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0 1<\/span>);\r<\/span>UpPct\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>= <\/span>Optimize<\/span>(<\/span>"UpPct"<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.01<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0 0<\/span>,<\/span>\u00a0\u00a0\u00a0 10<\/span>,<\/span>\u00a0 0.01<\/span>);\r<\/span>DnPct\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>= <\/span>Optimize<\/span>(<\/span>"DnPct"<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.36<\/span>,<\/span>\u00a0\u00a0\u00a0\u00a0 0<\/span>,<\/span>\u00a0\u00a0\u00a0 10<\/span>,<\/span>\u00a0 0.01<\/span>);\r\r<\/span>ShrtAMA <\/span>= <\/span>AMA<\/span>(<\/span>C<\/span>, <\/span>2 <\/span>\/ (<\/span>ShrtLen <\/span>+ <\/span>1<\/span>));\r<\/span>LongAMA <\/span>= <\/span>AMA<\/span>(<\/span>C<\/span>, <\/span>2 <\/span>\/ (<\/span>LongLen <\/span>+ <\/span>1<\/span>));\r\rif (<\/span>ShrtLen <\/span>&<\/span>lt<\/span>; <\/span>LongLen<\/span>)\r{\r<\/span>\u00a0\u00a0\u00a0 Buy\u00a0\u00a0\u00a0\u00a0 <\/span>= <\/span>Cross<\/span>(<\/span>ShrtAMA<\/span>, <\/span>LongAMA <\/span>* ( <\/span>1 <\/span>+ <\/span>UpPct <\/span>\/ <\/span>100 <\/span>));\r<\/span>\u00a0\u00a0\u00a0 Sell\u00a0\u00a0\u00a0 <\/span>= <\/span>Cross<\/span>(<\/span>LongAMA <\/span>* ( <\/span>1 <\/span>- <\/span>DnPct <\/span>\/ <\/span>100 <\/span>), <\/span>ShrtAMA<\/span>);\r\r<\/span>\u00a0\u00a0\u00a0 Short\u00a0\u00a0 <\/span>= <\/span>Sell<\/span>;\r<\/span>\u00a0\u00a0\u00a0 Cover\u00a0\u00a0 <\/span>= <\/span>Buy<\/span>;\r}<\/span><\/pre>\n

That’s right … There aren’t any required directives.\u00a0<\/p>\n

\nIO<\/em> was meant to be a tool for USERS.<\/p>\n

All the IO<\/em> Directives are optional as they all have default values, all of which with a few notable exceptions I have set to what I believe the best settings to be are.\u00a0 As a result there is no learning curve to climb in order to\u00a0run IO<\/em>.\u00a0<\/p>\n

Getting the most out of IO<\/em> by utilizing sensitivity testing during in sample optimization and performing walk forward testing does require knowledge of how to write those directives which anyone should be able to get up to speed on in a few minutes.<\/p>\n

Initial setup of IO<\/em> involves\u00a0copying the\u00a0IO<\/em> Tasks.hta,\u00a0IO<\/em>.exe and IO<\/em>.ico files from a zip to your AmiBroker directory.\u00a0 Following that one would\u00a0want to set up easy access to the IO<\/em> Task Bar as it is the control center for all IO<\/em> operations.\u00a0 This\u00a0can be from the AmiBroker, Tools, Custom menu or from the Windows Desktop or Quick Launch Bar\u00a0( My preference because its a single click ).\u00a0 Once that’s established, clicking on the\u00a0icon for the IO<\/em> Task\u00a0Bar will bring it up in the top left corner of the screen typically overlaying the AmiBroker title bar.\u00a0 It can of course be moved to wherever the user desires.
\n\"io-tasks.png\"<\/a><\/p>\n

Clicking RUN on the IO<\/em> Task Bar will start an IO<\/em> run much like clicking Optimize in AB\/AA or FE would start a regular\u00a0AmiBroker optimization.\u00a0 When\u00a0IO<\/em>\u00a0begins it will first show the user the values for all the IO<\/em> Directives, with the ones not having default values being in bold.\u00a0 This provides the user a chance to review the directives and cancel the run prior to its beginning if modification to some directive is desired.
\n
<\/a><\/p>\n

\"io-dir.png\"<\/a><\/a><\/p>\n

Once the user clicks OK on the Directives screen, optimization begins.\u00a0 What one would see during optimization is short bursts of the AB Optimization progress bar which will appear, run to completion, disappear and then repeat.\u00a0 IO<\/em> is only active for very short spans of time, typically a fraction of a second, between the time that the AB Optimization progress bar disappears and when it reappears.\u00a0
\n
\"io-run.png\"<\/a><\/p>\n

<\/a><\/p>\n

Other options from the IO<\/em> Task Bar while IO<\/em> is running are …\u00a0\u00a0<\/p>\n

\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0 Status – Shows the status of the run ( Shown Above )<\/p>\n

\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0 Plot Best – Will automatically update an Equity Curve ( AB’s, Yours or Mine ) as new best solutions are found<\/p>\n

\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0 Stop – Will allow the run to be paused or cancelled<\/p>\n

\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0 Servers – Shows\u00a0the Work Flow between client and server(s)\u00a0 ( Shown Above )<\/p>\n

IO<\/em> Task Bar On\/Off Type Buttons will change color when activated as shown above.\u00a0 When a run is completed\u00a0the equivalent of clicking the Reports button will occur which\u00a0is to provide GUI access to all the Reports and Screens relative to the current and previous runs.\u00a0\u00a0\u00a0\u00a0<\/p>\n

This is the initial screen that will display:
\n
\"io-reports2.png\"<\/a><\/a><\/p>\n

<\/a><\/p>\n

<\/a><\/p>\n

When an individual\u00a0button relating to an IO<\/em> run for an AFL for a specific\u00a0run date and time is clicked then the summary for that run will appear.\u00a0
\n
\"io-summary2.png\"<\/a><\/p>\n

<\/a><\/p>\n

This typically shows the amount of\u00a0time the run took and the number of tests performed along with whatever performance metrics the user desires as well as the parameter values of the best solution from optimization.\u00a0 If Out Of Sample testing was performed then there will an additional line of performance metrics for the out of sample period.\u00a0 If Walk Forward testing was performed then there will be multiple groups\u00a0of the above information i.e. one for each\u00a0Walk Forward segment.\u00a0 Clicking on a button for a particular segment\u00a0brings up a detail screen which shows the chart as of the end of that particular segment, the trade list for the in and out of sample period it covers and the result of final sensitivity testing.\u00a0
\n
\"io-detail.png\"<\/a><\/p>\n

The Detail Screen has buttons to:<\/p>\n

\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0 Open a CSV file of the Trades, assumedly in Excel, for further manipulation if desired<\/p>\n

\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0 Show the AFL in play with the parameter values from optimization put into the default values of the optimization statements<\/p>\n

\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0 Show the Detail Log if requested by IO<\/em> Directive which will show the results of every test performed during optimization and can be sorted in any order desired.
\n
\"io-detail-log.png\"<\/a><\/p>\n

A\u00a0shareware version of IO<\/em> with full documentation can be found in the AmiBroker Files Section …
\n
http:\/\/groups.yahoo.com\/group\/amibroker\/files\/IO.zip<\/a>
\nhttp:\/\/www.amibroker.org\/userkb\/wp-content\/uploads\/2007\/08\/io-reports.png<\/p>\n","protected":false},"excerpt":{"rendered":"

This page is obsolete. Current versions of AmiBroker feature built-in non-exhaustive, smart multithreaded optimizer and walk-forward engine. As stated previously IO Directives will by definition be seen as comments by AB \/ AA \/ AFL and are thus unintrusive.\u00a0 Below is a simple AFL with the required IO Directives in it. ShrtLen\u00a0\u00a0\u00a0 = Optimize("ShrtLen",\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2,\u00a0\u00a0\u00a0\u00a0 0,\u00a0\u00a0 500,\u00a0\u00a0\u00a0\u00a0 1); LongLen\u00a0\u00a0\u00a0 = Optimize("LongLen",\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 304,\u00a0\u00a0\u00a0\u00a0 0,\u00a0\u00a0 500,\u00a0\u00a0\u00a0\u00a0 1); UpPct\u00a0\u00a0\u00a0\u00a0\u00a0 = Optimize("UpPct",\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.01,\u00a0\u00a0\u00a0\u00a0 0,\u00a0\u00a0\u00a0 10,\u00a0 0.01); DnPct\u00a0\u00a0\u00a0\u00a0\u00a0 = Optimize("DnPct",\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.36,\u00a0\u00a0\u00a0\u00a0 0,\u00a0\u00a0\u00a0 10,\u00a0 0.01); […]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[115],"tags":[],"_links":{"self":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/968"}],"collection":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/comments?post=968"}],"version-history":[{"count":3,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/968\/revisions"}],"predecessor-version":[{"id":3497,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/968\/revisions\/3497"}],"wp:attachment":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/media?parent=968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/categories?post=968"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/tags?post=968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}