Issue with get_data returning multiple rows for one single investor

Hello, I want to get a field called TR.InvestorType using Python. I noticed that when I do:

data, err = ek.get_data(["5000001154","4295955751"], TR.InvestorType, {CURN: USD})

I get the right results. Then when I add for example the ID 4295895691:

data, err = ek.get_data(["5000001154","4295955751","4295895691"], TR.InvestorType, {CURN: USD})

then I get multiple rows for 4295895691 and I don't get the results for the first two companies anymore. Anyone has an idea on why I am getting this behavior?

Best Answer

  • chavalit-jintamalit
    Answer ✓

    Hi @charles.malafosse

    - can you fix this so we don't have to do all this extra work to get correct data?

    I believe that the data is correct. It is possible to have multiple investors.

    There are multiple investors to the "4295895691" identifier.

    image


    - How can I get only one row returned (the most recent or the populated investor type data for ID 4295895691)

    You can use "Data Item Browser" to explore the supported parameters on TR.InvestorType field.

    In this case, you can set "End Number" to 1 so you would only get the first row in the result.

    image

    - Why these IDs return different data sets? Is it because one is listed and the others are not? How can we separate the two types?

    I believe that the data is correct. It is possible to have multiple investors.

    If you need further clarification on the content, you can contact Refinitiv Content Helpdesk at https://my.refinitiv.com/

    Helpdesk would be able to suggest if there are any fields to allow you to separate them.

Answers

  • zoya faberov
    zoya faberov ✭✭✭✭✭

    Hello @charles.malafosse,

    As I was able to confirm by running Eikon search on these instruments,

    Some Permids (the identifiers you request by is permid) map to one RIC,, some to none ( the first two, they are "unlisted"), some to many such as the third, Alliance Trust.

    Suggest to try this request to see this difference in action

    data, err = ek.get_data(["5000001154","4295955751","4295895691"],  ['TR.InvestorType', 'TR.CommonName','TR.CompanyName'])

    For me this results in

    image

    It appears, that you are looking for results that correspond to a listed RIC.

  • Hi @charles.malafosse,

    As @zoya faberov pointed out and as you observed, the 3rd PermID ("4295895691") does have multiple (~185 rows) returned. If you only want the InvestorType for both, I think you will have to merge the results. It appears the get_data() doesn't understand how to merge these 2 different data sets into one.

    For example:

    df1,err = ek.get_data(["5000001154","4295955751"], "TR.InvestorType")
    df1
    df2, err = ek.get_data(["4295895691"],  ['TR.InvestorType'])
    df2
    df = pd.concat([df1, df2])
    df

    image

  • Hi @charles.malafosse

    Just want to make the result more obvious.

    This is the sample code:

    data, err = ek.get_data(["5000001154","4295955751","4295895691"],
                            ['TR.InvestorType.instrument', 'TR.InvestorType.investorid', 'TR.InvestorType',
                             'TR.CommonName.instrument', 'TR.CommonName',
                             'TR.CompanyName.instrument', 'TR.CompanyName'])
    data.head(10)

    image

    The multiple records are acutually from different investor ids.

  • @nick.zincone.1 @zoya.farberov @chavalit.jintamalit

    Hi all, thanks for your answers. I have a couple of questions:

    - can you fix this so we don't have to do all this extra work to get correct data?

    - How can I get only only one row returned (the most recent or the populated investor type data for ID 4295895691)

    - Why these IDs return different data sets? Is it because one is listed and the others are not? How can we separate the two types?

    Thanks

  • zoya faberov
    zoya faberov ✭✭✭✭✭

    @charles.malafosse

    Try selecting by value

    data, err = ek.get_data(["5000001154","4295955751","4295895691"],  ['TR.InvestorType', 'TR.CommonName','TR.CompanyName'])
    data.loc[data['Company Common Name'] != '']


  • chavalit.jintamalit,

    Going back to this issue, when I add the parameter you suggested:

    parameters={"CURN": "USD","EndNum":1}
    data, err = ek.get_data(["5000001154","4295955751","4295895691"], "TR.InvestorType", parameters)

    I get:

       Instrument      Investor Type Description
    0  5000001154                               
    1  4295955751                               
    2  4295895691  Investment Advisor/Hedge Fund

    So this didn't resolve my problem that the first 2 investors types were missing. Please note I don't want to do one request per investor as I have thousands of them so this would take too much time.

    thanks



  • Hi @charles.malafosse

    I think the backend may try to request data as "RIC" type.

    So please separate your identifiers into 2 groups.


    image

  • chavalit.jintamalit, that is a very strange behavior. Is that normal? How do I know which code is understood as RIC? If I submit a permid, why would it match on RIC?

  • Hi @charles.malafosse

    I believe that this is a deficiency in this specific backend component that serves this data.

    The input Perm ID you have, some of them cannot be mapped to RIC code.

    Here is the result when you mixed them on both Eikon Data API and Eikon Excel(same behavior):

    image


    Here is to be more precise, the code explicitly set the instrument type and still the same behavior:

    image

    So the workaround is to try to map PermID to RIC code first.

    Then divide the instruments into 2 lists as suggested earlier.

  • chavalit.jintamalit,

    thanks for your answer but wouldn't it be easier if you just fix the deficiency?

    Best

  • Hi @charles.malafosse

    I have raised a ticket 08965493 on your behalf to Refinitiv Helpdesk.

    They will contact you regarding this case.