question

Upvotes
0 0 3 8

How to get all bonds issued by companies in an index, e.g. 0#.GDAXHI using python?

How to get all bonds issued by companies in an index, e.g. 0#.GDAXHI using python?

Is there a way we can list down all constituent RICs under 0#.GDAXHI, then use the result in rd.discovery.search > rd.discovery.Views.GOV_CORP_INSTRUMENTS to retrieve all the bonds issued?

eikon-data-apipythonrefinitiv-dataplatform-eikon#technologyrefinitiv-data-platform
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
Upvote
7.3k 18 2 8

Hi @dianne.palmario ,


To list all the constituents you can use the following code:

constituents = rd.get_data("0#.GDAXHI", 'TR.OrgidCode')
constituents 

screenshot-2024-10-25-at-100128.png

As you probably noticed I have additionally requested Issuer OrgID which is going to be used under search:

issuer_org_ids = ' '.join(f"'{org_id}'" for org_id in constituents['ORG ID'])
rd.discovery.search(
view = rd.discovery.Views.GOV_CORP_INSTRUMENTS,
top = 10000,
filter = f"(DbType eq 'CORP' and IsActive eq true and IssuerOrgid in ({issuer_org_ids}))",
select = "RIC,EJVAssetID,DTSubjectName,BusinessEntity,PI,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,DBSTicker,CouponRate,MaturityDate,IssueDate,ISIN,RCSCurrencyLeaf,RCSCountryLeaf,DbTypeDescription,InstrumentTypeDescription,RCSCouponTypeGenealogy,FaceIssuedUSD,RCSBondGradeLeaf,IssuerOrgid"
)


screenshot-2024-10-25-at-100241.png

Hope this helps.


Best regards,

Haykaz



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.

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.