Reproducibility issues when applying screener app in Eikon API (filters = country of HQ + total rev)

perezludena
perezludena Newcomer
edited March 3 in Eikon Data APIs

Hello,

I am using the eikon API with python in a jupyter notebook. Within this, I am having reproducibility issues with the screener function when I screen for US companies with a 250M USD minimum total revenue. I want to compare revenue values as a function of timepoint (to help me better understand the timepoint specification parameters + any impact of companies' staggered financial periods on filtered outputs), so I output a bunch of revenue values for the screened entities. My confusion/the apparent inconsistencies rest in the companies determined to meet the following two criteria:

  • Total Revenue from Business Activities >= 250 million USD,
  • Country of Headquarters = USA.

I believe the following code represents the application of this screener to the pubco universe as intended:

fields_fiverevs = ["TR.RIC", "TR.CompanyName", "TR.HeadquartersCountry", "TR.F.TotRevenue(SDate=0CY,Period=FY0,Scale=6)", \"TR.F.TotRevenue(SDate=-1CY,Period=FY0,Scale=6)", "TR.F.TotRevenue(SDate=-2CY,Period=FY0,Scale=6)", \"TR.F.TotRevenue(SDate=0CY,Period=FY-1,Scale=6)", "TR.F.TotRevenue(SDate=-1CY,Period=FY-1,Scale=6)", \]


filter_24AS_250M_US0CY = 'SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), \    IN(TR.HQCountryCode,"US"), \    TR.F.TotRevenue(SDate=0CY,Period=FY0,Scale=6)>=250, CURN=USD)'

df0221_250M_US0CY,e = ek.get_data(filter_24AS_250M_US0CY, fields_fiverevs)

However, when I run this code on different days in February, the dimensions of the output dataframes are quite different:

  • run on 21 Feb outputs 1039 companies
  • run on 28 Feb outputs 1480 companies.

(I don't think this is because ~300 companies not only have closed a new financial period in that 8-day window and also have markedly lower revenue in the now "newest" financial period.) So, why are these output samples so different in size?

Also related, when I assign a timepoint "as of" date of -1CY instead of 0CY, I also see inconsistent behavior with respect to both:

  • the 0CY corollary - the number of companies differs by ~100%, which doesn't seem right
    • run on 21 Feb outputs 2302 companies
    • run on 28 Feb outputs 2325 companies
  • again, different output sizes on different days (see above^)

This issue originally came to my attention because running a near identical script in the fall of 2024 omitted some expected big name entities (eg Amazon, PepsiCo). When I pull revenue data from suspicious "missing" companies in other ways (e.g. exports from their profile pages), the "revenue from business activities - total" values do confirm that the 250M minimum threshold should have been met in screener.

Thank you!

Answers

  • Hi @perezludena ,

    Thank you for posting the question in this forum. However, this forum is dedicated to an API usage question hence, the moderators on this forum do not have deep expertise inevery type of content available through LSEG products. Such expertise isavailable through the helpdesk, which can be reached via MyAccount. To be of help, ticket number 14452441 was raised on your behalf and the support team is going to contact you directly toassist with this.

    Hope this helps and please let me know in case you have any further questions.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @perezludena

    I ran the code and it returned 1516 rows. Sometimes, it returned 1515 rows.

    It could be the problem in the backend. You may need to replicate this issue on the Eikon or Workspace Excel and then report this issue to the Eikon or Workspace Excel support team via MyAccount.

  • perezludena
    perezludena Newcomer

    Hi,

    Helpdesk had initially directed me to this forum, so thank you so much for opening this ticket in "MyAccount" — I am monitoring that post for helpful replies.

    Best regards

  • perezludena
    perezludena Newcomer

    Thanks for the input. The Eikon app is so slow that I wasn't trying to pursue it as an alternative; and Excel is not an option because I want traceability to the input calls through some kind of code/script. But I do see there would be diagnostic value in checking for issue replication there. But regardless, I would need a solution within the API.

    Thanks for exploring.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @perezludena

    We need the results from Excel to confirm that the problem is in the backend service, not API.

    Both API and Excel retrieve data from the same backend service. If we can prove that the problem also happens on the Eikon Excel, the Excel team team will verify the problem on the backend service.

  • FYI, to anyone interested - after some persistence, Helpdesk has acknowledged that the observed discrepancies do indeed represent a legitimate issue in the database functionality and is continuing to debug/look for a solution.

  • FYI, to anyone interested - after some persistence, Helpdesk has acknowledged that the observed discrepancies do indeed represent a legitimate issue in the database functionality and is currently continuing to debug/look for a solution.