Last week the guys at Quantifiable Edges presented an interesting trading edge which buys one day pullbacks in the S&P 500 during strong up trends.
The exact rules are described as follows:
“After closing at a 50-day high yesterday and higher for at least five days in a row, SPX closes down but above it’s 200-day MA, buy on the close. Sell after X number of days.”
In other words, we are looking for a persistent trending market that finally pulls back and gives us a chance to re-enter the trend. Such a scenario occurred just the other day and looks like it could be another profitable result:
The article shows performance is positive for every holding period from 1 bar up to 10 bars. But the best performance came from a 10 day holding period where the authors recorded a net profit of $58,392, an 84% win rate and a profit factor of 5.52.
I coded this strategy up in Amibroker and got almost identical results. I therefore decided to test this on a range of different ETFs in order to see if the edge holds up over different markets.
Following you can see some results when applying this edge to eight large ETFs with a holding period of 1, 5 and 10 days. Results shown are for the whole data series that I have available from Norgate Premium Data:
1 Day Holding Period
5 Day Holding Period
10 Day Holding Period
As you can see, our results improved with time in the market. Most of the markets were profitable and SPY was a consistent strong performer.
S&P 100 Stocks
Continuing with a 10-day holding period I found that the edge has been profitable on 62% of S&P 100 stocks over the last 20 years with an average profit of 0.23% per trade.
Reverting to a 5-day holding period I found that the edge has been profitable on 52% of S&P 100 stocks with an average profit of 0.07% per trade.
Following is some Amibroker code that you can use to test this system for yourself:
C1 = Ref(C,-1);
ConsecutiveUpDays = BarSince(C1 <= Ref(C1,-1);
Buy = ConsecutiveUpDays > 4 AND C1 > Ref(HHV(C1,50),-1) AND C<C1 AND C>MA(C,200);
Sell = 0;
BuyPrice = C;
SellPrice = C;
Although at a glance this looks like a good trading edge there are some issues that we need to be aware of.
First of all, the study cites the S&P 500 index. This is in fact a benchmark and not a tradeable market. This is why I have shown the results for 8 ETFs.
There is also the issue of observing the close and trading on the close (potential future leak) which I have talked about previously.
However, you can see why the authors chose to show the results – the edge shows consistency over holding periods and could be easily adapted for the ES mini or SPY ETF.
Second, although the results are quite good, they improve with time. This suggests an influence from time in the market (the underlying trend) which is unrelated to the edge.
Furthermore, the sample size of 60-70 trades is not very large considering the number of parameters that have been used to define the buy signal.
Lastly, after testing some other markets, it seems that performance is generally best for the issue in question – SPY. This suggests some over fitting may be present.
Overall, this seems like it could be a reasonable edge for further development but there is not yet enough evidence of robustness. Personally, I am not a big fan of strategies like this where performance improves a lot with time in the market due to the influence of the underlying trend direction.
Simulations and charts from Amibroker with data from Norgate Premium.