Optimization Speed with Back test very slow

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #214693 quote
    Johann
    Participant
    Average

    Hi PRT Team,

    I have for the first time experienced very slow optimization speed with back tests, since Friday last week. Even if my permutations are limited to 100 options/outcomes. Do anyone else have the same problem at the moment or is there something I can do. Al my hardware and software is exactly the same as before for the last 5 years.

    Thank you in advance.

    #214694 quote
    PeterSt
    Participant
    Master

    Hi Johann,

    Is this V12 or V11.1 ?

    PRT-IG or PRT-IB(KR) ?

    Is this for a “Seconds” timeframe and did you perhaps change recently from larger TimeFrames ?

    Is it the calculation of the backtest (the optimization) or is it the showing of the (Detailed Report) result ?


    I did not notice any change, but have been on PRT-IB and V12 only for the past month or so.

    Regards,
    Peter

    Johann thanked this post
    #214696 quote
    Nicolas
    Keymaster
    Master

    You might experience slowdowns during the weekend, especially when many users are doing optimizations at the same time. Is it still the case today?

    Johann thanked this post
    #214702 quote
    Johann
    Participant
    Average

    Hi PeterSt,

    Thanks for responding. I am using 11.1 on IG Markets. It is the report that takes long. Usually on 100 permutations it takes no longer than 5 minutes now it takes 4 times as long on a 100k bars in the 5minute timeframe.

    #214703 quote
    Johann
    Participant
    Average

    Yes even right now, but if no one else has the problem I will try and reboot everything…?

    #214713 quote
    PeterSt
    Participant
    Master

    It is the report that takes long.

    Johann, if that is literal, like the showing what you see below – it can well be about internal “errors” in what you apply. It can even combine with the Optimization where “error” as such is not reported but “error trapped” which takes a relative enormous amount of time (the error may occur at each bar and you let pass 100K of them for one iteration (permutation)).

    • Go back to a strategy (of preferably the same but in older fashion) from a time period all was still fine. Does it work well now again ? then try to find something which you caused since and what the PRT backtesting engine may have difficulty with. One simple example : using a color tag at a graph command which tag does not exist (e.g. BLEU instead of BLUE).
    Johann thanked this post
    image_2023-05-15_123532187.png image_2023-05-15_123532187.png
    #214734 quote
    aldtrading
    Participant
    New

    Does the loading bar takes the same amount of time (or even more) from 100% to the exiting of the loading state than from  from 1% to 100% for anyone else? Is it normal behavior?

    #214739 quote
    GraHal
    Participant
    Master

    from 100% to the exiting of the loading state

    Generally only a few seconds, but can be maybe near a minute on some strategies.

    Maybe the longer times are due to many users or throttled back server performance (during maintenance etc).

    Have you tried the whole process – Opti and loading – on a really simple Algo?

    Try this off the ChatGPT Thread, time it at opti then load over 100K bars at 5 min TF on DJI and then I’ll do the same and we compare?

    Just opti these at 10 100 10 each

    ShortTermLength = 9

    LongTermLength = 21

    // Setting the parameters for the Hull Moving Averages
    ShortTermLength = 9
    LongTermLength = 21
     
    TakeProfitX = 50 // adjust this to your liking
    StopLossY = 25 // adjust this to your liking
     
    // Calculate the Hull Moving Averages
    ShortTermHMA = HullAverage[ShortTermLength](close)
    LongTermHMA = HullAverage[LongTermLength](close)
     
    // Identify when the ShortTermHMA changes from decreasing (red) to increasing (green) and LongTermHMA is also increasing
    if (ShortTermHMA[1] < ShortTermHMA[2] and ShortTermHMA > ShortTermHMA[1]) and LongTermHMA > LongTermHMA[1] then
        buy at market
        set target pprofit TakeProfitX
        set stop ploss StopLossY
    endif
    #214740 quote
    GraHal
    Participant
    Master

    I got …

    1.   40 seconds to Optimise
    2.  5 seconds to load
    #214741 quote
    Johann
    Participant
    Average

    Thanks will do and see if it is ok….

    #214746 quote
    GraHal
    Participant
    Master

    I also just did it with 10,000 combos over 100,000 bars on 15 min TF and it took …

    1. 25 mins to Opti
    2. 7 seconds to load
    #214846 quote
    aldtrading
    Participant
    New

    Generally only a few seconds, but can be maybe near a minute on some strategies.

    Maybe the longer times are due to many users or throttled back server performance (during maintenance etc).

    Have you tried the whole process – Opti and loading – on a really simple Algo?

    Try this off the ChatGPT Thread, time it at opti then load over 100K bars at 5 min TF on DJI and then I’ll do the same and we compare?

    Just opti these at 10 100 10 each

    ShortTermLength = 9

    LongTermLength = 21

    Sorry I didn’t have the time to test this until now, I just did it with DJI 100K bars m5 optimising from 10 to 100, 10by10 ShortTermLength and LongTermLength and it took :

    • 14 secs to optimize
    • 3 secs to load

    provided by :

    • optimize you mean: the time it tries every combinations from the first line added to the array until it reaches 100%
    • load you mean: the time it take from when the loading bar disappear after the 100% to when the infos are displayed on the chart and the performance log is opened
    #214848 quote
    GraHal
    Participant
    Master

    So your optimise is not slow at all, you 14 secs and me 40 secs.

    Yes I did mean as you state above in bullet point 4 and 5.

    #214851 quote
    aldtrading
    Participant
    New

    Maybe you should try it again since you tried it 2 days ago, but yeah for that script it seems ok, I guess the script I’m trying to backtest is relatively slow then.

    Still, I don’t understand why PRT remains stuck on 100% for what seems pretty much the same time it took it to go from 1% to 100% (1h+) and continues to optimize and add new lines in the array, isn’t it supposed to stop when he reaches 100%?

    #214855 quote
    GraHal
    Participant
    Master

    remains stuck on 100%

    We can click on a row at any stage of ongoing optimisation, esp when at 100% … we dont have to wait until the equity curve is drawn automatically.

    add new lines in the array, isn’t it supposed to stop when he reaches 100%?

    When opti has been particulary slow, I also have noticed above. but it is rare for these last few lines being added to be better results than those already shown in the Table.

    I guess the opti % has to be to the nearest so when it shows as 100% then it may really be 99.90% and so the few last lines are still being added?

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.

Optimization Speed with Back test very slow


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Johann @johann Participant
Summary

This topic contains 14 replies,
has 5 voices, and was last updated by GraHal
2 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/15/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...