stock ranking algorithm based on affinity theory.