I don’t know if it is just the case of like-minds thinking alike, but I just was over at Dog’s site and found a discussion of using the percentage of stocks on RSI(2) < 10 as a breadth indicator. Funny that – as I was working over the past two days on just such a system. Of course, this is what I love about the internets – you have a group of people that have never seen each other being working together in all sorts of interesting ways.
Here are the details:
- I started by taking the stocks of the S&P500. I ran an Amibroker scan on them summing up the number of stocks, over time, with an RSI(2) < 10 and RSI(2) > 80.
- I then graphed this data – screenshot below.
- Then I setup a simple system – buy when the RSI(2) > 80 crosses over the RSI(2) < 10. Sell on the opposite event. For the test I used the SPY as a proxy for the S&P500 in order to make the breadth indicator do the hard work – in other words, I didn’t want individual stocks’ performance affecting the results.
- The end result: STOCK TRADING SYSTEM FAIL! The system is currently very poor. Winners only 44% of the time which wouldn’t be so bad except it’s not a trend following system.
- In any case, I’m posting the results and some screenshots – if anyone has any ideas, let me know. If anyone wants some code samples just email me. Also, if anyone wants my generated RSI(2) data on this stuff to play around with, I’m happy to provide it – just hit me with an email. Let me know the group of stocks/index and any other settings.
Here’s what the indicator looks like on-screen:
System Statistics:
| Initial capital | 10000 |
| Ending capital | 12938 |
| Net Profit | 2938 |
| Net Profit % | 29.38% |
| Exposure % | 68.40% |
| Net Risk Adjusted Return % | 42.95% |
| Annual Return % | 1.28% |
| Risk Adjusted Return % | 1.88% |
| All trades | 469 |
| Avg. Profit/Loss | 6.26 |
| Avg. Profit/Loss % | 0.08% |
| Avg. Bars Held | 8.66 |
| Winners | 209 (44.56 %) |
| Total Profit | 52080.3 |
| Avg. Profit | 249.19 |
| Avg. Profit % | 2.01% |
| Avg. Bars Held | 11.89 |
| Max. Consecutive | 5 |
| Largest win | 1699.6 |
| # bars in largest win | 24 |
| Losers | 260 (55.44 %) |
| Total Loss | -49142.3 |
| Avg. Loss | -189.01 |
| Avg. Loss % | -1.46% |
| Avg. Bars Held | 6.05 |
| Max. Consecutive | 7 |
| Largest loss | -1119.8 |
| # bars in largest loss | 22 |
| Max. trade drawdown | -1931.6 |
| Max. trade % drawdown | -11.44% |
| Max. system drawdown | -8072.9 |
| Max. system % drawdown | -43.98% |
| Recovery Factor | 0.36 |
| CAR/MaxDD | 0.03 |
| RAR/MaxDD | 0.04 |
| Profit Factor | 1.06 |
| Payoff Ratio | 1.32 |
| Standard Error | 1657.56 |
| Risk-Reward Ratio | 0.06 |
| Ulcer Index | 19.44 |
| Ulcer Performance Index | -0.21 |
| Sharpe Ratio of trades | -0.17 |
| K-Ratio | 0.0051 |


