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?
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
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
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.
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:
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
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
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.