Backtest result different on new system

Question: Does AmiBroker in later versions use a higher precision for quote data?

Background: I'm moving to a new laptop and ensuring my system development remains consistent. So far my testing shows a smallish variation between the new and old systems when back testing identical code for a single trade. A larger variation appears for a system across many years and symbols. Back test settings are identical.

The old system uses version 6.00.2 x64, the new is 6.30.5. x64. Both use the same Norgate Data. Inspecting the trade list the first different is this:
Old system: Entry price = 0.222775. Shares = 7478.89
New system: Entry price = 0.2227753. Shares = 7481.382

The quote editor in both systems shows 0.2227753

Different hardware or even different compiler version etc for the same source code can produce slight variation as noted here.

1 Like

Well that is poor. I don't see Microsoft providing disclaimers for Excel and SQL Server for such behavior. I have a reasonable expectation for the same result across almost identical platforms. Two Dell Latitude laptops, one with a Core I5 Windows 10 the other Core I7 Windows 7.

I feel the difference is AMI Broker code and not so much the hardware.

First and foremost you need to do this:
http://www.amibroker.com/kb/2014/11/27/how-to-synchronize-backtesting-setup-on-different-computers/
(calculate CHECKSUM).

If you are getting different CHECKSUM then your INPUT data are different (note that data may be different because of different SETTINGS, like padding).

Second thing check the commissions on both systems (look at DETAILED LOG), because from the results it seems like you may have different commissions set in those two systems) so they affect number of shares (because position size may be shrunk for commission)

If your input is the same read below.

Oh really? Did you bother to Google?
Yes Microsoft has "disclaimers":

Version 6.00 x64 was compiled with Microsoft Visual C++ 2005.
Version 6.30.5 is compiled with Microsoft Visual C++ 2017.
Here is what Microsoft says about THEIR product (compiler):
https://docs.microsoft.com/en-us/cpp/porting/floating-point-migration-issues?view=vs-2019

Let me quote Microsoft:

In most cases, the floating-point changes in the newest compilers and libraries result in faster or more correct behavior, or both.

Ask Microsoft, if "more correct" is correct, or "more but not yet entirely correct".

Sorry, I am not responsible for Microsoft errors.

Anyway, as Microsoft wrote, you should treat results that you get from 6.30.5 as "more correct".

7 Likes

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.