What is the data item for yield to maturity in discovery.search function from the refinitiv.data.com

client verbatim "I'm using the discovery.search function from the refinitiv.data.content package in Python to find bond data and carry out some calculations. I'm trying to find the code for yield or yield to maturity but can't seem to find the correct name for it."

I provided a TR data item (TR.FiMaturityStandardYield) but it does not work for the client's code below:

df = rd.discovery.search(view = rd.discovery.Views.FIXED_INCOME_INSTRUMENTS,filter = "IsActive eq true",top = 10000,select = "RIC, ISIN, IssuerCommonName, DocumentTitle, ParentOAPermID, DTSubjectName, EOMAmountOutstanding," \"IssueDate, Currency, RCSCurrencyLeaf, FaceIssuedTotal, NextCallDate, CouponRate, IsPerpetualSecurity, MaturityDate," \"TR.FiMaturityStandardYield, InstrumentType, CdsSeniorityEquivalentDescription",query = "Swedbank")

It appears TR.FiMaturityStandardYield only works for get.data?

import refinitiv.data as rdrd.open_session()df = rd.get_data( universe = ['SE122769399='], fields = ['TR.FiMaturityStandardYield'] ) display(df)

If that is the case, how can we incorporate this in discovery.search? Is there an alternative data item in discovery. search if TR.FiMaturityStandardYield cannot be incorporated?

Client is also asking for a list of data items in discovery.search.

Please assist

Thank you!

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @JeffreyPatrick.Pinpin

    Thank you for reaching out to us.

    You are correct. The TR.FiMaturityStandardYield field only works with the get_data method.

    The client can try this field "MaturityStandardYield".

    df = ld.discovery.search(
        view = ld.discovery.Views.FIXED_INCOME_INSTRUMENTS,
        filter = "IsActive eq true",
        top = 10000,
        select = "RIC, MaturityStandardYield, ISIN, IssuerCommonName, DocumentTitle, ParentOAPermID, DTSubjectName, EOMAmountOutstanding, IssueDate, Currency, RCSCurrencyLeaf, FaceIssuedTotal, NextCallDate, CouponRate, IsPerpetualSecurity, MaturityDate, InstrumentType, CdsSeniorityEquivalentDescription",
        query = "Swedbank")
    df
    

    The output is:

    image.png

    Otherwise, the client can get RICs from the search API and then use RICs with the get_data method to retrieve the TR.FiMaturityStandardYield field.

    The client can use the following code to get all available fields in the search.Views.FIXED_INCOME_INSTRUMENTS.

    response = search.metadata.Definition(
        view = search.Views.FIXED_INCOME_INSTRUMENTS
    ).get_data()
    
    response.data.df