For those who want to test pair trading strategies, you may want to know what stocks to use ? Correlated or cointegrated stocks ? If you want to find correlated stocks, it can be done easily in Excel, but for cointegrated stocks it's more complicated ...
I compiled a list of all NYSE symbols, and then I ran a cointegration test, based on this R script: http://quanttrader.info/public/testForCoint.html
The script is still running, so I can't post the results here, but here is the R script I'm using:
symbols.txt -> contains all the symbols you want to test for cointegration
output.txt -> will output the result under this format "From 2004-05-18 to 2012-08-31 FCCY and FCTY are 99 % cointegrated"