Premium Market Analysis, Trader Education, Software, and Trading Strategies

Trading Strategies

Another Curve-Fitted Counter-Trend Strategy

My research indicates that most counter-trend strategies depend on suitable market conditions to perform well. Robust strategies should work well under all possible market conditions because we can never know when the conditions will change. In this post, I present an analysis of another popular counter-trend strategy, which in my opinion was curve-fitted and optimized.

I have already presented results for the “Double 7s Strategy” and the “Double 10s with 1-day exit“. Both strategies exhibited erratic equity curves and long periods of dismal results, a behavior typical of curve-fitted systems that depend on special conditions to perform well and just deteriorate when the condition change. In this post I will analyze another strategy that in my opinion was the result of curve-fitting. The strategy is a simple counter-trend trading system as follows:

  • Buy at the close if price makes a 10-day low and exit at the close when price crosses above its 10-day moving average or when a sell signal is triggered.
  • Sell at the close if price makes a 10-day high and exit at the close when price crosses above its 10-day moving average or a buy signal is triggered.

Case 1: SPY from inception to 11/07/2012

The backtest results below are for a fully invested starting capital of $20,000 without commission or slippage:

It looks like we have hit the jackpot here. An excellent equity curve with CAR equal to 10.88%, profit factor equal to 1.51, Sharpe ratio at 1.00 and maximum drawdown of -23.75%. Let us look at the yearly returns below:

Years 1999 and 2000 provided a boost to the strategy with returns of 32% and 53% respectively. The strategy also performed well during 2008 with a return equal to 29.3%.  This looks like the closest thing to a “Holy Grail” trading system. But not so fast. Some issues arise here:

1. Why selecting a 10-day moving average for the exit signal?
2. This strategy has too many parameters and can be easily subject to curve-fitting.
3. Does the strategy work as well in other similar instruments?

The sensitivity of the strategy to a change in the moving average value is studied next. The exit average period is set to 15. This is the equity curve performance that results:

The system does not exhibit the nice equity curve it did before the average period change. Now we see a highly volatile equity curve. Although the CAR is at 8.36%, the profit factor has decreased to 1.36 and the Sharpe ratio is only 0.70. Drawdown increased to -34.22% as a result of loss of robustness. Is it possible that this strategy will further deteriorate in the future because of changing conditions?

The answer is: Possibly. It appears that the strategy parameters were fitted to generate a good equity curve for SPY and the system worked well forward with the original parameters, actually generating a return in excess of 55% since 01/2008, while showing a loss of -4.3% only for year 2011:

Could the forward performance after 2007 be the result of luck? Let us see how the strategy performed in QQQ next.

Case 2: QQQ from inception to 11/07/2012

The backtest results below are for a fully invested starting capital of $20,000 without commission or slippage:

The CAR in this case is equal to 6.9% but the profit factor drops to 1.18, the Sharpe ratio is at 0.48 and the maximum drawdown is -38.18%. The yearly returns are shown below:

It is evident that this system gets a boost from the high return in 2000 of 70.4% but after 2007 its performance deteriorates. Actually, CAR drops to a mere 0.01% for the period 01/2008 to 11/07/2012 and the profit factor barely stays above 1. We now start getting the feeling that this system with the original parameters was maybe curve-fitted. This is what happens if the exit signal moving average period is changed to 15 from 10:

This is now a disaster. It shows that for his system to perform well its parameters must be set to match the conditions of the backtest period. If the conditions change, disaster occurs and this is the point that maybe some fail to understand. For example, if the moving average period is changed to 5, the system performance changes dramatically for the better, as shown below:

That this system was actually curve-fitted before 2007 is evident in my opinion from the performance in IWM, the Russell 2000 ETF

Case 3: IWM from inception to 11/07/2012

This is what the backtest generated for the original parameters and for $20,000 fully invested starting capital:

It should be clear from the above backtest results that the performance of this system in IWM deteriorated significantly after 2008 although for the whole testing period CAR comes out to 7.50%. Thus, by looking only at parameters such as CAR one does not get the full picture. For the period 01/2008 to 11/07/2011 the CAR drops to 0.88% and the profit factor stays barely above 1. There is then high probability that the original system was curve-fitted to data before 2008 and in the case of IWM for example, failed immediately. The same happened for QQQ. The system performed well in the forward period after curve-fitting in the case of SPY due to luck alone.

Portfolio backtest

Let us assume that all three ETFs, SPY, QQQ and IWM, were traded with an account with beginning equity of $100,000, starting on 01/02/2008. Up to three simultaneous open positions were allowed, one for each ETF, and the position size was calculated based on 1/3 of the available equity for each position. The portfolio equity curve is shown below:

Too much trouble for very little actually. A drawdown hit the account in 2009 of about 25% and the profit factor for the testing period barely stayed above 1. The Sharpe ratio was a dismal 0.27. This should serve as a strong indication, if not proof, that the system was curve-fitted some time before 2007.


Everything that shines is not gold. Most trading systems available in the public domain have either lost their edge or have stopped performing well because they were curve-fitted and optimized before disclosed and in reality had no edge. It appears that it has been easy in the past due to special market conditions to come up with counter-trend systems that performed well in backtests and had the advantage of simple logic. Careful scrutinizing of those systems reveals a high probability of curve-fitting before their disclosure. As a matter of fact, most of those systems, although appearing simple, involve a large number of parameters that need to be set and that opens the door to curve-fitting and optimization.

Disclosure: no relevant position at the time of this post and no plans to initiate any positions within the next 72 hours.. 

Charting program: Amibroker (Charts created with AmiBroker – advanced charting and technical analysis software.”)