I'm backtesting quite a complex strategy using trueFX tick data for multiple years on every tick using MT4. Obviously, this is a lot of number crunching.
When the backtest starts it will do the first six months or so very quickly, then gradually slow down.
If I break the 8 years up into individual years and test each year on its own, it will do each year fairly quickly so it's not a problem with volume or data. if i extend the test to two years, it does the first bit fast then gradually slows down. Testing the whole lot starts fast then ends up at a glacial pace (imagine a 10 day backtest). I've removed all printing to the log and any history loops are limited in terms of the number of trades rather than viewing the whole trade history. I've split all functions that need to be processed by each tick from the functions that can be performed each bar or each week.
any tips to try other than breaking the test up into small tests?
has anyone overcome this problem themselves and how?
regards
M
When the backtest starts it will do the first six months or so very quickly, then gradually slow down.
If I break the 8 years up into individual years and test each year on its own, it will do each year fairly quickly so it's not a problem with volume or data. if i extend the test to two years, it does the first bit fast then gradually slows down. Testing the whole lot starts fast then ends up at a glacial pace (imagine a 10 day backtest). I've removed all printing to the log and any history loops are limited in terms of the number of trades rather than viewing the whole trade history. I've split all functions that need to be processed by each tick from the functions that can be performed each bar or each week.
any tips to try other than breaking the test up into small tests?
has anyone overcome this problem themselves and how?
regards
M