For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
16 0 1 3

ESG get historical data issue

I am trying to pull ESG data using Python API. However, the return is not consistent.

I tried to get Environmental Pillar Score for some US stocks as of 2020-03-05. Below was the output when I ran it first time:(cannot get data for A,CFR and CGNX.O)

And I ran the same code again: (cannot get data for AA,CFG and CFX)

Could you please help?


eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonesg
1615471054358.png (37.0 KiB)
1615471151357.png (36.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
39.2k 75 11 27

@byan

I was under the impression that ESG scores don't change once calculated. This is actually not correct. According to the ESG Scores Methodology Brochure available from MyRefinitiv the scores for the 5 most recent years are recalculated weekly. So some changes in the values of ESG scores for any of the 5 most recent years are expected. This is likely the reason for the slight discrepancy in the values of TR.TRESGScore for AAPL.O for FY2019 I retrieved on 2021-03-15 and you retrieved on 2021-03-18. Weekly updates to ESG Scores don't make the dataset weekly, as Refinitiv does not store historical updates to ESG Scores as weekly timeseries. Only the latest value for ESG Scores is stored for each financial year. ESG Scores for fiscal years prior to the most recent 5 are marked as "definitive" and are not recalculated even if there are changes to the underlying data due to company restatements or data corrections.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

Hi @byan,

What is your instrument list and what is the your Python, Eikon module versions?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
16 0 1 3

Hi @ Gurpreet . I just randomly selected 200 stocks(primary ric). My Python version is 3.6.10. My Eikon version is 1.0.1.

you can try below list

['A', 'AA', 'AAL.O', 'PRG', 'AAP', 'AAPL.O', 'AAT', 'AXON.O', 'ABBV.K', 'ABC', 'ABMD.O', 'ABNB.O', 'ABT', 'ACAD.O', 'ACC', 'ACGL.O', 'ACM', 'ACN', 'ADBE.O', 'ADC', 'ADI.O', 'ADM']

Thanks.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

I tried this multiple times and always get the same data. Can you update your eikon module to latest version and try again:


(eikon) >>>pip list
Package             Version
------------------- ---------
eikon               1.1.9


(eikon) >>>python Test5.py
   Instrument  Environmental Pillar Score
0           A                   77.877046
1          AA                        <NA>
2       AAL.O                   59.471972
3         PRG                    6.695157
4         AAP                   27.078558
5      AAPL.O                        <NA>
6         AAT                        <NA>
7      AXON.O                         0.0
8      ABBV.K                   71.678722
9         ABC                   41.342326
10     ABMD.O                         0.0
11     ABNB.O                        <NA>
12        ABT                   75.891199
13     ACAD.O                         0.0
14        ACC                        <NA>
15     ACGL.O                        <NA>
16        ACM                   63.261252
17        ACN                        <NA>
18     ADBE.O                   76.102671
19        ADC                        <NA>
20      ADI.O                   94.313856
21        ADM                   75.214716

(eikon) >>>python Test5.py
   Instrument  Environmental Pillar Score
0           A                   77.877046
1          AA                        <NA>
2       AAL.O                   59.471972
3         PRG                    6.695157
4         AAP                   27.078558
5      AAPL.O                        <NA>
6         AAT                        <NA>
7      AXON.O                         0.0
8      ABBV.K                   71.678722
9         ABC                   41.342326
10     ABMD.O                         0.0
11     ABNB.O                        <NA>
12        ABT                   75.891199
13     ACAD.O                         0.0
14        ACC                        <NA>
15     ACGL.O                        <NA>
16        ACM                   63.261252
17        ACN                        <NA>
18     ADBE.O                   76.102671
19        ADC                        <NA>
20      ADI.O                   94.313856
21        ADM                   75.214716
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
16 0 1 3

@Gurpreet . Thank you for your reply. I just tested with eikon 1.1.9.

I ran the code with the list I sent to you and I got same return as yours. However, there is still an issue with the return. i.e. there is not supposed to be any NA value in the return. E.g. Instrument AA should be 86.072087 as of 2020-03-05; AAPL.O should be 56.869444 as of 2020-03-05 etc.

Another issue is when I expand the list to 200 names, the same original issue occurred again - I get different returns every time when I run it.

please try this list

['A', 'AA', 'AAL.O', 'PRG', 'AAP', 'AAPL.O', 'AAT', 'AXON.O', 'ABBV.K', 'ABC', 'ABMD.O', 'ABNB.O', 'ABT', 'ACAD.O', 'ACC', 'ACGL.O', 'ACM', 'ACN', 'ADBE.O', 'ADC', 'ADI.O', 'ADM', 'ADP.O', 'ADPT.O', 'ADS', 'ADSK.O', 'AEE', 'AEO', 'AEP.O', 'AER', 'AES', 'AFG', 'AFL', 'AGCO.K', 'AGIO.O', 'AGNC.O', 'AGO', 'AGR', 'AIG', 'AIV', 'AIZ', 'AJG', 'AKAM.O', 'AKR', 'AL', 'ALB', 'ALGN.O', 'ALK', 'ALKS.O', 'ALL', 'ALLE.K', 'ALLY.K', 'ALNY.O', 'ALRM.O', 'ALSN.K', 'ALV', 'ALXN.O', 'AMAT.O', 'AMCR.K', 'AMCX.O', 'AMD.O', 'AME', 'AMED.O', 'AMG', 'AMGN.O', 'AMH', 'AMP', 'AMT', 'AMZN.O', 'AN', 'ANAT.O', 'ANET.K', 'ANF', 'ANSS.O', 'ANTM.K', 'AON', 'AOS', '<NA>', 'APAM.K', 'APD', 'APH', 'APO', 'AR', 'ARCC.O', 'ARD', 'ARE', 'ARES.K', 'ARMK.K', 'ARNC.K', 'ARW', 'ASB', 'ASH', 'ATI', 'ATO', 'ATR', 'ATUS.K', 'ATVI.O', 'AVB', 'AVGO.O', 'AVLR.K', 'AVT.O', 'AVTR.K', 'AVY', 'AWI', 'AWK', 'AXP', 'AXS', 'AXTA.K', 'AYI', 'AYX', 'AZO', 'AZPN.O', 'BA', 'BAC', 'BAH', 'BAX', 'BBBY.O', 'TFC', 'BBY', 'BC', 'BDX', 'BEN', 'BERY.K', 'BFb', 'BFAM.K', 'BG', '6160.HK', 'BHF.O', 'BKR', 'BIG', 'BIIB.O', 'BILL.K', 'BIO', 'BJRI.O', 'BK', 'BKD', 'BKI', 'BKNG.O', 'BKU', 'BL.O', 'BLI.O', 'BLK', 'BLKB.O', 'BLL', 'BLUE.O', 'BMRN.O', 'BMY', 'BOH', 'BOKF.O', 'BPOP.O', 'BPYU.O', 'BR', 'BRKa', 'BRKR.O', 'BRO', 'BRX', 'BSX', 'BURL.K', 'BWA', 'BWXT.K', 'BX', 'BXP', 'BYND.O', 'C', 'CABO.K', 'CACC.O', 'CACI.K', 'CAG', 'CAH', 'CAR.O', 'CARR.K', 'CASY.O', 'CAT', 'CB', 'CBRE.K', 'CBLAQ.PK', 'CBOE.K', 'VIAC.O', 'CBSH.O', 'CBT', 'CC', 'CCI', 'CCK', 'CCL', 'CCO', 'CCOI.O', 'CDAY.K', 'CDK.O', 'CDNS.O', 'CDW.O', 'CE', 'PRDO.O', 'CERN.O', 'CF', 'CFG', 'CFR', 'CFX', 'CG.O', 'CGNX.O', 'CHD']

My first run result using above list under eikon1.1.9 is:

second run result is :


1615582234180.png (30.1 KiB)
1615582266419.png (30.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

I have verified that this problem happens. I have raised a support ticket 9706108 on your behalf. You should get updates to this issue directly in the email.

Thank you for your help!

Upvotes
39.2k 75 11 27

@byan

While we acknowledge that the service should return consistent results for the same request, and while we're investigating this issue you reported, I couldn't help but notice that the request you execute is not very meaningful for ESG data model. ESG scores are annual, and their availability may vary across companies and fiscal years. E.g. the latest value we have for TR.EnvironmentPillarScore for AAL.O is for the fiscal year 2019, but for PRG it is for fiscal year 2018. Given this data model, the SDate parameter is not very meaningful. Instead I strongly recommend using the parameter named Period and explicitly specifying fiscal year you're requesting data for. Otherwise you easily end up with scores corresponding to different fiscal years for different companies. The following request seems to produce the same result every time I run it on my end

ek.get_data(sub_list, ['TR.EnvironmentPillarScore(Period=FY2019)'])
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

@Alex Putkov. Thank you for your reply.

Environment Pillar Score is just one of the ESG components I want to include into my work. Even so, I just checked AAPL as an example, the Environment score is 57.5384530276711 as of 2021-03-12, 57.4055961851233 as of 2021-03-11, and ESG score is 82.5699024339861 as of 2021-03-12, 82.4309402907857 as of 2021-03-11. It looks like the score is keep changing but not updated yearly. Could you please clarify it for me or it would be great if you can share me any documents about the detail of ESG data model. In the same time, I will wait for your team to resolve this issue. Thanks!


The results you retrieve are very hard to interpret, but it is clear that they're incorrect. I do not reproduce TR.EnvironmentPillarScore and TR.TRESGScore returning different results for AAPL.O when SDate is set to '2021-03-12' and '2021-03-11'. In both cases I get the same numbers corresponding to FY2019. For TR.EnvironmentPillarScore the number is 57.538453027671096 and for TR.TRESGScore it is actually 66.9709649719215. The number you get for TR.TRESGScore is drastically different. I'm not sure why this happens. I'm guessing it is related to the problem you reported and that Refinitiv Support is investigating in case #9706108. I'm also guessing the problem only manifests when you retrieve ESG data for multiple stocks, which is probably why I couldn't reproduce it when requesting AAPL.O alone.
The comments I made in my previous response still stand. ESG data set (with the exception of controversies) is annual, and I strongly recommend using Period parameter instead of SDate to retrieve it.

@Alex Putkov. Thank you for your reply. Apologize I made a typo, it should be governance score not ESG score. I checked with excel API and confirmed the number is annually reported. However, as you mentioned above, the ESG score you got is 66.9709649719215 but what I got for this year is 66.88270949(same result returned with both excel and Python API). what causes the differences between your result and mine? Is the difference expected, or it's the same issue as what i raised up earlier in case #9706108 ?


1616082089539.png (34.9 KiB)
Click below to post an Idea Post Idea