Is there a way to find companies listed pre-profit (0 or negavite EBIT) in any one index in Python?
Hi @danieluphromes,
Yes:
import refinitiv.dataplatform.eikon as ekek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY')df, err = ek.get_data( instruments=["0#.MIWD00000PUS"], fields = ["TR.IPODate"])dflistOfDf1s, listOfFloatedPreProfitComp = [], []for j, i in enumerate(df['Instrument']): if j % 100 == 0: print(j) try: df1, err = ek.get_data( instruments=[i], fields = [ f"TR.EBITMean(SDate={df[df['Instrument'] == i]['IPO Date'].values[0]},Period=FY1).date", f"TR.EBITMean(SDate={df[df['Instrument'] == i]['IPO Date'].values[0]},Period=FY1)", "TR.IPODate"]) listOfDf1s.append(df1) if df1.values[0][1] <= 0: display(df1) listOfFloatedPreProfitCompappend(df1) except: print(f"failed on {i}")