Universe selection, top gappers search 

Hi everyone, 

some years ago I made a similar post reaching for help in order to build a little Universe selection algorithm. Now I'm in university, studying CS but I find it challenging none the less.

It seems that the scheduling functionality for universe selection was added.

What I'm aiming for here:

  1. Filtering just stocks and not futures, options etc
  2. The stocks need to have gapped up from the prev day close between 10% and 30%
  3. Stocks need to have a current day price between 30 and 60 dollars
  4. In case of multiple stocks to be filtered, return the biggest gapper

 

After looking at the documentation I coded a filter that seems to do what it should. By using logs I see that the filter it activates when it should, but it doesn't return stocks even if I can find them on Yahoo Finance applying the same filter logic “by hand”.

Even though I know that universe selection should be done by first calling a coarse selection and then a fine selection, I have not followed this approach because I feel that the filtering logic I am applying here is not so heavy as to require a "filter search" at two levels” (Coarse+Fine selection).

I'll attach the code, I would very much appreciate if someone could give me a hint on why the code doesen't return any stocks.

Best regards.