The code takes out those stocks for which there's no TOTAL
Better R code