Fundamental codes missing for Reuters Estimates

When loading the entire database of NYSE and retrieving the fundamentals with the function "get_reuters_estimates_reindexed_like", the function breaks as some codes (fundamental id's) are missing for particular stocks. When debugging, I've noticed that the missing codes vary greatly, so when loading a larger set of stocks, I'm wondering how best to do this.

I'm not sure what you mean by "the function breaks." If you mean that data isn't available for all securities so some values are NaNs, yes that's expected and your code should be prepared for NaNs. Pandas is very good for working with NaNs. See the Reuters overview page for a high-level summary of the availability of various indicators/metrics for various exchanges.

If you mean that get_reuters_estimates_reindexed_like throws an exception, please post the traceback.

Hi Brian,

I'm running the following code on a NYSE database of stocks only:

price_test = get_historical_prices("nyse-eod", fields=["Close", "Volume"])
close_test = price_test.loc["Close"]
codes=['EBIT','EBITDA','BVPS','CAPEX','CPS','DPS','EPS','EPSREP','NAV', 'NDEBT',  'NPROFIT',  'OPROFIT',  'PPROFIT',  'PPROFITREP', 'REVENUE', 'ROA', 'ROE']

test_codes = get_reuters_estimates_reindexed_like(
                            close_test,
                            codes=codes)

At run-time, the following error occur. I've created a try and except example and found that almost all fundamental codes are missing at some point when reviewing the nyse stocks. Do you know how I can avoid this issue and collect as many fundamentals as possible for every stock on nyse?

HTTPError: ('400 Client Error: BAD REQUEST for url: http://houston/fundamental/reuters/estimates.csv?codes=EBIT&codes=EBITDA&codes=BVPS&codes=CAPEX&codes=CPS&codes=DPS&codes=EPS&codes=EPSREP&codes=NAV&codes=NDEBT&codes=NPROFIT&codes=OPROFIT&codes=PPROFIT&codes=PPROFITREP&codes=REVENUE&codes=ROA&codes=ROE&start_date=1978-07-06&end_date=2018-06-14&period_types=Q&fields=Actual&fields=UpdatedDate', {'status': 'error', 'msg': 'No estimates match the query parameters'})

It sounds like there are no estimates in your local database. You have to fetch them from IB first: Usage Guide

Also, see Performance improvement when using Reuters estimates with large datasets