machine-learning-for-trading
                                
                                
                                
                                    machine-learning-for-trading copied to clipboard
                            
                            
                            
                        Chapter 08 :- 02_vestorized_backtest.ipynb
Line 11
long_signals = ((predictions
                .where(predictions > 0)
                .rank(axis=1, ascending=False) > N_LONG)
                .astype(int))
short_signals = ((predictions
                  .where(predictions < 0)
                  .rank(axis=1) > N_SHORT)
                 .astype(int))
- 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?