What is Curve Fitting

Curve Fitting

Simply defined, curve fitting is developing logic or programming instructions that will align with historical data to provide the most profitable results.  As an example, let’s say you know that when the 20 ma crossed above the 50 ma you would always reach a profit target of 2 points if you had a stop loss of 3 points over the last 6 months.  If you use a profit target of 2 points and a stop loss of 3 points, on a years’ worth of data you may find that you hit your stop loss a number of times.  So in this example you curve fitted your logic to the most recent 6 months.

By definition backtesting and optimizing is curve fitting.  So your goal is not to eliminate curve fitting.  Your goal is to ensure you are not overly curve fitting.

How to reduce curve fitting:

  • Backtest on more data
  • Feed your optimized strategy unseen data
  • Backtest on varied market conditions
  • Sim Test your strategy