The following line of code throws me an error saying : InvalidSidCount: 0019 Algorithm must reference 1-500 SIDs. Found 0
def initialize(context):
pass
def before_trading_start(context):
fundamental_df = get_fundamentals(
query(
# put your query in here by typing "fundamentals."
fundamentals.valuation_ratios.pe_ratio,
fundamentals.asset_classification.morningstar_sector_code
)
.filter(fundamentals.valuation.market_cap != None)
.filter(fundamentals.valuation.shares_outstanding != None)
.order_by(fundamentals.valuation.market_cap.desc())
.limit(100)
)
def handle_data(context,data):
pass