Gathering information from Refinitiv API - Lipper ID problem
Hello,
I’m writing this since I have a problem with the Refinitiv Workspace API regarding the Lipper RIC and the Lipper ID.
Let me explain step by step what I’m trying to do.
NOTE: I would like to use Python since is the easiest way to do this and I have a PDF file with all the codes - provided by a friend of mine - to perform this task (I’m currently using python through the jupiter notebook in ANACONDA).
1. The problem is that I’m trying to gather, from the refinitiv API, a list of fund based on their Lipper ID and, for each fund, his NAV, his TER and the relative date expressed in month/year. The problem is that, since I’m looking also for dead (liquidated) funds (due to survivorship bias problem), the Lipper RIC does not work (because the dead funds have a slightly different code) and I must use the Lipper ID (because, starting from the Lipper ID I can obtain the correct RIC code to, then download the NAV). Infact, furthermore, the NAV is the only data suitable for this search.
2. So, in the end, starting from the Lipper ID that I have attached i would like to have an excel file with (in the columns) Lipper ID, Name of the fund, his NAV, his TER and in the rows the relative date repeating for each single entries starting from january 2000 to january 2021 (20 years), monthly.
Is this possibile? Please contact me, I'm able to pay if needed
Thank you
PS: As said I have a written guide to do all of this in python but I would like some help since I'm new to the program. I also have the list of Lipper ID to start the research
Best Answer
-
Summary of the study of your requirement use the CODEBK app in Eikon/Workspace:
- Using native Lipper ID (i.e. the 8-digit number) Eikon API does able to return data for Liquidated and Merged funds.
- Eikon API does have historical prices (e.g. NAV) data
- Eikon API does have historical TER data.
For historical NAV, below is the sample code for one fund’s monthly month-end historical prices during the period. Actually, it would be simpler to get daily prices rather than setting month-end dates like I did but the data size would be much larger.
import eikon as ek
import calendar, pandas as pd
ek.set_app_key('<Your app key code string>')
lipper_id = '65000900'
data_table = None
for year in range(2000, 2022):
for month in range(1, 13):
(weekday, day) = calendar.monthrange(year, month)
data_date = str(year) + '-' + str(month).zfill(2) + '-' + str(day)
fund_NAV, err = ek.get_data(lipper_id, ['TR.FundNAV.Date', 'TR.FundNAV'], {'SDate':data_date, 'EDate':data_date, 'Curn':'Native'})
if type(fund_NAV.iat[0,2]) != pd._libs.missing.NAType:
data_table = data_table.append(fund_NAV) if isinstance(data_table, pd.DataFrame) else fund_NAVThe Dataframe: data_table should then contains data like:
Instrument Date NAV
0 65000900 2005-03-31T00:00:00Z 100
0 65000900 2005-04-29T00:00:00Z 97.51
0 65000900 2005-05-31T00:00:00Z 99.16
0 65000900 2005-06-30T00:00:00Z 101.5
0 65000900 2005-07-29T00:00:00Z 103.89
... ... ... ...
0 65000900 2012-11-30T00:00:00Z 121.71
0 65000900 2012-12-31T00:00:00Z 125.5
0 65000900 2013-01-31T00:00:00Z 134.22
0 65000900 2013-02-28T00:00:00Z 134.25
0 65000900 2013-03-29T00:00:00Z 130.01* This is a "merged" fund that launched in 2005 and merged to another fund in 2013.
For historical TER, data, below is the sample code for one fund’s data. You also need to aware that TER data may not cover full history of the fund due to different reasons (e.g. Lipper may only have good TER coverage after 2010), and for the TER’s effective dates, the TER should used for the fund from its “data as of date” until the next TER data point.
import eikon as ek
ek.set_app_key('<Your app key code string>')
lipper_id = '65124150'
fund_TER, err = ek.get_data(lipper_id, ['TR.FundTERDate', 'TR.FundTER'], {'SDate':'1999-12-31', 'EDate':'2019-12-31'})You should get the data in Dataframe: fund_TER:
Instrument Total Expense Ratio Date Total Expense Ratio
0 65124150 2011-12-31 3.09
1 65124150 2012-12-31 3.10
2 65124150 2013-12-31 3.00
3 65124150 2014-12-31 3.24For both samples above, I assume you will have an outer loop to loop through all the funds in your list. Notes, it takes a while for one fund’s full price history. So for the complete data of your funds, it may take a whole day to complete.
0
Answers
-
@edoardo.modotti01 , I do not find any attachment you mentioned. It will help people to understand the requirements better if you have the attachment of the input you plan to use. My understanding is you want to historical NAV prices of funds in a list (list of Lipper IDs). I assume you only meant to use the Eikon API not the RDP Funds API. The main issues based on my current understanding are:
1. Officially, only Active funds are available in the Eikon API. There are some cases non-active funds got some characters appended to the Lipper ID to support some specific display or applications in Eikon. However, I believe you cannot access the usual data-points from these funds.
2. The size is a concern as you are describing historical data for 20 years. How frequent is that monthly? daily?
3. You need to understand prices (e.g. NAV) cannot be used to derive fund's performance (total returns). Because prices provided by Lipper is kept as the "official" prices reported by the fund companies, not adjusted for distributions, nor taking case the potential unit merge/split events.
Lastly, if you are entitled to access RDP Funds API instead, then what you described should be able to achieved using Python natively (I am not sure about Jupiter notebook/ANACONDA). The main thing using that API is the initial effort to gain access to it.
0 -
Hello b.lee,
thank you for your answer.
Yes, the main point is that I want historical monthly NAV for each fund from 2000 to 2020 using the Lipper ID and yes, I was referring to the Eikon API .
I’m looking for this information as I’m trying to recreate the Carhart work “On persistence in mutual funds”, with different data (European UCITS mutual funds).
- The problem is that since I would need all the type of funds (still active, merged and dead to avoid survivorship bias problems as I mentioned) I have been told that you can gather those only starting from LipperID to obtain Lipper RIC and, in the end, the NAV for each fund. The “original” Lipper RIC (not that one gathered from the LipperID) have a problem: all funds are indeed recognized by RIC codes which are needed for accessing data through the program API in the Python environment, however’ dead’ funds have this code modified by a suffix and this change is not explicit in the screener on Refinitiv, where funds are still identified by their old RIC code even if inactive, thus downloading directly from there is not possibile. However, starting from the funds’ LipperIDs it is possible to retrieve the correct RIC code using a Python function of the Eikon module.
- Monthly historical data from 2000 to 2020. Yes it’s quite big
- NAV is available for both active and dead funds, so it’s the only suitable and yes, the dataset would be free of dividends etc. It would be impossibile to adjust everything.
However during these days I will try to analyse this situation.
After this what do you think?
Thanks
0 -
@edoardo.modotti01 , I got your further message in email notification, but I do not see it here. Not sure what happened. If you already raised a case to our customer support helpdesk, please ask them to forward the case to bob.lee@refinitiv.com Or you can contact me directly using that email and send the fund list you got. I can have a better study on the case.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