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?
For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
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
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:
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.
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
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