How stocks are sorted