ESG data for indices with Eikon data API

Hi,


I am trying to get ESG data for indices for example 'SPX', using the following code:

etf_esg, err = ek.get_data('SPX',

['TR.TRESGScore','TR.TRESGScoreGrade','TR.ESGCScore',"TR.TRESGCScoreGrade",'TR.EnvironmentPillarScore','TR.SocialPillarScore','TR.fdfdf','TR.TRESGResourceUseScore'])

However, it returns only NaN values in Python.

How can I retrieve data properly?

Best,

Rupert

Best Answer

  • jason.ramchandani01
    Answer ✓

    Hi @Rupert.Geyang - thanks for your question. ESG Scores are provided at a company level. So if you wanted to check out a particular index - then you would get the constituents of that index and then get the ESG scores for all the constituents and then maybe provide an aggregate score weighted by either marketcap or revenue or profit etc. You can get the constituents of an index by providing a chain RIC - in the case of SPX that is '0#.SPX'

    etf_esg, err = ek.get_data('0#.SPX',
    ['TR.TRESGScore','TR.TRESGScoreGrade','TR.ESGCScore',"TR.TRESGCScoreGrade",'TR.EnvironmentPillarScore','TR.SocialPillarScore','TR.fdfdf','TR.TRESGResourceUseScore'])

    image

    I hope this can help.

    We also have an article on how to use ESG data overtime as you might find that of interest.

Answers