Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 177 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to improve backtest speed #469898
12/13/17 00:08
12/13/17 00:08
Joined: Nov 2017
Posts: 39
Germany
E
easyX Offline OP
Newbie
easyX  Offline OP
Newbie
E

Joined: Nov 2017
Posts: 39
Germany
Hi, i am testing Zorro at the moment, doing some backtest speed tests.

My setting is a simple script entering one trade per day at a certain time and closing the trade at the same day (also fixed time). The test is with M1 bars.

Now i tested a bit.. first simple script took me 3 min to test it (8 years). Removing Monte Carlo made it much shorter already (for quick tests i dont need that, only for close-to-final tests).

Now i used Bar+=15 (skipping bars) - before, (between) and after my (fixed) trading times. This reduced backtest speed to just ~ 20s BUT this method makes the Result Graph buggy (blue equity chart is missing many bars)


I figured out that every run() is taking some time, so i would like to know if there is an option to skip everthing for e.g certain hours of the day.
So it would just run - run() during my market hours where i want to trade. StartMarket doesn't seem to work this way,
it does not increase the performance. Is there a way to do so? Are there any other tricks and tips for backtest performance?

Last edited by easyX; 12/13/17 00:14.
Re: How to improve backtest speed [Re: easyX] #469899
12/13/17 05:14
12/13/17 05:14
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Its no good idea to skip bars, because you get gaps in all plotted curves and your indicators are wrong. No surprise that your graph looks bad. Historical data has anyway only bars where prices change, better don't miss them in the backtest.

For realistic backtests with M1 bars you normally need tick data, M1 data is not precise enough.

Re: How to improve backtest speed [Re: Petra] #469908
12/13/17 10:50
12/13/17 10:50
Joined: Nov 2017
Posts: 39
Germany
E
easyX Offline OP
Newbie
easyX  Offline OP
Newbie
E

Joined: Nov 2017
Posts: 39
Germany
The point is, sometimes i need/want to enter a trade e.g 11:52 no matter of everthing else, so i need m1 data, but not to be precise enough. I am more then happy with M1 OHLC data, i just like to double check with tick data at the end, but its not a big difference.

The point is just with all run()'s of M1, even if you do nothing during 99.9% of all cases, it slows down the backtest speed frown It's not faster then mql5 with this basic setup. smirk

So there is no way to tell my script hours where it does not trade and not even to run the run() function? Like the skip monday thing.

Last edited by easyX; 12/13/17 10:52.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1