Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Pipeline only for specific industry codes

What is the best way to filter down the pipeline only to specific industries or even symbols? I see an option to filter it after the fact using context.output.loc in before_trading_start, but this seems to be very wasteful in resources.
I am trying to create an algorithm that will rebalance monthly based on TTM of revenue. Since get_fundamentals does not provide TTM, I am trying to use the Pipeline API.
Thanks!

1 response

Be aware that also the Pipeline API do not provide TTM Revenue.
About the industry codes, look at my code example in this post:
https://www.quantopian.com/posts/how-to-filter-equity-types-or-classes-in-pipeline#56e01c7eceb9ed5458000722