Interesting concept.
I think one of the problems with the approach is that RSI(2) changes so quickly that by the time the RSIs cross over in moving average-style, the move is already done.
Quickly eyeballing the instances where the 80 crosses the 10, it looks like the crossover occurs after a large move up, which means there isn’t much profit left when the trade is entered the next day.
I was thinking that it might work best as a counter-trading system on the short-side – so, when the RSI(2)>80 gets above, 60%, then short. But I can eyeball it to see that there are issues with that. Namely, when you’re wrong – you’re really friggin’ wrong.
Better to be wrong on paper than with cash!
Interesting, I did a similar study with the DJIA a few years back and got similar results. I couldn’t find anything worth pursuing in the data even though it was a unique concept.
Can I get a copy of your code in AB? Thanks
Eric
Don’t use crosses. Don’t use breadth. Just use the 2-day RSI of the SPY ETF.
Enter and exit intraday.
Enter long RSI 70.
Don’t short.
It’s not fantastic, but when used with leverage, it’s worth doing.
OK, the software didn’t like my “less than” and “greater than” symbols and the comment got mucked up because of it.
Enter long when RSI is less than 10. Exit long when RSI is greater than 70.
Bill – one question – even though you’re entering intraday, are you looking at RSI(2) on a daily basis?
Here’s the code:
Create a AFL for the scanner:
RSabove = RSI(2) > 80;
RSbelow = RSI(2) < 10;
Buy = 0;
AddToComposite(RSabove,”~MyRSI2above80IndexSPX”,”C”);
AddToComposite(RSbelow,”~MyRSI2below10IndexSPX”,”C”);
AddToComposite(1,”~MySPXCount”,”I”);
I run this on a watchlist of the stocks of the S&P500.
After you’ve run the scan, you can use a simply entry/exit:
PosQty = 1; // You can define here how many open positions you want
SetTradeDelays(1,1,1,1); // everything delayed 1 day
SetOption(“MaxOpenPositions”, PosQty );
SetOption(“AllowPositionShrinking”, 1 );
SetOption(“UsePrevBarEquityForPosSizing”, True);
SetOption(“MinShares”, 10);
PositionSize = -100/PosQty;
RSbelow = Foreign(“~MyRSI2below10IndexSPX”,”C”)/Foreign(“~MySPXCount”,”I”)*100;
RSabove = Foreign(“~MyRSI2above80IndexSPX”,”C”)/Foreign(“~MySPXCount”,”I”)*100;
Buy = Cross(RSabove,RSbelow);
Sell = Cross(RSbelow,RSabove);
Daily bar RSI, it’s a slight improvement over monitoring and entering at the close or entering at the next day’s open.
It seemed to me to be worth doing in size or with leverage, but not my style.
Hey guys,
I posted the results of some tests I ‘ve been working on this week with Woodshedder based on his exit criteria which is similar to Bill’s but looking at different RSI entry variables. In additon to the the ETFs, I ran them on the 3 stock portfolios I normally use at IBDIndex. There are a couple of additional filter criteria I am testing to try and help determine if the RSI setup is merely a correction or a breakdown – volume into RSI setup, close above MAs, close within Bollinger Bands, etc.
I agree about the crossover, it is such a short term indicator that any lag will kill it I’m afraid. Maybe looking for oversold on two timescales could improve things however, RSI(2) less than 10 and RSI(10) less than 10, for example.
Bill, I get better results > 80, but I’ll have to double check to be sure.
Re: leverage… That’s why we are looking at the SSO, as one part of the portfolio.
Very interesting stuff!
I tried to do the inverse Buy when RSI80 for some stock in Brazil, mainly VALE5(i think there is an ADR namede RIO) and it went pretty well.
I do not have the exact results cuz they are on the other PC but I got near 81% win% for most of brazilian stocks for an average gain of ~3%
I also did some bootstrapping on the detrended data to verify its consistency and I can reject the null hipotesys that the system is worthless with 99.9%.
In my opinion this simple rule might have a chance…
That’s great stuff Sandor – I’d love to hear more about your system.
How about:
long: RSI(2)>95
short: RSI(2)>5?
I’m using RSI(2) for a month and the result is promising.
Lucky – I have a hard time believing that going long when the RSI is > 95 would work but it’s something you can obviously test. Or did you mean the opposite?
I think that:
SL/PT = P(PT)/P(SL)
SL – Stop Loss (absolute value)
PT – Profit Target
P(SL) – Probability of hitting stop loss
P(PT) – Probability of hitting profit target
Example:
You have decided to set your stop loss to -1USD and profit target to 2USD. This means that SL/PT= 1/2. How often will you hit PT, and how often SL?
P(PT)/P(SL) = 1/2 In another words you will hit PT 33.33% of the time and SL 66.66% of the time.
If you will make 15 trades. Then you will hit PT 5-times yielding +10USD and you will hit SL 10 times yielding -10USD (in average).
In the long run you will break even. (If there are no commissions). If there are commissions, then per turn you will lose an amount which is equal to the commission per turn (in average). You may ask a question: According to what are you entering a trade? Randomly. You think you can do better? Hardly!
try simply using a percentile ranking of the number of stocks or percentage with RSI<10, with a long lookback period (say 2-5 years), subtract the final result from 1. Once the ranking crosses below the 10th percentile (oversold) you can trigger entries when the reading crosses above 10 and hold until it hits 50. For shorts you would of course use the 90th percentile
You might also consider a divergence indicator as a compliment, which essentially tracks the RSI reading for the same lookback period for the SPY less the breadth indicator mentioned above.
if someone could test this, please let me know, because i do a lot of things old school using a spreadsheet- making this type of analysis difficult.
dv
David – happy to run the test if you can clarify it a bit more. So I’ve already got a indicator coded up that counts the number of stocks, for any given day, that are below RSI less than 10. I divide this number by the number of total stocks I’m running to get the percentage. So, in your model, you would buy the SPY when the % of stocks with RSI less than 10 goes to 90%?
basically you track the history of the percentage of stocks in the SP500 below RSI 10, then you will have data to create an oscillator. it would look like this:
Percentage of stocks below RSI 10
Dec 12 23%
Dec 11 29%
Dec 10 55%
Nov
Oct
etc
Then you can either average figures for the last n days i suggest trying 10,20,50,100,200, and 400 and use standard deviations (like a bollinger band) above to create oversold levels
Buy signals could be generated when the average is greater than 2 SD above the MA and then crosses below 2SD (ie it is getting less oversold), and the trade is closed out at the MA—the simpler alternative is to buy 2sd above and sell at the MA
note my preference would be to use a percentile vs bollinger band, that was what i was referring to.
Hi iam a RSI-2 Follower. My trading system is based on the
combination of RSI-2+ 5-EMA+TRIN.
I made a simple tool in my blog too. I applied for nifty(Indian Index). Strategy is quite worth promising
I will be linking back I really like your site keep up the good work.
Wish I had a site like this one, I will link back I think my readers would enjoy your site.
Great information, I will be linking back to you and going to look around at your other posts.
If some thing as simple as the one described works, market automatically corrects itself, if you know what I mean
IMO, RSI is best used at avoid wrong whipsaws or timing entries. I have built a stochastics + RIS + some custom indicators bases system that works we pretty well. You may like to try.
Doji