ProBacktest extremely slow

Viewing 15 posts - 31 through 45 (of 53 total)
  • Author
    Posts
  • #157554 quote
    Monochrome
    Participant
    Senior

    Same problem as everyone here. Backtesting has become tediously slow. Never had this problem with 10.3.

    #157575 quote
    Nicolas
    Keymaster
    Master

    I have one for you which takes 8 seconds in PRT-IB-V11. It takes 1:34 (one minute and a half) in PRT-IG-V11.

    Interesting comment, thank you. The first thing that come to mind is the servers loads, since automatic trading is only possible with IG, most people are doing their backtests on IG accounts / servers. But, yes that’s almost 12 times longer, that’s why we need more examples and codes in order to precisely find where is the bottle neck and how we could make things better.

    #157697 quote
    Frankyboy
    Participant
    Average

    The backtest speed seems to have improved by now. Attached is a trading system (the famous RSI2 by Larry Connors for the S&P – I programmed it for a 1h-chart, but it uses MTF to get the daily values for indicators – I had noticed that MTF strategies were slower than others). This strategy was extremely slow this past weekend (several minutes to load), still slow on Mon and Tues, but much faster today, almost as fast as it used to be in PRT10.3 times. I hope the speed issues got resolved and it stays like this also during weekends (as it used to be in PRT10.3 times).

    Thanks again for your efforts, Nicolas!

    Nicolas thanked this post
    #157757 quote
    Nicolas
    Keymaster
    Master

    This is indeed a result of our investigations. Thanks also for your reports, we have found “small” things that can lead here and there to limit the backtests results to come faster or at least the same way that they did in previous version.

    More improvements will come also after this first step, they need more kernel modifications of the backtest engine, but we should not wait too much I think.

    GraHal and Frankyboy thanked this post
    #158160 quote
    Monochrome
    Participant
    Senior

    Backtesting taking over 10min…. Maybe it dosent do well with loop code?

    #158255 quote
    Nicolas
    Keymaster
    Master

    @Monochrome

    Please provide a sample code in order to understand why! 😉

    #158288 quote
    Monochrome
    Participant
    Senior

    I tested without this code, it loaded in seconds. With this code…minutes.

    Dindex = ((exponentialaverage[10](close)-exponentialaverage[100](close))/exponentialaverage[100](close))*100
    
    IF DINDEX CROSSES OVER 0 THEN
    FLAG1 = BARINDEX
    ENDIF
    IF DINDEX CROSSES UNDER 0 THEN
    FLAG1 = 0
    ENDIF
    IF DINDEX > 0 THEN
    A1 = HIGHEST[max(1,BARINDEX-FLAG1)](DINDEX)
    ELSE
    A1 = 0
    ENDIF
    
    a20 = barindex-flag1
    flag2 = 0
    for a = 0 to a20-1
    if dindex[a] = a1 then
    flag2 = barindex[a]
    break
    endif
    next
    
    IF DINDEX > 0 THEN
    A1A = LOWEST[max(1,BARINDEX-FLAG2)](DINDEX)
    ELSE
    A1A = 0
    ENDIF

    Hope its resolved soon.

    Thank you

    #160115 quote
    Nicolas
    Keymaster
    Master

    FYI, a new build has been pushed live yesterday for IG accounts, it should improve the backtests speed. I’d like to get your feels about it, could you please give here your feedbacks please? Thanks!

    GraHal and Midlanddave thanked this post
    #160142 quote
    Paul
    Participant
    Master

    Optimisation crashed…Started last night and was a heavy one but running strong. Come back the the computer 6 hours later and everything was gone. Lost my new created strategy.Made saves in between but still…not enough.

    #160143 quote
    GraHal
    Participant
    Master

    Made saves in between but still…not enough.

    Commiserations, but how did you (try) and save … so we all know how not to do it?

    Backtest is at a standstill for me currently and I am only testing 40 combinations over 100k bars!

    #160147 quote
    nonetheless
    Participant
    Master

    I presume he just means Ctrl-S, which should save all your changes inc algos and optimizations … but of course it doesn’t. Export is the surest option, but that often causes crashes. Copying to Notepad has saved me a few times, but it’s a bore to have to do it.

    Personally I find backtests to be running a bit faster today.

    #160148 quote
    GraHal
    Participant
    Master

    Backtest is at a standstill for me currently

    Mmm Quit PC No 1 and logged into PC No 2 and the 40 x 100k bars backtested ran in a few seconds (as I would expect).

    I had completed about 10 or so backtests on PC No 1 and they were getting slower each new backtest  I did.

    My hypothesis is that processes are not being fully shut down / exited on the PRT server and so these hanging processes build up to some level which prevents further work!?

    My workaround is going to be – File > Quit > Save and Exit – after every 3 backtest until the above hanging is no longer experienced.

    #160151 quote
    GraHal
    Participant
    Master

    Ctrl-S, which should save all your changes inc algos and optimizations … but of course it doesn’t

    As a trial I entered fixed value = 34 into the Definition of Variables (DoV) window, closed the DoV window, closed the Code Editor, then did File > Quit > Exit without Saving.

    I then logged back in and checked and the fixed value = 34 had been saved (even though I clicked Exit without Saving).

    My hypothesis is that when the non-function limit (see my previous post) is reached then lots of PRT functions stop working correctly??

    #160155 quote
    GraHal
    Participant
    Master

    Ooops I omitted red text in above …

    As a trial I entered fixed value = 34 into the Definition of Variables (DoV) window, closed the DoV window, closed the Code Editor, then did Ctrl+S, then did File > Quit > Exit without Saving.

    #160156 quote
    nonetheless
    Participant
    Master

    good to know ctrl-s works at least some of the time 😁

    GraHal thanked this post
Viewing 15 posts - 31 through 45 (of 53 total)
  • You must be logged in to reply to this topic.

ProBacktest extremely slow


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Frankyboy @frankyboy Participant
Summary

This topic contains 52 replies,
has 14 voices, and was last updated by robertogozzi
5 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/09/2021
Status: Active
Attachments: 3 files
Logo Logo
Loading...