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?
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.
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']
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
@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 :
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