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
1 1 2 3

map stocks to industry

Hi,

I am trying to map stocks to their respective industry. How to go about it using API? For example , I would like to identify AAPL to Technology sector using GICS classification or any other available classification. How I go about it. It is limited to US stocks only

eikoneikon-data-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

@rsharan

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
79.1k 250 52 74

@rsharan

You can use Eikon Data API to retrieve business classifications for both TR and GICS classifications. The code looks like this:

df,err = ek.get_data(
    instruments=['AAPL.O','PTT.BK'],
    fields=['TR.TRBCEconomicSector',
            'TR.TRBCBusinessSector',
            'TR.TRBCIndustryGroup',
            'TR.TRBCIndustry',
            'TR.GICSSector',
            'TR.GICSIndustryGroup',
            'TR.GICSIndustry',
            'TR.GICSSubIndustry'])
df

The output is:
1624245292515.png

For more information, please refer to:


1624245292515.png (34.9 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.