Hello,
I am trying to pull all public companies' historical revenue for the past 8 quarters and the future one quarters's estimated revenue.
When we are in the time (for example the beginning of November) where some companies may have their Q3 filings published but some companies may not, I want to get the actual revenue of those who have published and estimated revenue of those who have not.
1/ How should I revise my code to achieve the above goals?
2/ and within one quarter, when would be a good time to download data so that we can get as much actual revenue as possible?
Here is my code
screener_expression = 'SCREEN(U(IN(Equity(active,public,primary))), TR.CompanyMarketCap(Scale=3)>=1, CURN=USD)'
fields = [
'TR.CommonName',
'TR.RevenueActValue(SDate=0,EDate=-7,Period=FQ0,Frq=FQ).fperiod',
'TR.RevenueActValue(SDate=0,EDate=-7,Period=FQ0,Frq=FQ)',
'TR.RevenueMean(SDate=0,EDate=0,Period=FQ1,Frq=FQ).fperiod',
'TR.RevenueMean(SDate=0,EDate=0,Period=FQ1,Frq=FQ)',
'TR.RevenueActValue(SDate=0,EDate=0,Period=FQ1,Frq=FQ)'
]
params = {'curn': 'USD'}
df = ld.get_data(screener_expression, fields, params)