Hi Ivann,
The current one seems working and just want to understand more in details. Are u following like below?
1. Calculate the 3 months return for each stocks in universe
2.calculate the 4 months return for each stocks in universe
3.calculate the 5 months returns for each stocks in universe
4.calculate the 6 months returns for each stocks in universe
5.average the 3 to 6 months returns for each stocks in universe
6. Rank the average returns of 3 to 6 months from highest to lowest
7.select based on the # stocks filled
Hope you don't mind of my lengthy reply.