Zorro Slow Performance

Posted By: bot

Zorro Slow Performance - 01/04/21 22:53

Hi, I am trying to check the performance of Zorro but I do not see the performance claims made throughout the Zorro website:

"Test your strategies with the world's fastest tick-level backtester (2 seconds for 10 years) in high accuracy - including commissions, swaps, spreads, slippage, margins, interest, market hours, and holidays"

I tried Workshop 4 and some of the others with a 5 minute BarPeriod on EUR/USD over 6 years taking 60+ seconds to run.

Can you please describe why the performance seen is so slow?

I even tried the DLL Strategy but the performance is almost the same.
Posted By: Petra

Re: Zorro Slow Performance - 01/05/21 15:08

I get in fact 0.7 seconds instead of 2 seconds, but the new version is a bit faster and I have a fast PC laugh. You should get 2 sec with the release. The benchmark script is included in the installation.
Posted By: bot

Re: Zorro Slow Performance - 01/11/21 00:50

I am not even getting 2 seconds, but 60 seconds for the whole test.

Mine is just basic install with running Workshop 4 - that's it.

Are you getting 0.7 seconds for whole test covering 10 years with BarPeriod of 1 second? What is the BarPeriod? What are the start and end dates? Can you share your script please?

Also, which version number is fastest?
Posted By: AndrewAMD

Re: Zorro Slow Performance - 01/12/21 01:48

The Benchmark script is the basis of the Benchmark. Maybe you should run the Benchmark script to check the Benchmark.

1.015 seconds here, using an ordinary i7-2600 CPU.
Posted By: bot

Re: Zorro Slow Performance - 01/13/21 00:10

The following is with Zorro 2.34.5 beta:

With Benchmark script as is I get 1.317 sec.

When I change the BarPeriod from 60 to 1 minute in the same script, time goes up to 15.205 sec.

Also, the actual running time as per my stop watch is lot higher, so I assume the time is only capturing time spent for run() start and end.

"Test your strategies with the world's fastest tick-level backtester (2 seconds for 10 years) in high accuracy - including commissions, swaps, spreads, slippage, margins, interest, market hours, and holidays"

Does it mean the above is misleading as its not actually running a tick level tests but just once every hour for the purpose of the testing?
Posted By: AndrewAMD

Re: Zorro Slow Performance - 01/13/21 01:22

No, bars are set to one-hour, but you still acquire every tick via the tick() function. This is because the TICKS flags was set at the top of run().

Flags are documented here:
https://manual.zorro-project.com/mode.htm

Bars vs ticks:
https://zorro-project.com/manual/en/bars.htm

tick() function:
https://zorro-project.com/manual/en/tick.htm

Pro tip: You can make the benchmark even faster by removing the TICKS flag. This brings it down from 1.0 seconds to about 0.25 seconds on my CPU.
Posted By: bot

Re: Zorro Slow Performance - 01/13/21 22:02

I added a tick() function to count how often it is getting called and found its being called only once per minute. Ticks are more granular than just 1 every minute.

For EUR/USD the tick() was called 3,709,192 times for 10 years of data. In 10 years there are 3,744,000 minutes excluding weekends.

So it is not really tick level but simply 1 minutes. Also the benchmark does not even have any function for ticks - this test is entirely misleading especially with this claim about "tick-level" performance.

Overall its just an hourly bar test on RSI. There is no logic on TICK.
Posted By: AndrewAMD

Re: Zorro Slow Performance - 01/13/21 22:39

In this case, the ticks being supplied are minutely T6 ticks. So every tick is being evaluated. You can change the History variable to load a T1 tick file instead. The Zorro website has some sample tick-by-tick data for EUR/USD that you can extract into the History folder.

History string variable:
https://zorro-project.com/manual/en/script.htm
Originally Posted by bot
There is no logic on TICK.
There is no user-supplied logic in particular. Nonetheless, Zorro is still checking for stop losses and take profit on every tick, so there is tick logic.
Posted By: Zheka

Re: Zorro Slow Performance - 01/14/21 02:13

...But the FAST flag - added to speed-up the benchmark - "produces" wrong results for this single-asset backtest (which it shouldn't);
Removing it makes both the speed and results more sensible.
Posted By: bot

Re: Zorro Slow Performance - 01/27/21 02:18

Originally Posted by AndrewAMD
In this case, the ticks being supplied are minutely T6 ticks. So every tick is being evaluated. You can change the History variable to load a T1 tick file instead. The Zorro website has some sample tick-by-tick data for EUR/USD that you can extract into the History folder.

History string variable:
https://zorro-project.com/manual/en/script.htm
Originally Posted by bot
There is no logic on TICK.
There is no user-supplied logic in particular. Nonetheless, Zorro is still checking for stop losses and take profit on every tick, so there is tick logic.


The benchmark is not based TICK, bar period is not even a minute, but an hour.

The benchmark as is runs on 60 minute BarPeriod. When I change to 1 minute BarPeriod, time goes up to 15.205 sec. Which is not close to 2 seconds.
© 2024 lite-C Forums