How to retrieve the constituent bonds of a certain CDS through python API?
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
How to retrieve the constituent bonds of a certain CDS through python API?
Hi @oriana.xfu ,
Please check the following workflow to get ref obligations for the singe name CDS
1. get constituent bond ISINs:
df, err = ek.get_data('AAPL5YUSAX=R', fields = ["TR.BondISIN"]) df
2. Request CDS related fields and filter the results to show the bonds with Metrkit ref Obligation name:
ref_obligations, err = ek.get_data(df['Bond ISIN'].to_list(), fields = ["TR.CDSRED9", "TR.FiCurrency", "TR.CPTYPE", "TR.ADF_COUPON", "TR.FIMaturityDate", "TR.FiIsConvertible", "TR.CDSMarkitOBName", "TR.CDSMarkitSeniority"]) ref_obligations[ref_obligations['Markit Ref Oblig. Name'] != 'NA']
Best regards,
Haykaz
Hi @oriana.xfu ,
If I got your question right and ITAIG5Y40= is a type of CDS RIC you might be after, then you can perhaps use the following code:
df, err = ek.get_data('ITAIG5Y40=', fields = [ "TR.CDSConstWeight", "TR.CDSConstFITIID", "TR.CDSConstOrgName", "TR.CDSConstCUSIP", "TR.CDSConstRED6"]) df
Hope this helps.
Best regards,
Haykaz
Thank you for your help @aramyan.h. I note that your example (ITAIG5Y40=) refers to an index CDS. What I'm trying to retrieve are the reference obligations of specific single-name CDS instruments (e.g., AAPL5YUSAX=R), while Eikon returns nothing on the above-mentioned code. Is there any way to achieve this?