Hello,
I'm trying to replicate the results from "The Little Book that Still Beats the Market". The strategy is simple in that it takes rankings from earnings_yield and return on invested capital and buys and holds the best ranked stocks for 1 year. I am ranking the earnings_yield from lowest to highest and assigning it a ranking score. I'm doing the same for the ROIC as well. Once two sets of rankings are complete I add the ranking scores together and assign a final rank of the original pandas dataframe. I then order it in descending order and pick the top 60 stocks to hold.
I am having issues with the NaN. Some symbols have "NaN" and are messing up my rankings overall. Any ideas in troubleshooting the NaN's as I would like to completely remove those tickers from all ranking lists.
Also any help in filtering stocks with certain marketcap will be great as well!