Python returns N/A for ESGC Score of an instrument into a list while DIB on the same instrument repo

When I run this code in Python:

...

index = '.STOXX'

DateR='2018-12-31'

df,err = ek.get_data('{}{}({})'.format('0#', index, DateR), fields=['TR.TRESGCScore'],

parameters={'SDate': '{}'.format(DateR), 'Period': 'FY0'})

...

Python returns N/A for some instruments like BOUY.PA. However the DIB of the same date and instrument reports 64.44.

How can I obtain the right historical ESGC Score in my Python request for all instruments into an index at a specific date?

Best Answer

  • @patrick.sentis

    For ESG scores I strongly recommend to not use the SDate parameter, and instead specify the absolute financial period in the request. E.g. to retrieve the scores for 2017 use

    ek.get_data('0#.STOXX(2018-12-31)', ['TR.TRESGCScore'], 
    {'Period': 'FY2017'})

    Note that in the above expression the significance of the 2018-12-31 date is only that the index constituents are returned as of that date.

    For a bit more color on the issue you experienced, see my answers in the discussion on the previous thread on similar topic following the link below

    https://community.developers.refinitiv.com/questions/74916/esg-get-historical-data-issue.html

Answers

  • Hi @patrick.sentis,

    There doesn't appear to be any ESG data for the .STOXX price index. I would suggest you contact the helpdesk when inquirying about data availability.

    Regarding BOUY.PA, I am able to retrieve historical scores. You didn't include a code example to confirm. This is what I did:

    df, err = ek.get_data(['BOUY.PA'],["TR.TRESGScore(SDate=2018-12-31,Period=FY0)"])
    df

    The above field was generated by the DIB.

    image

  • @nick.zincone.1 and @Alex Putkov: Thank you very much for your replies. Indeed, it works and I have found a similar solution before my query. However the backward updating of rate significantly deprecates any historical study based on the older rates. It's a pity to not have a comprehensive and consistant historical database on ESG data.