Hi everyone,
I just want to ask a methodological question about optimization. Let's say I have a simple SMA crossover strategy with stoploss and takeprofit implemented. This means that the strategy has 4 different parameters that can be optimized:
1) "Fast" SMA period (an integer)
2) "Slow" SMA period (an integer)
3) Stoploss Distance (either in ticks or %)
4) Takeprofit Distance (ticks/%)
If the strategy was without stoploss and takeprofit rules, I could optimize by using the statistic of my choice, and plot it as a surface or heatmap. But, having 4 optimizable parameters prevent the use of surface plots or heatmaps for a "one-look" optimization.
I am aware that optimizing several parameters makes the strategy more overfit to historical prices, but 4 parameters does not seem to be many, to me at least.
The first solution that I could think of was dividing the parameter list 2 by 2 (fast&slow sma, SL/TP), and do optimization of these groups sequentially. So, I would plot heatmaps of Fast-SMA as x-axis, Slow-SMA as y-axis vs. a objective statistic. After choosing the optimal values for the SMAs, I would again, plot heatmaps or MAE&MFE charts to optimize SL/TP. But this solution might give different results when the groups' optimizations were applied in the reverse order (first the SL/TP and secondly the SMAs).
All in all, I wanted to ask you how you optimize strategies with more than 2 variables and also, your thoughts about sequentially optimizing 2-parameter groups?
Any comment or criticism is appreciated. Thanks.
I just want to ask a methodological question about optimization. Let's say I have a simple SMA crossover strategy with stoploss and takeprofit implemented. This means that the strategy has 4 different parameters that can be optimized:
1) "Fast" SMA period (an integer)
2) "Slow" SMA period (an integer)
3) Stoploss Distance (either in ticks or %)
4) Takeprofit Distance (ticks/%)
If the strategy was without stoploss and takeprofit rules, I could optimize by using the statistic of my choice, and plot it as a surface or heatmap. But, having 4 optimizable parameters prevent the use of surface plots or heatmaps for a "one-look" optimization.
I am aware that optimizing several parameters makes the strategy more overfit to historical prices, but 4 parameters does not seem to be many, to me at least.
The first solution that I could think of was dividing the parameter list 2 by 2 (fast&slow sma, SL/TP), and do optimization of these groups sequentially. So, I would plot heatmaps of Fast-SMA as x-axis, Slow-SMA as y-axis vs. a objective statistic. After choosing the optimal values for the SMAs, I would again, plot heatmaps or MAE&MFE charts to optimize SL/TP. But this solution might give different results when the groups' optimizations were applied in the reverse order (first the SL/TP and secondly the SMAs).
All in all, I wanted to ask you how you optimize strategies with more than 2 variables and also, your thoughts about sequentially optimizing 2-parameter groups?
Any comment or criticism is appreciated. Thanks.