def make_pipeline():
# base universe
# to learn more, visit https://www.quantopian.com/posts/the-q500us-and-q1500us
universe = Q1500US()
# pipeline factors
sector = Sector()
rev_growth = ms.operation_ratios.revenue_growth.latest
# filters
m_cap = ms.valuation.market_cap.latest.notnull()
roic = ms.operation_ratios.roic.latest > 0.1
shares_outstanding = ms.valuation.shares_outstanding.latest.notnull()
top_rev_growth = rev_growth.top(500, mask = universe)
securities_to_trade = m_cap & roic & shares_outstanding & top_rev_growth
return Pipeline(
columns={
'sector': sector,
'rev_growth': rev_growth
},
screen=securities_to_trade
)