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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
27 2 1 5

Retrieve historic credit ratings of bonds through Python API

Hi,

I am looking to retrieve the credit rating of a bond, e.g. ZA054708297=, at a specific historic value date.

I tried retrieving `TR.FiMoodysRating`, `TR.FiIssuerSPLongRating`, `TR.FiIssuerFitchLongRating` while supplying a `EDate` and `SDate` parameter, but the results suggest i'm only getting the current credit rating, not the one at the `EDate`/`SDate`.

Which credit rating fields do support historic queries?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonbonds
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.

1 Answer

Upvotes
Accepted
6.7k 8 6 7

Hi @tr105 Thanks for your question. If you use the Data Item Browser app (type DIB into Eikon search bar) you can type in the instrument and see all the fields available - you can also check all parameter options such as providing a series. But for the purposes of your query first check what fields are returning any type of ratings data (see screenshot below):

Once you have a field that looks populated (the field you requested does not have any rating for this instrument) - for example TR.IssueRating you can then click on parameters to see if the series checkbox is available. Or alternatively for a single point historical request just put the request in the the SDate parameter ONLY - set to the historical date you want. (See screenshot below and code snippet for single point request):

Here is the code:

df, err =ek.get_data('ZA054708297=', ['TR.IssuerRating(SDate=2019-08-31)','TR.IssuerRating(SDate=2019-08-31).date']) df

1586170454301.png (335.7 KiB)
1586171455272.png (358.7 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.

Click below to post an Idea Post Idea