I want to extract financial data from refinitiv over the Python EIKON API. Therefore, I want to extract the following information: 'TR.CompanyMarketCap', 'TR.NetProfitMean','TR.EBITDAMean','TR.NetDebtMean','TR.EVMean','TR.RepEPSMean','TR.CompanyMarketCapitalization','TR.FiMoodysRating','TR.PRIMARYLISTINGUNADJUSTEDOPENPRICE','LIST_DATE','TR.TotalAssetsMean','TR.ROAMean','TR.NIIsVentureCapitalBackedIpo','TR.IPODate','IPO_PRC','TR.FilssuerName','TR.FilssuerFitchLongRating Those are already the right codes from refinitiv for the accounting measures and other information I want to extract. However, for the company market cap, net profit, EBITDA, Net Debt, EV, EPS, ROA I am getting the data for 12 years in a row starting from the IPO date.
For this measure, I want to get the data for two defined dates in the past. Please send me the python EIKON API code for extracting the information for these variables for two from me defined dates. The first date will be the variable “IPO Date” which is already defined by me, the second date is IPO Date + 3 years. It should be the formula underneath for extracting. I only face the problem how to add the parameters for receiving data for two time points that I define by myself for the measures instead of getting the data for 12 years. Also, I am getting not always getting the date information which I would wish to extract too. For getting the date I use: 'TR.NetProfitMean.PeriodEndDate', 'TR.PE.Date': Is there a better option for retrieving the data information?
Here are the important lines of my code:
stockData, e = ek.get_data(rics[i], fields = accounting, parameters = {'SDate': start[i], 'EDate': 2, 'FRQ':'Y', 'Curn': 'USD'})
accounting = ['TR.CompanyMarketCap',
'TR.NetProfitMean.PeriodEndDate',
'TR.PE.Date',
'TR.NetProfitMean',
'TR.EBITDAMean',
'TR.NetDebtMean',
'TR.EVMean',
'TR.RepEPSMean',
'TR.CompanyMarketCapitalization',
'TR.TotalAssetsMean',
'TR.ROAMean']