Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles


5 1 4 8

Filter companies based on a compound keyword in the Business Description: normalization for singular, plural, hyphens etc.

I am trying to understand how I should account for all possible cases, when I am looking for companies that contain a compound keyword in their Business Description. For the sake of illustrating my point, let us take the following company:

Company Common Name: Oxford Lasers Ltd

Identifier: 4296593425

Business Description: Supplies laser solutions to science and industry. The Company provides imaging solutions using digital high speed cameras, lasers and software. The Company also provides precision laser micro machining using repetition rate pulsed lasers to provide system solutions for industrial production.

Now let us say that I would be interested in finding all companies that contain laser solutions in the Business Description, but of course, I would also like to pick all variations around it: laser solutions, Laser solutions, Laser Solutions, LASER SOLUTIONS, laser solution, laser-solutions, lasers solutions, lasers solution ... and all the rest. I care about the meaning of the keyword.

I tested 8 different cases list above. The first 5 work (i.e. they return Oxford Lasers Ltd):

  1. laser solutions
  2. Laser solutions
  3. Laser Solutions
  5. laser solution.

But the last 3 don't:

  1. laser-solutions
  2. lasers solutions
  3. lasers solution

The Business Description contains laser solutions. Interestingly, laser solution works, but lasers solution does not. It seems like the keyword search accounts for the singular of the typed word (when the word is plural), but it does not work the other way around: when the typed keyword is singular, its plural is not picked up.

I would like to know how I can pick all possible variations. I can experiment with all possible variations I can come up with, to infer what the code in refinitiv is doing, but it would be more efficient if someone told me directly what is going on in the backend. Therefore:

What is the piece of code that is processing the inputed keyword, as shown in the image below?


Or from my Jupyter notebook:

syntax = f"SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))),"\
            f" IN(TR.HQCountryCode,""GB""),"\
            f" IN(TR.TRBCEconSectorCode,""56""),"\
            f" IN(TR.TRBCIndustryCode,""56101010""),"\
            f" Contains(TR.BusinessSummary,\'{keyword}\'),"\
            f" CURN=USD, TR.OrganizationStatusCode=Act)"

fields = ["TR.CommonName"]

df, e = ek.get_data(syntax, fields)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
32.2k 40 11 19

Hello @bm01 ,

I would approach this requirement in a certain way to be discussed next

(a quick disclaimer, I am a developer, not an Eikon content expert):

1. Run Eikon/Refinitiv Worspace Screener tool

2. Use it to define the exact Eikon screen expression, that you require

3. Export the ready screen expression as formula into Eikon/RW Excel.

4. Use the same expression in code.

For example:

Running "Screener"


Once you are satisfied you have included all the expressions per your requirements:


And then you should have in your Excel something like:

=@TR("SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), (Contains(TR.BusinessSummary,""Laser Solutions"") OR Contains(TR.BusinessSummary,""laser solutions"") OR Contains(TR.BusinessSummary,""LASER SOLUTIONS"")), CURN=USD)","TR.Commo"&"nName;TR.BusinessSummary","curn=USD RH=In CH=Fd")

This should allow to identify the max set, and that, once migrated into EDAPI code would look similar to:

syntax = "SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))), IN(TR.HQCountryCode,""GB""), IN(TR.TRBCEconSectorCode,""56""), "\
            f" IN(TR.TRBCIndustryCode,""56101010""), "\
            f" Contains(TR.BusinessSummary,""\"laser solutions\""") OR "\
            f" OR Contains(TR.BusinessSummary,""Laser solutions"") OR "\
            f" Contains(TR.BusinessSummary,""LASER SOLUTIONS""), "\
            f" CURN=USD, TR.OrganizationStatusCode=Act)"
fields = ["TR.CommonName","TR.HeadquartersCountry","TR.TRBCEconomicSector","TR.TRBCIndustry","TR.BusinessSummary"]
df, e = ek.get_data(syntax, fields)

Using this approach, you should be able to assess the result for correctness, iteratively, and tune the expression via screener, till the result is satisfactory per your requirement.

this relevant article "Find Your Right Companies with SCREENER | Eikon Data APIs(Python)" may be helpful in learning how to use Screener tool.

As a customer, you may also wish to contact Refinitiv content experts via Refinitiv Helpdesk Online -> Content -> Eikon asking to help you select the list of companies per your requirements using Screener, and next you can use the derived expression in your EDAPI code same as step 4; or if you would like additional or more in-depth information on the content that you require.

Hope this information helps

rwscreener.gif (196.6 KiB)
rwscreenerexport.gif (208.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.