Backtesting timeframe

 

Hi,

 

I am looking for feedback or actual backtesting-trading experience if anyone has done this. The question: does it make sense to put more weight on signals created in the last x period of the entire backtesting timeframe, ie: if you optimize your EA on 1 year historic data then give more weight for signals only optimizing for the last 3 months.

This is for a no hedge, FIFO type broker, so typically one trade at a time.

The idea behind it is that 3-month optimization will certainly be a curve-fitting, but it does reflect a more 'recent' market conditions, price movements, etc. The more stale additional 9-month optimization would just provide more scenarios to give a baseline optimization. The last 3-month tail-fitting would have to be a rolling one going forward, so this would be repeated monthly. My assumption is that over time market participation (supply-demand constituents) changes, trends or fluctuates altering the foundation of volatility, response to support/resistance. In other words the exact same price movement pattern may result in a false breakout under a certain condition and a successful breakout at a different time. In Metatrader we can only measure the price movements, but not the supply/demand volumes.

 

Any thougths? 

 

The length of necessary optimization period depends on the type of EA. Generally the longer can your EA stay profitable without a change in parameters the better as more market conditions will be covered. Also, you need enough number of trades in the optimization period (I would say at least 100). If your EA is scalping on 1 min chart and makes several trades a day then 3 months should be enough (or maybe even 1 month). However, if your EA trades off daily chart, then it will most likely make too few trades for any sensible optimization. Also, 3 months is too short to cover most of market conditions on higher time frames as for example Summer volatility is different from Spring or Fall volatility, etc. For an EA running on a H1 and higher timeframe I would say one year optimization period is absolute minimum. 

 
terdi: if you optimize your EA on 1 year historic data then give more weight for signals only optimizing for the last 3 months.

If you optimize your parameters over the last 3 months, you have your parameters. What does the 1 year optimization have to do with it?

See also mt4 strategy tester - BATCH MODE - MQL4 forum

 
WHRoeder:

If you optimize your parameters over the last 3 months, you have your parameters. What does the 1 year optimization have to do with it?

See also mt4 strategy tester - BATCH MODE - MQL4 forum

Just imagine that you have more than one set of parameters.  In this example one set with the 3-month optimization, representing higher risk and higher profit. Then another one with the 1-year optimization with lower risk and lower profit.
 
fxjozef:

The length of necessary optimization period depends on the type of EA. Generally the longer can your EA stay profitable without a change in parameters the better as more market conditions will be covered. Also, you need enough number of trades in the optimization period (I would say at least 100). If your EA is scalping on 1 min chart and makes several trades a day then 3 months should be enough (or maybe even 1 month). However, if your EA trades off daily chart, then it will most likely make too few trades for any sensible optimization. Also, 3 months is too short to cover most of market conditions on higher time frames as for example Summer volatility is different from Spring or Fall volatility, etc. For an EA running on a H1 and higher timeframe I would say one year optimization period is absolute minimum. 

Appreciate your advice. The optimization periods given above are just examples. I am really just trying to learn if multiple variable sets based on 'recent' and 'long timeframe' optimization is worth exploring.
 
terdi:
Just imagine that you have more than one set of parameters.  In this example one set with the 3-month optimization, representing higher risk and higher profit. Then another one with the 1-year optimization with lower risk and lower profit.

Ok, I imagined it. So what? Once set has nothing to do with the other set.

Do you watch NASCAR? They you one setup for qualifying (the fastest, but drops off quickly) and one setup for racing (bit slower but good over long haul.)

 
terdi:
Appreciate your advice. The optimization periods given above are just examples. I am really just trying to learn if multiple variable sets based on 'recent' and 'long timeframe' optimization is worth exploring.

It all depends. You can use walk forward analysis over several years to work out the length of the optimization period which will give you best and most consistent results on unseen data.
Reason: