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

question

Upvotes
Accepted
3 1 0 0

How to retreive SIC codes via Eikon Data API?

So far I have searched for the data item via DIB and formula wizzard quite extensively. I have found NAICS, TRBCs and several else but no SICs.

Have I missed it? How can I retrieve it via Eikon Data API?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apifundamentals
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
10.1k 18 6 9

Hi @MisterM - yup the above code will only work for Fixed Income Instruments. We provide a number of classification schemas including as you have found NAICS, GICS, TRBC. Those you can find via the Eikon Data API. Sadly we dont provide SIC codes via the Eikon Data API.

I found a site that seems to map bi-directionally NAICS to SIC and vice versa - depending on the level of detail you are after eg sector, subsector, industry group etc. You can find that here. You can get the NAICS code and then try converting it on that site using the SIC Crosswalk. I did it here for AAPL.O at the lowest level of granularity in terms of NAICS code. You can select which level of aggregation is most appropriate to you. Its not great but it might help you.

The following code should get you all the NAICS codes you need (you can of course add multiple instruments

  1. df,err = ek.get_data(['AAPL.O','MSFT.O'], ['TR.NAICSSectorCode','TR.NAICSSubsectorCode', 'TR.NAICSIndustryGroupCode','TR.NAICSInternationalIndustryCode','TR.NAICSNationalIndustryCode'])
  2. df



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.

Thank you for the help, I was afraid that might be the case.

I am thinking about using Datastream to retrieve the SICs, even though I would have to use the Excel plug-in, because I cant access DSWS. Would you agree that this seems to be the better option for my case (1000s of RICs)?

Will I run into trouble using RICs in Datastream? I have actually found conflicting information on that matter. Should I rather use an alternative identifier?

I will need to check that and get back to you if thats ok - in terms of the data its definitely there - see the series labels below:

1581959413275.png (39.1 KiB)

Thanks a lot. It would be great if you let me know what you find out.

Upvote
3.8k 4 4 6

Hi @MisterM

Try with Fixed Income instruments as inputs. There is TRFISIC field that gives you Industry of the issuer based on the Bureau of the Budget Standard Industrial Classification (SIC) code. Structure uses the standard four-digit SIC.

df,err = ek.get_data('09702LBJ3=', 'TR.FISIC')
df
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.

Thank you for that suggestion, that code works as intended. However, it became clear to me that I have not given you some relevant information.

I'm trying to retrieve SIC codes for equities. I have large a list of RICs, that includes publicly traded companies from the U.S.

Hi @MisterM

You can also try some workaround. First you retrieve bond RIC for each company, then choose the first bond one and get the SIC code from there. I do not guarantee that it will work 100%. I have also observed that not all the bonds from the same issuer have the same SIC numbers.

df,err = ek.get_data(['C','IBM'],'TR.BONDRIC')
df.drop_duplicates(subset ="Instrument", keep = "first", inplace = True)
df['SIC'] = ""
for i in df.index:
       df.at[i, 'SIC'] = [ek.get_data(df.at[i,'Bond RIC'],'TR.FISIC')[0].iloc[0,1]][0]
df


ahs.jpg (52.8 KiB)
Upvote
681 2 2 1

Hi, you can you RIC within DFO. You need to use <> parenthesis either side of the RIC. Please speak with your account manager with regards to accessing DSWS

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.

Upvotes
1 0 0 0

Hey everyone,

I totally get the frustration, @MisterM. I've been down that rabbit hole too, searching high and low for those elusive SIC codes via the Eikon Data API. It turns out, though, that they don't provide them through the API, which is a bit of a bummer.

But hey, don't lose hope! I stumbled upon a site that could be a workaround for you (thanks to jason.ramchandani01). It's this site that maps NAICS to SIC codes and vice versa. Depending on how detailed you need it (sector, sub sector, etc.), it might do the trick. I tried it out with AAPL.O using the lowest level of NAICS granularity, and it seemed to work. I've been through this before while working on a project at Andersen, and if I had known the information given here earlier - it would have saved me. But better to find out late than never :)

Oh, and for those who might be wondering, if you're dealing with Fixed Income Instruments, the code you mentioned won't work. The classifications like NAICS, GICS, and TRBC are accessible via the API, just not SIC codes.

For those looking to fetch SIC codes, consider exploring this mapping site alongside the other classifications.

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.