{"id":742,"date":"2014-11-27T13:53:10","date_gmt":"2014-11-27T18:53:10","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/?p=742"},"modified":"2014-12-04T16:03:39","modified_gmt":"2014-12-04T21:03:39","slug":"how-to-synchronize-backtesting-setup-on-different-computers","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2014\/11\/27\/how-to-synchronize-backtesting-setup-on-different-computers\/","title":{"rendered":"How to synchronize backtesting setup on different computers"},"content":{"rendered":"

When comparing the output of back-tests obtained from different working machines, it is necessary to make sure that all aspects of our testing are identical, including:<\/p>

  1. the database
  2. the formula used for testing
  3. the settings<\/ol>

    In order to synchronize data – the best is to copy the entire local database folder. Using just the same data source, especially if it is real-time feed may not be enough due to different array lengths or some corrections that may have been applied in historical data on data-vendors server in between.<\/p>

    In case of any differences in results between two computers that is the very fist thing to check, as different input would result in different output. <\/p>

    To find out that the data are different you may simply create a checksum of data columns, using code like shown below:<\/p>Filter <\/span>= <\/span>Status<\/span>(<\/span>"lastbarinrange"<\/span>);
    <\/span>AddColumn<\/span>( <\/span>Cum<\/span>( <\/span>High <\/span>+ <\/span>Low <\/span>+ <\/span>Close <\/span>+ <\/span>Open <\/span>), <\/span>"Price checksum"<\/span>);
    <\/span>AddColumn<\/span>( <\/span>Cum<\/span>( <\/span>Volume <\/span>), <\/span>"Volume checksum" <\/span>);
    <\/span>AddColumn<\/span>( <\/span>BarIndex<\/span>(), <\/span>"Number of bars"<\/span>);
    <\/span>AddSummaryRows<\/span>( <\/span>1 <\/span>); <\/span>\/\/ add total sum of column<\/code>

    By running this code on both computers you can compare checksums to see if they are the same.<\/p>

    In order to transfer the formula and settings to the other machine it is enough to:<\/p>

    1. select Analysis<\/strong> window
    2. use File->Save<\/strong> from the main menu and save the APX<\/strong> file
    3. open the same APX<\/strong> file on the other computer<\/ol>

      If data, code and settings are identical, then the obtained results will also stay in sync.<\/p>","protected":false},"excerpt":{"rendered":"

      When comparing the output of back-tests obtained from different working machines, it is necessary to make sure that all aspects of our testing are identical, including:the databasethe formula used for testingthe settingsIn order to synchronize data – the best is to copy the entire local database folder. Using just the same data source, especially if […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[41],"tags":[15,52],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/742"}],"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=742"}],"version-history":[{"count":2,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/742\/revisions"}],"predecessor-version":[{"id":746,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/742\/revisions\/746"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}