ProBacktest extremely slow
Forums › ProRealTime English forum › ProOrder support › ProBacktest extremely slow
- This topic has 52 replies, 14 voices, and was last updated 3 years ago by robertogozzi.
-
-
01/10/2021 at 1:03 PM #157193
I wich PRT could have a separate module wich you could download and do these calculations locally! The only reason I switched to PRT was to be able to trade IGs markets.
I don’t understand why is not possible to run backtest on own PC.
I’d say we have two options for improvement :
- Get yourself a license of PRT-“Direct”, BUT with the notice that this generally does not work with CFD’s (Forex soon will). The difference should not be too large *if* you don’t curve-fit too much. You now can apply your backtesting in PRT-Direct and later move the result to live in PRT-IG. You could run the forward backtest live in PRT-IG first, if you want. Or Papertrade it.
I don’t think this will be more expensive, though things need to change at PRT (they may not like that). - Be aware that the “local” option exists after all, but that it may require a 1000 requests towards PRT to engage this option for this reason. Notice that I am pretty sure that this option will only exist for IBKR data (thus it again requires the PRT-Direct license).
Officially this won’t be made available to the public, but I have worked with it, so it really exists …
Ad 2.: Personally I would not go that far because my PRT-Direct is fast enough for me. But this is personal and will depend how crazy you are with the number of variables and the resulting combinations per time. For example, I may have 40-50 variables, but I usually combine 2 only. Or even 1. And on top of it, with 1M bars indeed.
01/10/2021 at 1:07 PM #157194I rarely do any optimisation on > 10k bars
Yes. But if I would do that, I’d end up at Friday evening 9pm (8pm UK) or so. Even if it would still be Friday right now. Haha.
1 second strategies …01/10/2021 at 1:17 PM #157196But does nobody have an idea *what* is actually causing the more slowness ? Thus, what you contentually may change to fasten thing up. If we know that we could better describe to PRT what to look into. Without ideas they are obviously blind.
A hint perhaps : I recall that at some stage (for V11 AFAIK) the CALL speed was improved (this was a kind of Release Note). Next I recall (but not sure) that some things would not work out (this is related to “compilation”) and that we went back to the old speed. So … So you could try to remove Indicator code (back) towards your main code. At least that is what I do when it is feasible and this really helps.
In itself this is nothing new, but you could notice that the CALLs make this difference far more than previously. Again, it is just an example.01/10/2021 at 1:20 PM #157197But does nobody have an idea *what* is actually causing the more slowness ?
If somebody who has the issues would be willing to post their slow code, or if not pubically, then send it to a moderator, I think they will get a better response.
01/10/2021 at 1:48 PM #157198Maybe it is good for you guys to have a reference. See the attachment.
PRT-IB (I call that PRT-Direct).
This is 141 combinations out of two variables.
It is with 1M candles (1 second).
On average something like 700 trades come from this (this is also important). Of course this counts for each iteration.
It is Sunday now, so all quiet and I suppose more bandwidth is available for backtesting (but no idea really).
The code is more than 2K lines, including comment. 😉I clocked it, and it took 11 minutes 10 seconds.
Bringing the (one) result to the chart takes an additional 39 seconds. Please notice that already this can be totally killing (as in : 20 minutes) if I only start graphing to the price area (GraphOnPrice).I just ran another test with 41 iterations for a single variable, and that runs in 3m40. So it is rather linear.
Dear people, I do this for myself just the same. If I can gain more than 50% on speed, I have more weekend too. We are all only always waiting …
1 user thanked author for this post.
01/10/2021 at 3:19 PM #157210I now opened an old template on Dax, 200k, 2 Equity curves of Mother of dragons v3 & v2.2a just to make an example. It took 3m 6s to print the first Equity curve on the screen and the second was done after 5m 43s. This is a template that I have opened many times Before on prt v10.3 with 200k and not even reflected over any loading time.
with 1M bars I was of course expecting it to take longer time to test on 1M bars then on 200k. I didn´t expect it to be impossible to test on 1M bars and now much slower also on 200k…Something must have changed!
1 user thanked author for this post.
01/10/2021 at 3:26 PM #157211Thanks, guys, for the discussion!
My point is that the very same strategies that took about 10 seconds for backtesting (no optimizatons, only a simple backtest over approx. 200k bars) a few weeks/months ago, now take 3-5 minutes. Maybe it has to do with the launching of PRT ver.11, I don’t know. Maybe the number of users has increased(?). Whatever the reason, PRT and/or IG needs to fix this issue, otherwise it will be difficult to develop new strategies or re-eveluate existing ones…
01/10/2021 at 7:01 PM #15722301/11/2021 at 8:37 AM #157264Usually, backtests take longer after office hours and during the weekend. Heavy charge on backtests servers is the main reason why. BTW, I’ll try to get infos on what happened during this specific weekend and let you know.
Could someone tell me if the slowness is the same today as it was on Saturday please?
01/11/2021 at 2:06 PM #157332Could someone tell me if the slowness is the same today as it was on Saturday please?
I have just done the same test as in #157210. Now 2m 40s to print the first Equity curve on the screen and the second was done after 3m 13s. It´s faster but still VERY slow compared to how it used to be. The problem isn´t this saturday, it´s since v11 was launched!
01/11/2021 at 3:08 PM #157354I confirm the global slowness of v11. It may last up to several minutes to load a strategy (without optimization). Records for me have been for WTI or Brent strategies (IG CFD) that last > 10 minutes.
Optimizations are slower too but it is at least partly due to the biggest amount of historical data.
I have tried some optimizations on Brent and WTI and sometimes the optimization window displayed zero trade… and then I close the graph, re-load the same graph, I start the optimization again and it works properly.
V11 seems to be very “sensitive”
01/11/2021 at 7:35 PM #157399and then I close the graph, re-load the same graph, I start the optimization again and it works properly.
Yes I’ve had above many times with v11.
01/12/2021 at 10:04 AM #157473Thanks, Nicolas, for looking into this issue. I can confirm that the backtesting speed is slightly faster at the moment (Tues morning) than on the weekend, but nowhere near as fast as it used to be before PRT ver.11 was launched. I hope this can be resolved soon! It severely compromises the development of automated trading systems…
01/12/2021 at 12:37 PM #157521We are investigating on performance issues and making comparison between platforms versions.
Is it possible for you to share some ITF files that have real and noticeable differences in order to check on our own (both ITF and me). Thanks in advance!
01/12/2021 at 1:49 PM #157548Well, 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. But there it completely blows up itself. A 3rd time in PRT-IG-V10.3 just doesn’t come up with any answers (I stopped it after 8 minutes). But as said, it blows up in the IG versions.
After this (same PC – no reboot) the IB version again takes 8 seconds.As in : don’t try this at home – see the attachment. I won’t post the code as everybody may try it and everything blows up (which will stop me from trading -haha).
Anyway, this is to rigorous and too heavy on the (number of) trades.
Edit : … which could be telling. With IG all may go too indirectly ? (just guessing)
- Get yourself a license of PRT-“Direct”, BUT with the notice that this generally does not work with CFD’s (Forex soon will). The difference should not be too large *if* you don’t curve-fit too much. You now can apply your backtesting in PRT-Direct and later move the result to live in PRT-IG. You could run the forward backtest live in PRT-IG first, if you want. Or Papertrade it.
-
AuthorPosts
Find exclusive trading pro-tools on