Computer performance for backtesting

Forums ProRealTime English forum ProRealTime platform support Computer performance for backtesting

  • This topic has 10 replies, 4 voices, and was last updated 7 years ago by avatarLeo.
Viewing 11 posts - 1 through 11 (of 11 total)
  • #18432

    Hi guys

    What computer do you guys suggest to get if you want to do back testing? At the time being I use a Mac laptop, but it takes for ever to run large back tests.

    I am really not a computer wiz so any suggesting is appreciated!!

    /Yngve

     

    #18433

    Unless I am mistaken, backtesting is done on PRT servers, so even with a very powerful computer, a large backtest remains a large backtest that takes a long time…

    Optimising your backtests codes might be a first step so that they run faster on PRT servers. Common tips are: reduce the amount of loops (for to next, while do wend…), avoid as much as possible the CALL function and instead type the piece of code of the called code inside the backtest code itself, if a calculation is done several times, store it in a variable ( a= b*c) because the code will be faster looking for value of a each time it’s needed than calculating b*c… group the conditions for “if then else endif” statements whenever possible rather than writing tons of if statement with just one condition each…

    That’s just from the top of my head but it feels like there’s a couple of other tips making codes run faster in PRT. Maybe a “search” within PRC would make other topics about it come up with more tips.

    A more powerful computer would mostly improve how many windows and indicators and probuilder codes you can run simultaneously, but I’m really not that sure it would help as much as you’d like for large backtest. Maybe Nicolas could bring another point of view here.

    #18440

    My backtests are loads slower over the last several days. I thought it was due to ‘poor code’ Nooby mentions above, but maybe PRT have been throttling back on their servers?

    Maybe we need an ‘teach-in article’ re good coding practice in relation to slow Backtests?

    So to avoid the CALL function do we dump the Indicator code at the bottom of the AutoBot (?) then what?? Do we still use the CALL function? Any possibility of doing a ‘worked example’ Nooby please? Bot with CALL and same Bot without CALL.

    Many Thanks
    GraHal

     

     

    #18443

    In the manual “Trading systems probacktest/proorder” https://www.prorealtime.com/en/pdf/probacktest.pdf?c1465474991c

    pages 23 to 26 are a “must read” in full on the subject of code optimisation.

    Page 23-24 for variable optimisation

    Page 24 for reducing number of same CALL’s when one would be enough

    Page 25 is at the same time a great example and a very simple example of how to get rid of a CALL to a code using itself another CALL, for in the end having no CALL at all and saving a lot of time. It’s probably the bext example “with call” and “without call” you could find.

    Page 26 has examples of “if then endif” optimisation and when could a “for to next” loop be replaced by another way of coding costing less computational time

    1 user thanked author for this post.
    #18455

    Thanks for all the replies, I have been running a back test all day now and it’s still not finishes. Started it around 8 am now its 2pm, is this normal?

    I think I’m pretty close to max allowed parameters.

    1 user thanked author for this post.
    #18456

    Great, thanks Noob!

    I’ll read those pages. I did scan read the whole manual when I started, but seems I’ve forgotten how comprehensive the info is … I need to check out the whole Manual again! 🙂

    Cheers
    GraHal

     

    #18493

    Ha … I was reading too much into it … I often don’t get jokes for the same reason! 🙂

    When calling ‘Personal Indicators’ using CALL …  I thought something special is involved compared to PRT Indicators.

    I just converted the ‘PRC_VolatilityQualityZeroline’ off here … was 4 Calls, now 1, easy 🙂

    Many Thanks Noob
    GraHal

     

    #18513

    It occured to me in bed (getting worried now, thinking about coding in bed!) I’d swung the other way and over simplified by replacing 4 CALLS with 1.  Overall the BOT was probably still calling 4 times??

    In slower time I perused Noobs post / Ref to the Manual and then read Page 25 … I then realised that to avoid any CALLs at all I need to  insert the Indicator code inside the backtest code itself.

    It turned out to be not ‘quite so easy’ (few minutes) due to the position to name the Indicator Code as ‘MyVol’ in the Bot Code (due to loads of variables).  In this example (PRC VolatilityQZero) I had to insert ‘MyVol = sumVqi’ at the end of the Indicator Code (not at the start … as shown on Page 25).

    Hope above makes sense (just say if not) and is useful to others reading this.

    As I’ve always found … I learned more by making mistakes than by getting it right first time.

    GraHal

    #38571
    Leo

    Hi all,

    I am thinking to buy a new computer.

    As long as probacktests are in the PRT servers, then is not so important to have a vey powerfull and therefore expensive computer, Is this correct?

    Thanks for your sugestions.

     

    #38588

    Yes that is correct Leito. I’m sure you have read Noobywan’s  post with good suggestions above?

     

     

    #50466
    Leo

    Has someone of you, try to use prorealtime in a Standard  Windows tablet ? (with Standard I mean a tablet cheaper that 400 €).

    Thank i a

     

Viewing 11 posts - 1 through 11 (of 11 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login