Hi Q Community,
I just joined Quantopian and am writing my first algorithm. Now, before I get into more complex algorithms (love statistics yey :) I want to code my own stock screener. It's to return a condensed list of stocks that one could evaluate by hand later on. It's supposed to do pretty much the same as the common ones from Yahoo! Finance etc., but obviously you can decide much more flexibly what to search for. Also I am not overly confident about the quality of data behind those free screeners on the Internet ...
So the screener saves all the fundamentals and prices for specific dates. Note that I've put this into a new order - I am not saving data for every single day and then pick out the dates I need, because this uses too much capacity. Instead, I decide (within initialize()) on which days to save data.
However, I am having difficulties with my filtering - it just filters out every stock. The established 'requirements' are rather loose, so the screener should find stocks.
Maybe some of the more experienced community members can take a look at this. Would be much appreciated.
Thanks
Toby
Edit: I found out that the screener is indeed finding stocks - but it's just Apple. I've created a context.stocks list with only Apple in, it basically to "shut up" the error that results from having no sids in your universe. Not really surprising, because I can only determine my universe on the last day of the backtest (the day I filter my fundamentals - the days before I am just saving the fundamentals for every stock there is in the Morningstar database). Is there a way to go around this? I haven't found a way yet. Actually, I don't want to set a universe at all, I just want to save the data until the last day in order to analyse it then. But I get an error either way - either for having to many stocks in my universe or none at all.