View Full Version : Backtesting performance seems to be broken
maxima
04-25-2010, 06:37 AM
I used backtesting and optimisation few betas ago. It was blazing fast.
I tried it now and it is very slow.
2 things are slow - the backtesting itself (on tick charts) and rendering the results.
For example (and I think this is irrelevant to the strategy I test) - I have 100 trades in the result set. If I click on Graphs tab it takes 5 min to open it.
I use 64-bit for the backtesting. My PC is i7 with 6GB DD3 RAM.
It could be argued that my indicators can be heavy etc but I feel that comparing to what it was 2 months ago - it is now very slow. Something got broken.
Consider this whistle-blowing. And I hope I am wrong :)
NinjaTrader_Bertrand
04-26-2010, 08:10 AM
maxima, thanks for reporting in - are you sure you're not comparing a backtest on stored tickdata with a backtest on data in the cache already prepared / saved for reuse with the session template selected?
Do you see the same observations when testing your tick chart intervals with the default SampleMACrossOver strategy?
Thanks
maxima
04-26-2010, 09:09 AM
could you please explain about session template?
I use Default 24/7 which came with NT. My assumption was is that once you run test for say T123 then next time you run same instrument with same 123 value it has to be already chached... What role is session template plays here?
And the speed of backtesting could vary from strategy to strategy depends on complexity of using indicators.... but how come pulling results of 100 trades into Graph tab takes 5 minutes!?
I will test crossover in a minute
NinjaTrader_Bertrand
04-26-2010, 11:11 AM
Thanks maxima, please let me know if you see the same with our default test strategy.
Correct, the cache would be build for the accessed market, granularity and session template, so if you rerun on same interval / session settings it would speed up the data loading process to prepare for backtesting / optimization dramatically.
maxima
04-26-2010, 12:49 PM
OK. this is something down to my indicators. one of them is CPU hungry.
The Simple MA Cross works fast on the second run.
However my strat needs few minutes to run 1 month. But what is disappointing is that when you try to see the results it seems that the Strat Analyzer is painting all the indicators from scratch (even you want to see Graphs only)....
Could you please put it on your future list - to check if you can skip some extensive indicator works after the optimiser finished....
NinjaTrader_Bertrand
04-26-2010, 12:54 PM
maxima, thanks for your feedback - couldn't you just use a 'SA fitted' strategy version that would not visualize any of your indicators on the chart?
maxima
04-26-2010, 12:56 PM
sorry - I never heard about it.. Whats that? SA fitted?
NinjaTrader_Bertrand
04-26-2010, 01:00 PM
Just a term I coined for a version of your strategy that would not plot anything to be optimized for SA backtesting performance / easy of use.