Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
get fundamentals to morningstar

Hello,

I am trying to replicate the Russell 3000 index. Any idea how to do it using pipeline?

import datetime
from sqlalchemy import or_

fundamentals = init_fundamentals()

russell_1000 = get_fundamentals(
query(fundamentals.valuation.market_cap,
fundamentals.company_reference.primary_exchange_id)
.filter(fundamentals.company_reference.country_id == "USA")
.filter(fundamentals.valuation.market_cap > 30e6)
.filter(or_(fundamentals.company_reference.primary_exchange_id == "NAS", fundamentals.company_reference.primary_exchange_id == "NYS"))
.order_by(fundamentals.valuation.market_cap.desc())
.limit(1000),
"2015-05-31") # Russell reconstitutes on the last day in May