I am currently using the following code to extract the RICs of the ETF index IEAC.L:
indices = ["IEAC.L"]
# ========================= # SECTION 3: GET CONSTITUENTS # =========================def get_constituents(index_rics):
all_constituents = []
for index in index_rics:
print(f'Extracting constituents for {index}')
result = rd.get_data([index], "TR.FundHoldingName;TR.FundHoldingRIC;TR.FundLatestFilingDate;TR.FundNumberOfShares;""TR.FundNumberOfSharesChanged;TR.FundPercentageOfFundAssets",
parameters={'EndNum': 4000})
constituents = result['Holding RIC'][result['Holding RIC'].notna() & (result['Holding RIC'].str.strip() != '')].tolist()
all_constituents.extend(constituents)
return list(set(all_constituents))
constituents = get_constituents(indices)print(f'# Securities: {len(constituents)}')
My goal is to extract the RICs for this ETF (IEAC.L) on a monthly basis over a 10-year period. However, when I try to retrieve data for different dates, the API always returns the RICs corresponding to the latest available date (currently 31/05/2025).
Could you please assist me in identifying:
Which Codebook function or data fields allow me to extract the constituents for historical dates,
Or which parameter I should use to filter the holdings by a specific date, rather than always retrieving the latest holdings?