I am looking to pull the sum of market caps for a number of RIC's per day for a date range. I saw another post discussing a Pandas solution that pulls market cap for each RIC and date and then groups the data locally. Given the amount of data that I am looking for, this will be a slow process and I might hit data limits. For this reason, I am looking to aggregate the data on the server side.
The Eikon Excel expression builder offers the function below. I am not sure if this function is passed to the server or if it is handled locally.
=@TR($H$5:$H$9,"GRSUM(TR.CompanyMarketCap(Scale=6),universe=""univ"",SDate=2000-06-15 EDate=2021-06-15 Frq=C Curn=USD)","SDate=2000-06-15 EDate=2021-06-15 Frq=C Curn=USD RH=calcdate SORTD=calcdate")
I wrote the following code to pull individual market caps by RIC and date, which I could (but would rather not) process with Pandas:
import eikon as ek
dtstart='20000615'
dtend='20210615'
ric=[a whole bunch of RIC's passed in via csv file]
params = {'SDate':dtstart, 'EDate':dtend, 'Frq':'C', 'Scale':6, 'Curn':'USD'}
fields = [ek.TR_Field('TR.CompanyMarketCap.CalcDate', params, 'desc', 0), ek.TR_Field('TR.CompanyMarketCap', params)]
dfm, err = ek.get_data(ric, fields)
Is there a way to modify this with a GRSUM (Excel expression builder) equivalent?