Optimizing many parameter

ezraluandre

Trader
Jun 17, 2020
33
1
24
30
Hi,

I want to optimize a strategy with many parameter. It is advise to do it maximum 3 parameter per optimization to avoid overfitting, so the optimization will be run twice. Let's say I have 6 parameter to optimize 3 parameter for entry (indicator parameter) and the other 3 for exit (tp sl).

As far as I know for strategy to work it needs both entry and exit to work simultaneously to give a great confidence result that it is the optimum combination. For example if I want to optimize the indicator parameter with tp 400 points and sl 200 points, the best result (parameterA) for indicator parameter optimization only works in favor for those tp and sl. If we optimize all 6 parameter the best result would be parameterB with tp 600 and sl 300 points.

I understand about the over-fitting that may come with optimizing more than 3 parameter, but when we optimizing 3 parameters first and 3 afterwards, doesn't it we will miss the optimum value? What your thoughts about this?
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,714
1,391
144
Odesa
www.earnforex.com
You overcome overfitting by running additional backtests on the out-of-sample data with the optimal parameters that you find. So, you first divide your test data into several periods and only use part of them for actual optimization. Then you find several optimal parameter sets and run them on the out-of-sample periods to find out whether they got overfitted.
 

ezraluandre

Trader
Jun 17, 2020
33
1
24
30
So it doesn't matter whether I optimized all 6 parameter or doing it recursively as long as the parameter from the first optimization be carried over to the next optimization then it bounds to become more over-fitted than before?
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,714
1,391
144
Odesa
www.earnforex.com
So it doesn't matter whether I optimized all 6 parameter or doing it recursively as long as the parameter from the first optimization be carried over to the next optimization then it bounds to become more over-fitted than before?
It does matter. It will be slightly less overfitted, but it will also be less optimal. The goal of the optimization is to find an optimal full set of parameters that would work best independent on the chosen period of time.
 
  • 👍
Reactions: Phill88