Newbie Question :)
Now I have a list of stocks. How can I make a filter to judge whether a specific stock is in this list or not?
For now I can only make a function but not a FILTER.
I really need a filter for pipeline screens.
Thanks!
Newbie Question :)
Now I have a list of stocks. How can I make a filter to judge whether a specific stock is in this list or not?
For now I can only make a function but not a FILTER.
I really need a filter for pipeline screens.
Thanks!
You can make a CustomFilter similar to the way one makes a CustomFactor. Just return a True or False value.
There are a couple of approaches to filtering a list of securities when using a pipeline. Maybe search the forums for "symbols" or "list". Here is one such post which I attached code for doing (I believe) just what you wanted. https://www.quantopian.com/posts/using-a-specific-list-of-securities-in-pipeline#57964b09938eade52300015b
Good luck,
Dan