question

Upvotes
Accepted
3 0 1 3

How to *exact match* on company name in Eikon/Python

I am using Spyder in Windows with Eikon API.


I am trying to extract information on companies using their company name. My personal data of both inactive and active public and private companies, through which I'm trying to match company names, does *not* have RIC, PermID, or any other corresponding code. All it has is the common company name. Note that the command Contains(TR.CommonName) will *not* work for me since It will provide many unnecessary matches, increase data acquisition time exponentially, and get closer to my rate limit.


This requires me to use a (case-insensitive) exact matching system, where I only extract companies with names that exactly match the ones in my dataset (proxied here by instrument_code). But I can't seem to obtain any information about the companies of interest through my code.


Any help would be appreciated.


Here is my code:


instrument_code = 'APPLE INC'

screener_query = f"SCREEN(U(IN(Equity(active,inactive,public,private,primary))), TR.CommonName == '{instrument_code}',Curn=USD)"

df, err = ek.get_data(screener_query, fields = ['TR.F.RnD', 'TR.F.RND.date'],
parameters = {'SDate': '0', 'EDate': '-34', 'Frq': 'FY'})

```

#technology#contentcompanyfinancial-statements
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.

Upvote
Accepted
17.4k 82 39 63

Hi @zachary.r.luther

There may be a way to do this using Screener, but based on some of my attempts, I wasn't able to capture the details. However, you could try using a combination of Search and get_data(). For example, using the Refinitiv Data Library for Python:

import refinitiv.data as rd
from refinitiv.data.content import search

...

# Given you only have a company name, you can use Search to perform an exact match (xeq)
company_name = 'Apple Inc'
company =rd.discovery.search(
    view = search.Views.ORGANISATIONS,
    filter = f"CommonName xeq '{company_name}' and IsPublic eq true",
    select = "PrimaryRIC"
)

# Then retrieve you data via get_data using the RIC
rd.get_data([company.iloc[0,0]], fields = ['TR.F.RnD', 'TR.F.RND.date'],
            parameters = {'SDate': '0', 'EDate': '-10', 'Frq': 'FY'})

1696365519137.png


1696365519137.png (41.4 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.

Hi Nick,


This works wonders for my purposes. Another question, though. I also have private companies too (e.g., "Versace UK Ltd"); how can I search among the universe of public *and* private companies (regardless if they're active or not)? Should I be pulling by PermID instead of RIC? I'm a tad unfamiliar with the rd module since I've just been working in the eikon module so far.


Hey @nick.zincone ,


I am working with a similar problem as Zachary, where I only have company names (and 6-digit CUSIP codes for what I have yet to find any use in this Refinitiv Eikon).

I was wondering whether it is possible to automate the search so I can import a string with different company names and get the financial data (eg. revenue, Total Assets) for each company. I have >2500 companies, and splitting them is evitable; however, a list of a couple hundred would already save a lot of time.


I have a developed code that gives an output of only 10 companies that I add below:


10_comp.txt


Additionally, is there a way to find companies also from their FormallyKnownAsName? There is such an entry in the Data Item Browser; however, putting it as an xeq filter does not seem to recognize it. Perhaps there is a place to look up such filters?


Any help would be greatly appreciated!

10-comp.txt (1.9 KiB)
Hi @silver.kasper, I would recommend you post a new question on this topic and certainly reference this question if it helps with your explanation. Your new question will allow the entire community to participate.
A workaround I tried was to fuzzy match on company name using the PermID API (free to access), then using the PermIDs in the resulting matches to connect to the financial data. It seemed pretty robust at first glance, but not perfect, and the PermID fuzzy matching algorithm is proprietary, so accuracy is uncertain when you're dealing with thousands of firms.
Upvotes
17.4k 82 39 63

Hi @zachary.r.luther

I don't believe you can retrieve the same fundamental data for private companies. Specifically, I cannot find any details for "Research and Development Expense". For example, when I search for "Apple Inc" private companies, I see a total of 4 that pop up. One of them that has a PermID of: 5058998812, does have some information, but not historical details you are after.

1696372305526.png

As your questions are delving into the content side, I would suggest you access the "Get Help & Support (F1)" and they will bring in a content expert to address your question.


1696372305526.png (153.2 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.