Pair Trading - Identifying cointegrated pairs in a universe of stocks

How to identify cointegrated pairs in a universe comprising more than 500 stocks?

Answer - The first step can be to identify what sectors they belong to and segregate based on that. Next, you can run correlation tests on the stocks from the same sectors to filter down a subset. The last step can be to run cointegration test on pairs with high correlation to see if they are co-integrated as well.