wouldn't we want to long stock in the Top 15 highest expected return? e.g. Rank 1 to 15 with the highest expected return rank first (descending order). Hence we need rank <= 15 ?
and short the lowest expected return stock from 1 to 15 again, due to lowest return rank first?
Line 11
rank <= 15
?