Why does the backtest optimizer sometimes stop before running all simulations?

 

Hi, 

I've been running backtests with optimization, and it's been great a tool to analyze my EA's performance. 

Today i just noticed that the number of results are less than the number of combinations I expected, especially with more complex tests (with more optimization variables).  

For example, my last EA optimization initialized with [0 / 1280] simulations, then it progressed to [1 / 1280] ...then [2 / 1280] ....etc  but when it is was complete, it ended with:  [588 / 1280 (588)]. I'm not sure why this is, or what the additional number in brackets means. I have searched through the documentation and found no explanations. 

Also, the timer starts with [0:00:33 / 3:53:45] ... but when it is done, it ends with: [0:11:01 / 0:12:58].

 Some additional information:

  • The journal shows no errors
  • I am using 99.9% model quality (full data from tickstory)
  • Backtesting the same EA with fewer optimization variables runs to full completion
  • See the attached image for more clarity.

Why do these discrepancies occur, and how can I get my full test results?

Thanks in advance.


Image showing incomplete backtest optimization

 
  1. Completed generic passes / Total non-generic passes (initial estimated generic passes)
  2. Time is an estimate. As more passes occur, the estimate improves.
  3. If you want the total, don't use generic algorithm. It's not going to give you anything better.
 
William Roeder:
  1. Completed generic passes / Total non-generic passes (initial estimated generic passes)
  2. Time is an estimate. As more passes occur, the estimate improves.
  3. If you want the total, don't use generic algorithm. It's not going to give you anything better.

Fantastic. Thanks for this very helpful explanation, @william!
 

I'm not sure that this is necessarily the answer to the question as posed.


I tend to do full algorithm "every tick" back tests (rather than genetic) on promising EAs and sometimes see the test apparently stall without completing and ending up with either a test that says it has completed a few tests short of the number of combinations or just seems to stall and not finish in a pro-rata amount of time, with the percentage completions in the agents list come to an apparent stop.  I use what's now a fairly substantial local server farm so I've always assumed it is down to maybe a resource issue going undetected stalling a thread indefinitely.  It often will finish off if you stop and restart from where it has got to, but sometime I give up with a few missing combinations - never really got to the bottom of this so it's really a question I still have.


Steve

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
The idea of ​​automated trading is appealing by the fact that the trading robot can work non-stop for 24 hours a day, seven days a week. The robot does not get tired, doubtful or scared, it's is totally free from any psychological problems. It is sufficient enough to clearly formalize the trading rules and implement them in the algorithms, and...
 
Steve Clark:

I'm not sure that this is necessarily the answer to the question as posed.


I tend to do full algorithm "every tick" back tests (rather than genetic) on promising EAs and sometimes see the test apparently stall without completing ..

I have experienced similar things during a regular backtest: the backtest reports that it has ended, even though it did not reach the end date of the intended time period to test. It simply stops early. What I have found to work is the following: change the end date and re-run the backtest. Then change the end date back to what was originally intended and run the backtest again. Now it often does reach the intended end date of the simulation.

 
William Roeder:
  1. Completed generic passes / Total non-generic passes (initial estimated generic passes)
  2. Time is an estimate. As more passes occur, the estimate improves.
  3. If you want the total, don't use generic algorithm. It's not going to give you anything better.

Following up here with an important additional question.

Even though my optimization shows it ran 588 possible combinations, my results grid only has 205 rows.  This is consistent. Even when i do NOT have 'skip useless results' turned on. 

Why does this happen?