I am trying to create an algorithm that will go long on stocks with a strong EPS growth and a positive monthly return, whilst shorting stocks that have negative EPS growth and monthly returns. However, each backtest only returns the error that (security is undefined), I was wondering if anybody could help amend this error, as in my previous algorithm attempts I've never had this issue when using similar code.
I'm also very new to coding, so I apologise if the code is sloppy or makes little sense. In addition, this is probably a terrible strategy, i'm just trying to get used to the Quantopian IDE.
Any help would be much appreciated.