backtesting is slow
Created at 29 Jun 2016, 02:01
backtesting is slow
29 Jun 2016, 02:01
I am backtesting a cbot and it is extremely slow. What can I do to figure out why and improve performance?
moneybiz
29 Jun 2016, 11:59
RE:
lec0456 said:
I think it is normal if your bot works with tick data. It means on every tick received all bot logic is reprocessed. Sometimes there are 5-6 ticks in a second and you bot must be able to process all the 6 ticks in 1 second. If you can't then you're losing the market information.
Better do some benchmarking to see where the code performs poorly. See here.
If you are for example enumerating positions many times to calculate different data try to calculate them inside a single loop. Try to optimize the code.
I also use tick data for botting and yes it's really slow, that's why i test 1 week - 10 days max. It gives me a general idea how the forward performance will be.
There is nothing much to tell than optimize.
@moneybiz