Requesting certain fields using SDate and EDate returns multiple incomplete results

See below screenshot.

I want to request a historic value for 'TR.GR.RatingSPEquivalent', 'TR.GR.RatingSourceDescription' for a set of bonds. I do this by providing the same date to SDate and EDate.

Weirdly, I get multiple results for each bonds. Only one row per bond is actually complete, and the others only have the two fields listed above. I speculate that each row represents a distinct historic value for these fields. However, I only want the value at the provided SDate/EDate.


image

Best Answer

  • chavalit-jintamalit
    Answer ✓

    Hi @tr105

    When you combined fields from different databases, date will not be aligned.

    I would suggest that you separate them into 3 different requests to make it clear.

    1. Realtime fields (Do no support SDate and EDate parameters)

    rics = ['AU054379722=','AU054411928=']
    fields = ['DSPLY_NAME', 'MATUR_DATE', 'ISSUE_DATE']
    df, err = ek.get_data(rics, fields)
    df


    2. The TR.MIDYIELD

    rics = ['AU054379722=','AU054411928=']
    fields = ['TR.MIDYIELD.date','TR.MIDYIELD']
    parameters={'SDate':'2019-08-13','EDate':'2019-08-13'}
    df, err = ek.get_data(rics, fields,parameters)
    df


    3. The TR.GR.RatingSPEquivalent and TR.GR.RatingSourceDescription fields

    rics = ['AU054379722=','AU054411928=']
    fields = ['TR.GR.RatingSPEquivalent.date','TR.GR.RatingSPEquivalent','TR.GR.RatingSourceDescription.date','TR.GR.RatingSourceDescription']
    parameters={'SDate':'2019-08-13','EDate':'2019-08-13'}
    df, err = ek.get_data(rics, fields,parameters)
    df


    This is sample output:

    image


Answers