-
I want to retrieve historical STOXX constitutes and especially their Index weights. Unfortunalty, th
# --------------------------------------------------------- # Test for Index weights (only works for current date, no historical data available) # --------------------------------------------------------- target_date = "2026-01-27" df = ld.get_data('.FTSE', fields=[ "TR.IndexConstituentRIC", "TR.IndexConstituentName",…
-
Constituents of an equity index?
Can anyone tell me why it returns an error? Are there indices that are compatible with 0# notation and those are not? Is there something wrong in my code? How can I see the list of all the constituents of an index? import lseg.data as ld ld.open_session() This one works.str_test = "0#.TSPM" l_field_test = ['TR.RIC']…
-
Historical EWG ETF holdings, weight
I am trying to fetch historical ETF holding of EWG ric using below python code but not getting valid entries. kindly suggest required changes to be done to fetch historical holdings of EWG ETF df, err = ek.get_data( ['EWG'], fields=[ 'TR.ETPConstituentWeightPercent.constituentric', 'TR.ETPConstituentWeightPercent' ],…
-
Constituents via Chain object only pulling current despite date pparameters
I recently ran into the issue of not being able to pull historical constituents using Chain objects as shown in the GitHub (ie: as of 12/31/2020). This worked for me previously, but as of today is exclusively pulling what appears to be the current consts no matter the date specific in the Chain attribute and parameters.…
-
When retrieving historical index constituents of the index SP500, there is only delivery of today's
When retrieving historical index constituents of the index SP500, there is only delivery of today's SP500 constituents irrespective of the date being enter as parameter, e.g. Google become SP constituent in 2006 but it is show as SP stock in previous years. This is misleading. Getting historical constituents is required to…
-
Survivorship bias free data
I would like to get the historical constituents for an ETF, S&P500 for example, using the lseg.data api in Python. Is there an easy way to do this and more importantly, will this data include stocks that are delisted so that my universe is free of survivorship bias? Moreover, in general is there a way to pull data for…
-
STOXX Europe 600 Constituents of 2015-2023
Hello everyone, I need lists of the firms that are part of the STOXX Europe 600 index on the last trading day of each year from 2015 to 2023. So, I need one list will all constituents of the index on 31-12-2015 and another list with the constituents on 30-12-2016, etc. Could anyone explain how to do this? I thought that I…
-
Pulling the first period where index constituents are available
I have this working code to identify when is the first period that the constituent lists has data. It correctly states that the oldest constituent list avaialble for S&P 500 (list code LS&PCOMP+MMYY) is 0989 or September 1989. How do I apply this code to multiple constituent codes for around 90 indices? from datetime…
-
RIC no longer works
I created a program that uses constituent data from the FTSE All World index, that no longer works. Is constituent data no longer available? indicies = rd_get_data( universe = ['0#.FTAWORLDSR'], fields = ['TR.IndexConstituentRIC'], parameters = { 'SDate':date_formatted } )
-
SPX history uses incorrect tickers
Hi, When trying to get historical data for SPX, get_history and get_data returns data using tickers of the current constituents and not of the constituents at the requested time. For instance, ld.get_history(universe=[f"0#.SPX"], fields=["TR.PriceClose"], parameters={"SDATE":"2011-02-01"}) returns the price closes of the…
-
GET CONSTITUENTS OF AN INDEX USING PYTHON CODE
How do I get the constituents of nifty 50 which is depicted by INNSE50 or .NSEI , I can see that on the datastream navigator but i want to extract via python code. I am trying to use this, df, err = ek.get_data( instruments = ['INNSE50'], fields = ['TR.IndexConstituentRIC', 'TR.IndexConstituentName'], parameters = {…
-
Joiners and Leavers for STOCK EXCHANGE (not MAIN INDEX)
Hi, I'm interested in retrieving historical joiners and leavers for stock exchanges. I've gone through a number of Q&As and am aware that there is functionality to obtain historical joiners and leavers for the main stock INDICES, but I wanted to know if the same exists for stock EXCHANGES. For example, the code below…
-
Historical Leavers and Joiners of .SPX
I need a list of Leavers and Joiners at the beginning let say at 01-01-1990 and then have the in and out for the following years in Phyton API. So this need to be done in 2 times : First having the list at special date let’s say 01/01/1990 Second the IN and Out the following years. For sample RIC : .GDAXI To have a…
-
Code Error
I tried import lseg.data as ld import pandas as pd import copy import plotly.express as px ld.open_session() ric = '.AXJO' start = '2014-01-01' end = '2025-08-26' df = ld.get_data(universe=[ric],fields =['TR.IndexJLConstituentRIC','TR.IndexJLConstituentChangeDate','TR.IndexJLConstituentituentChange'],…
-
Missing values for TR.IndexJLConstituentRIC.change when querying leavers and joiners of indices
See the following code (that works in general) and output. Until a few weeks ago, the code worked without the missing values. How can I get the (non missing) values for the variable TR.IndexJLConstituentRIC.change? ld.open_session() SP100_constitutents_Leavers_Joiners_df = ld.get_data( universe=[ '.OEXA' ], fields=[…