Is it possible to use the scan engine to pull out stocks contained within an index that are outperforming that index? I would like to run a scan for stocks in the S&P 500 that are outperforming the S&P 500 as a whole. Thanks!
Here is a link to an article I wrote for the Scanning blog which should answer your question with even a few more ideas you may not have thought of.
For those who don't want to follow the link, I'll give you just a couple of snippets from that article. The very simple scan was as follows.
(Note you could turn on or off any of the individual groups by removing the double //, or just us the clause with the "OR" conditions to get the whole S&P 1500 index.)
In this case, there where two previous Highs in the $SPX index some time ago, and we were looking for stocks in that index that had now, during the last 6 days, exceeded their previous Highs during that time and were also more than 5% higher than those previous Highs.
[type = stock]
//and [group is SP500]
//and [group is SP400]
//and [group is SP600] and
[[group is SP500] or [group is SP400] or [group is SP600]]
and [max(5, close) > 6 days ago daily max(90,close) * 1.05 ]
Now for these types of scans, it is often helpful to see it in graphical form, so here are the conditions and criteria which had to exist to satisfy the scan and return a result.
I hope this gives you some other ideas. If you find this interesting, please read the entire article which contains much more information.
To see all the responses to this question, go to the original post on s.c.a.n.