I recently did some work in R and the library package quantmod (see link below) to find co-integrated stock pairs. The idea is that some stocks not only move together (correlated) but tend to have a stationary mean-reverting spread.
So for instance, say Pepsi and Coke are priced at $25 and $50, respectively. Therefore, the relative spread is 0.5 (25/50). The idea is that although the prices of each individual stock will vary greatly over time, the spread will remain fairly constant.
My strategy buys Pepsi and sells Coke when the spread narrows below a certain amount as a percentage of its historic standard deviation. It then waits for the spread to widen to somewhere closer to its medium run average and closes the position. It does the opposite when the spread widens too far.
I experimented a bit with the specific parameters and used 2.0 standard deviations away from the medium run average as a trigger to buy and 0.5 standard deviations away from that same average to close out the position. I also use 20 days as the period to calculate the mean and standard deviation of the spread. My bet size was 200k with a requirement of my position value + cash to be greater than 0 to open new trades. I experimented with smaller bets but found that placing larger bets and waiting for reversion was more profitable.
Obviously these parameters need to be optimized.
Finding cointegrated pairs is simple enough. Does anyone else have any strategies on trading on cointegration?
R package for financial analysis:
http://www.quantmod.com/
Quick tutorial on finding cointegrated pairs using R:
http://quanttrader.info/public/testForCoint.html