Back to Community
How do I get prices for fundamental data sids in Research?

I was looking at the example code. Say something like this:

today = datetime.datetime.now().strftime('%Y-%m-%d')  
fundamentals = init_fundamentals()  
fund_df = get_fundamentals(query(fundamentals.company_reference.sid, fundamentals.valuation.market_cap)  
                             .filter(fundamentals.valuation.market_cap > 1e9)  
                             #.filter(fundamentals.valuation_ratios.pe_ratio > 5)  
                             .order_by(fundamentals.valuation.market_cap)  
                             .limit(100),  
                             today)  

Then I wanted to get the prices for the securities so I did:

securities = fund_df.loc['sid']  
daily_prices = get_pricing(  
    securities,  
    start_date='2002-01-01',  
    end_date = '2014-12-31',  
    frequency='daily',  
)  
daily_prices.head()  

This doesn't seem to return anything. What am I doing wrong?

1 response

Figured it out... the range was too long. Changed it to '2014-01-01' to '2014-12-31' and everything was fine