Different Results: 32bit Standard and 64bit Professional


How can that be?



All possibilities described here http://www.amibroker.com/kb/2014/05/07/why-do-backtest-results-change/ are unapplicable in this case.


The screenshot shows two different afl formulas: Formula42.afl and Formula43.afl. It is also possible the backtest settings are different. Try saving the formula and settings in an apx file (file > save as). Then open the same apx file in each copy of AmiBroker and repeat the test. If you still see differences, examine and compare the backtest detail logs.


@Steve is right. You should take his advice very seriously.

But then, one needs to know that 32-bit code uses x87 FPU which uses 80bit floating point arithmetic for all intermediate operations while 64-bit code uses SSE2 instructions that use 64-bit floating point arithmetic.
Due to different hardware, results might very sligthly differ in edge cases see https://randomascii.wordpress.com/2013/07/16/floating-point-determinism/
and all the others

Getting large-scale differences is extremely rare, but it can happen.

32-bit and 64-bit are using different compiler, but even same compiler can produce different results if you change optimizer options (I mean code generator optimizer), so this should surprise no-one. If system produces different results due to rounding differences between 80bit FPU and 64bit SSE2 (that differ at 15th significant digit) it just tells that it is extremely fragile and should not be traded at all.


Very interesting readings. Thanks