Trying to use AccumulateWithClassSelection for course universe selection instead of SingleDayTopSelection but keep running into the error "This asset symbol (<NULL> W5373A5QVCRP) was not found in your security list. Please add this security or check it exists before using it with 'Securities.ContainsKey("<NULL> W5373A5QVCRP")' in SecurityManager.cs:line 254" and can't figure out why. Would appreciate thoughts on the source of this error. 

 

As an example:

 

class TradeTop(QCAlgorithm):    

def SingleDayTopSelection(self, coarse):        

     p = [{'symbol': cf.Symbol, 'price':  cf.AdjustedPrice}  for cf in coarse]        

     p.sort(key=lambda x: x.get("price"), reverse=True)        

     day_top = [x['symbol'] for x in p[:TAKE_TOP]]        

     self.Log(f"top syms: {[x.Value for x in day_top]}")        

     self.coarse_universe = day_top        

     return day_top

Author