Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
7 1 1 5

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.


eikon#productpython apipermid-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
78.2k 246 52 72

@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.


1673418031014.png (115.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Jirapongse, thanks for the reply, I think this is what I need.


A follow up question would be what does sdate refer to? I used 5/16/2022 you have in your code and it looks like it's InvestorFilingDate, which in the returned value of df would give me 3/31/2022, the document date that I need. If I use 3/31/2022 as sdate in Python query, I get the same result. So what exactly is sdate? I really only need document date, which is end of each quarter. Appreciate the input in advance.

@rgustin

I got this code by converting the following Eikon Excel formula to Python code.

=@TR($B$1,"TR.SecurityOwnedRIC;TR.SecurityOwnedName;TR.InvestorValueHeld(Scale=6);TR.InvestorSharesHeld;"&"TR.SecurityOwnedTypeCode;TR.InvestorPctPortfolio;  TR.InvestorPositionPctChg;TR.InvestorFilingDate; TR.InvestorValueHeld.EffectiveTo;TR.InvestorFilingType","CH=Fd Sdate=#1",,$B$2)

Please contact the Eikon support team directly via MyRefinitiv to clarify it.

Thank you.
Upvotes
14k 30 5 10

Hi @rgustin ,

Is this what you're looking for?

data = ek.get_symbology(PermID, from_symbol_type='OAPermID', to_symbol_type=['RIC'])

If not, could you please give an example of PermID list for further investigation.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for replying , just added example, please further advise.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.