Download MetaTrader 5

Optimization : Curve Fitting

To add comments, please log in or register
Dua Yong Rew
5436
Dua Yong Rew 2013.03.31 05:42 

How do you actually curve fit? What is your experience?

I'm thinking is if I'm using Takeprofit and Stoploss to prevent bad entrys and enter only good entrys.

Simon Gniadkowski
Moderator
18002
Simon Gniadkowski 2013.03.31 11:31  
doshur:

How do you actually curve fit? What is your experience?

I'm thinking is if I'm using Takeprofit and Stoploss to prevent bad entrys and enter only good entrys.

You run an Optimization.  To some degree any Optimization is curve fitting,  you are fitting the EA to the shape/curve of the history data you are running your EA on.  The more closely you fit you r EA to your historical data then,  it can be argued, the less likely your EA is to fit the curve of the data when you forward test/live test.

The general idea is that  curve fitting == over optimization 

Dua Yong Rew
5436
Dua Yong Rew 2013.03.31 12:53  
RaptorUK:

You run an Optimization.  To some degree any Optimization is curve fitting,  you are fitting the EA to the shape/curve of the history data you are running your EA on.  The more closely you fit you r EA to your historical data then,  it can be argued, the less likely your EA is to fit the curve of the data when you forward test/live test.

The general idea is that  curve fitting == over optimization 

What is over optimization?

Passing huge range of parameters?

 

Over-optimization (curve fitting) is a process of adjustment the indicators' parameters to the concrete data. 
Computer technology can be easily used to over-optimize a trading system and produce something that looks good. An optimizer tests thousands of parameters value and can find the exact numbers making the optimizing strategy very "profitable". The problem is that "Profitable" strategy is profitable only applied on this data. However, it is highly possible the system to fall apart in real world.

Strategy parameters that work over a range of values are robust.
   If the parameters of an indicator are slightly changed and the performance falls drastically, beware.
For example, if a system works great at MA(20), but does not work at MA(19) or MA(21) you have an over-optimized system.
    On the other hand, if your strategy works with Moving Average with a period from 15 until 25, your system is much more robust (and reliable).

 

So is there anyway the strategy tester can suggest if the parameters are curve fitted?

Simon Gniadkowski
Moderator
18002
Simon Gniadkowski 2013.03.31 14:07  
doshur:

What is over optimization?

Passing huge range of parameters?  

So is there anyway the strategy tester can suggest if the parameters are curve fitted?

No,  I don't think so.  You could try this . . . after optimizing run the first quarter of your date range,  then the second quarter, then the third then he final quarter of your date range with the settings you choose from optimizing.  If you significantly different performance for each quarter then you may well have curve fitted/over optimized for the whole range.
Dua Yong Rew
5436
Dua Yong Rew 2013.03.31 16:00  
RaptorUK:
No,  I don't think so.  You could try this . . . after optimizing run the first quarter of your date range,  then the second quarter, then the third then he final quarter of your date range with the settings you choose from optimizing.  If you significantly different performance for each quarter then you may well have curve fitted/over optimized for the whole range.
But which set is the best parameters?
Simon Gniadkowski
Moderator
18002
Simon Gniadkowski 2013.03.31 16:04  
doshur:
But which set is the best parameters?
What are you optimizing for ?  Balance ?  DrawDown ?  Profit Factor ?
Dua Yong Rew
5436
Dua Yong Rew 2013.04.01 05:15  
RaptorUK:
What are you optimizing for ?  Balance ?  DrawDown ?  Profit Factor ?
Profit + DrawDown + Profit Factor + Recover Factor
Simon Gniadkowski
Moderator
18002
Simon Gniadkowski 2013.04.01 11:09  
doshur:
Profit + DrawDown + Profit Factor + Recover Factor
Well on the basis of those values you pick your best result and the variable settings that give you the best result is your optimum.  Then you can see if that optimization is curve fitted or not.
Dua Yong Rew
5436
Dua Yong Rew 2013.04.06 07:02  
If I consider the number of trades into the Custom Max, will the optimization be LESS curve fitting?
To add comments, please log in or register