How to pull RIC list from 13F by using PermID via Python Eikon API?

Hi - I have established the connection to Eikon from Python, and I know how to pull historical data by using ek.get_data, but how would I pull a list of RIC within a specific 13F period by PermID?


The ek.get_data(PermID, 'TR.RIC') won't work because the PermID are private funds. So I need to pull a complete list of their holdings (RIC) based on private fund's 13F by using their PermID. Thank you.

Below is what I'm looking for in an example:

Assuming I have a PermID 5055409279, and this fund is filing 13F every quarter. If I go under "filings", I would see the most recent 13F filing is Nov 14 for Q3:

1673412144470.png


The PDF filing has a detailed list of all positions held by the fund, below is a snapshot of a part of the filing:

1673412221658.png


So I need Python to have both the PermID and the 13F period as input variables, to return to me a list of all RIC on that 13F filing. Please advise. Thank you.


Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @rgustin

    Please try the following formula.

    date="2022-05-16"
    permid="5055409279"
    df, err = ek.get_data([permid],
                          ["TR.SecurityOwnedRIC",
                           "TR.SecurityOwnedName",
                           "TR.InvestorValueHeld(Scale=6)",
                           "TR.InvestorSharesHeld",
                           "TR.SecurityOwnedTypeCode",
                           "TR.InvestorPctPortfolio",
                           "TR.InvestorPositionPctChg",
                           "TR.InvestorFilingDate",
                           "TR.InvestorValueHeld.EffectiveTo",
                           "TR.InvestorFilingType"],
                         {"sdate":date})

    df

    The output is:

    1673418031014.png


    If it doesn't match your requirement, please contact the Eikon Excel support team directly via MyRefinitiv and ask for the formula in Eikon Excel that can be used to get the required data.

    If the formula in Eikon Excel is available, we may be able to convert it to Python code.

Answers