python stock rank