How to retrieve bond rating and sector credit curve data - using Python API

EikonUser1234
EikonUser1234 Newcomer
edited March 18 in Eikon Data APIs

Hello, I have a datasheet with a list of bond ISINs for which I have a start date, end date, the sector classification, currency and rating information. For each bons in the dataset I would like to retrieve the currency-sector-rating specific credit yield curve starting at its specific start and end date. I am facing the issue that the tenor coverage can differ depending on the underlying yield curve and therefore I cannot simply append the yield curves into an entire dataset but check or retrieve by tenor. I would like to use the python API. Can anyone give me the code / query to retrieve this kind of data given I have already all infomration stored in an excel file.

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @EikonUser1234

    Thank you for reaching out to us.

    If you are using the Workspace application, you can use the LSEG Data Library for Python to retrive data.

    However, to retrieve, you need to know instruments (RICs, ISINs, etc.), fields, and parameters. For example:

    • The ld.get_data() method can be used to retrieve fundamental and pricing data (TR.xxx fields).
    • The ld.get_history() method can be used to retrieve historical data.
    • The ld.discovery.search() method can be used to search for instruments.
    • lseg.data.content.ipa for Instrument Pricing Analytics.

    The examples are available on GitHub. You can also use the Data Item Browser tool to search for fields and parameters that can be used with the get_data method.

    Otherwise, you can contact the helpdesk team directly via MyAccount to ask for instruments, fields, and parameters.

    Typically, the data retrieved from the library is similar to the data retrieved from the Eikon Excel or Workspace Excel. Therefore, you can also ask for the Excel formulas that can be used to retrieve the requried data.

    Then, we can change the Excel formulas to Python code.