How to get all investors for a list of stocks, historically with the python API

Hello.

I am trying to get a list of unique investors from a stock universe. Meaning that I want to have each investor appearing only once in my list even if they invested in multiple companies of my universe. Also I want to be able to get this list historically.

How to do that with the eikon python API? An example would be extremely useful.

Many thanks

Charles

Best Answer

  • @charles.malafosse, there is an alternative way as well:

    fields = ['TR.PeersInvestorName.investorid', 'TR.PeersInvestorName', 'TR.PeersEquityAssets','TR.PeersNumStocksHeld', 'TR.PeersEquityAssets' ,'TR.PeersTotalValueHeld' ]


    df, e = ek.get_data(['MS.N', 'JPM.N', 'UBSG.S', 'C.N'], fields)
    df.set_index('investorid', inplace=True)


    df.head()

    It will give you the unique list and some analytics back:

    image

    If you want a historical component, you can add ```SDate``` as a parameter.

Answers

  • @charles.malafosse

    You will need to request a list of investors for individual instrument at a specific date and merge the results from each instruments. For instance, investors in ```MS.N``` as of 1 year ago:

    fields = ['TR.InvestorFullName.investorid', 'TR.InvestorFullName', 'TR.SharesHeld(SDate=-1AY).date','TR.SharesHeld(SDate=-1AY).value'] df, e = ek.get_data('MS.N', fields) 

    image

    building unique investors would be just removing duplicates from the 'InvestorId' column.

    image