When does optimising become curve fitting?

 

So by narrowing down the times of an EA's Open / Close to a time period that only has successful trades constitute curve fitting?

 

From the article -  How to Test a Trading Robot Before Buying 

Curve fitting means that the Expert Advisor will probably not show the same level of profitability on data beyond the specified interval used for the optimization as it did on the test data. And worse yet, it may yield quite the opposite results, leading to losses.

Another alarming fact can be a huge profit stated in the description of a trading robot. If the attached Strategy Tester reports show a sky-high balance, it most likely has to do with curve fitting. Often developers of such "money printing machines" do not even realize that their system is over-optimized and has too many external parameters.

Forward testing is used to assess stability of the trading system in the changing market behavior. Optimization of parameters in the Strategy Tester allows us to get the parameters at which the trading robot is at its best on historical data within a certain interval. But this does not guarantee that the obtained parameters will be the same best fit even when used for trading in the nearest future.

Traders who develop automated trading systems often confuse such concepts as optimization and curve fitting. The line between a fair optimization and curve fitting is very thin and hard to find. This is where forward testing has proved useful allowing to objectively assess the obtained parameters.

Upon optimization in the MetaTrader 5 Strategy Tester, you can choose to forward test the resulting optimum parameters and set the necessary limits.
How to Test a Trading Robot Before Buying
How to Test a Trading Robot Before Buying
  • www.mql5.com
Buying a trading robot on MQL5 Market has a distinct benefit over all other similar options - an automated system offered can be thoroughly tested directly in the MetaTrader 5 terminal. Before buying, an Expert Advisor can and should be carefully run in all unfavorable modes in the built-in Strategy Tester to get a complete grasp of the system...
 
Thanks Sergey, I will have a read of the article. From what you have posted it seems my assumption is correct and that there is a fine line between them.
 
JoeCash:

So by narrowing down the times of an EA's Open / Close to a time period that only has successful trades constitute curve fitting?

To keep it simple, curve fitting occurs when you optimized too much parameters. And of course, more the optimization period is short, more you have a curve fitting.
 

When you optimize all parameters with very fine steps.

Even optimizing take profit and stop loss leads to curve fitting

 
use as few as possible parameters. already with 3 you can well fit any curve (math, polynomials etc...) 
 
Remember :Dont let your Algorithm be too specific , or too broad (broad as in wide not as in chick [chick as in woman not as in chicken]) 
Reason: