CHAPTER 11 Beating It into Submission

There is more to say about dealing with tests that don’t produce the results you want. I think about this as a critical point in development, one in which you take the path that gives you the best chance of success, or you overfit the data so that there is no chance that the end product will work.


When you get disappointing results, you will look specifically at the trades, or sequence of trades, that caused the loss. Would a different stop-loss help? Were prices too volatile? Did you enter following a trade with a very large profit? Was this a short sale in a rising market? All of these questions seem valid, so why is there a problem?

It all depends on how you view the results based on those changes. For example, it’s a problem if:

  • The change corrects only one trade.
  • The change affects only one market.
  • The results of an optimization show higher peak returns using some parameters, but lower returns using other parameters. That is, profits are concentrated in one area at the cost of other areas.
  • The new results are unreasonably good.

The third point, changing the pattern of results, needs to be clear. Consider the test results shown in Figure 11.1. The original test results are the dark line, going from negative 1,000, presumably the shortest calculation period, to 1,425 at the peak, and down to 1,100 at the right, the slowest period. Note that the results flatten out on the right because the percentage difference ...

Get A Guide to Creating A Successful Algorithmic Trading Strategy now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.