Hi I am using the python API. I see the syntax to pull a screen based on criteria using ek.get_data(["SCREEN(... How can I do this as of particular historical dates?
For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
Hi I am using the python API. I see the syntax to pull a screen based on criteria using ek.get_data(["SCREEN(... How can I do this as of particular historical dates?
Fields that provide historical data can be used in the Screener to screen on values as of a historical date by adding field level SDate parameter to the expression. E.g. the following expression retrieves all active stocks of companies headquartered in the US that had market cap over USD 1 trln as of 2020-01-01.
ek.get_data('SCREEN(U(IN(Equity(active,public,primary))),' + 'TR.CompanyMarketCap(SDate=20200101)>=1000000000000,' + 'IN(TR.HQCountryCode,"US"), CURN=USD)', ['TR.CommonName','TR.CompanyMarketCap(SDate=20200101)'])
Note that the fields that don't provide historical data can only be used to screen on the current value. In the above example the screener will return all stocks of companies currently headquartered in the US that had market cap over USD 1trln on 2020-01-01.