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


135 15 10 10

Issue getting credit ratings data with Python

Hello! I am trying to download all flavors of Fitch credit rating for Alinma Bank (1150.SE) with Eikon DAPI (Python). The formula that I am using is correct and returns ratings for other entities, but not for Alinma Bank, unfortunately. I basically go through all Fitch rating sources as indicated in the RATMON file. There is no problem with the formula, it is correct.

Fitch_rating, err = ek.get_data(instruments=["1150.SE"],fields=['TR.IssuerRating(IssuerRatingSrc=FIS)','TR.IssuerRating(IssuerRatingSrc=FSS)','TR.IssuerRating(IssuerRatingSrc=FDL)','TR.IssuerRating(IssuerRatingSrc=FDS)','TR.IssuerRating(IssuerRatingSrc=FBB)','TR.IssuerRating(IssuerRatingSrc=FBD)','TR.IssuerRating(IssuerRatingSrc=FBN)','TR.IssuerRating(IssuerRatingSrc=FBP)','TR.IssuerRating(IssuerRatingSrc=FBR)','TR.IssuerRating(IssuerRatingSrc=FBS)','TR.IssuerRating(IssuerRatingSrc=FBU)','TR.IssuerRating(IssuerRatingSrc=FBV)','TR.IssuerRating(IssuerRatingSrc=FCP)','TR.IssuerRating(IssuerRatingSrc=FDT)','TR.IssuerRating(IssuerRatingSrc=FFN)','TR.IssuerRating(IssuerRatingSrc=FFQ)','TR.IssuerRating(IssuerRatingSrc=FIF)','TR.IssuerRating(IssuerRatingSrc=FIN)','TR.IssuerRating(IssuerRatingSrc=FIV)','TR.IssuerRating(IssuerRatingSrc=FJB)','TR.IssuerRating(IssuerRatingSrc=FMC)','TR.IssuerRating(IssuerRatingSrc=FME)','TR.IssuerRating(IssuerRatingSrc=FMO)','TR.IssuerRating(IssuerRatingSrc=FMT)','TR.IssuerRating(IssuerRatingSrc=FMU)','TR.IssuerRating(IssuerRatingSrc=FNQ)','TR.IssuerRating(IssuerRatingSrc=FOC)','TR.IssuerRating(IssuerRatingSrc=FPC)','TR.IssuerRating(IssuerRatingSrc=FSB)','TR.IssuerRating(IssuerRatingSrc=FSC)','TR.IssuerRating(IssuerRatingSrc=FSE)','TR.IssuerRating(IssuerRatingSrc=FSF)','TR.IssuerRating(IssuerRatingSrc=FSR)'])

What it returns is NaN (empty) for all fields, although Eikon Terminal shows that there is a BBB+ rating for Fitch Long-Term Issuer Default Rating (rating source code=FDL), please see in the formula above. What is the issue with that? Many thanks for your help!

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.

1 Answer

· Write an Answer
3.8k 4 4 6

Hi @oleksandr.yermolayev

Try this one:

ek.get_data('1150.SE', ['TR.IssuerRating.date','TR.IssuerRating.RatingSourceDescription','TR.IssuerRating'], {'IssuerRatingSrc':'FBS:FSF:FDL', 'RatingScope':'All'})

ahs.jpg (34.0 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.

@ Many thanks for the formula, however the aim is different. The point is to be able to get all possible ratings for a list of issuers (e.g. 200 issuers) in an automated fashion and there is no issue with my formula as it returns ratings for other entities. So i cannot tailor the formula to each separate issuer, I just need to screen all ratings.

Can the problem be that the Fitch Long-Term Issuer Default Rating (FDL rating) is with the attribute "Foreign"? How should I modify the 'TR.IssuerRating(IssuerRatingSrc=FDL)' to reflect the FRN type? Just adding FDL FRN does not work.

Many thanks for your help!

Hi @oleksandr.yermolayev

I suggest then to try:

ek.get_data('1150.SE',['TR.IssuerRating.date','TR.IssuerRating.RatingSourceDescription','TR.IssuerRating.ScopeDescription','TR.IssuerRating'],{'IssuerRatingSrc':'FIS:FSS:FDL:FDS:FBB:FBD:FBN:FBP:FBR:FBS:FBU:FBV:FCP:FDT:FFN:FFQ:FIF:FIN:FIV:FJB:FMC:FME:FMO:FMT:FMU:FNQ:FOC:FPC:FSB:FSC:FSE:FSF:FSR', 'RatingScope':'All'}) 

ahs2.jpg (60.8 KiB)

@ Many thanks for this formula, this is much better and serves its purpose perfectly

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.