I have the following code:
df=ek.get_data('4295905573',['TR.PriceClose.Date', 'TR.PriceClose'], {'SDate':0, 'EDate':-365})
Is there a way to get "all" the available history, instead of setting it at a specific number of days?
Similarly, if I want to only get up to the last day of data for a company, is there an SDate value that will start on the "last" avaialble date automatically? If I set SDate to 0, and the EDate to say -5000, for a company that delisted say 1 year ago, it fills the whole 5000 reefcords with the last available value forward filled to "today"
@lgreen, you can try this workaround to get the timeseries from the first trading date:
dftemp,err=ek.get_data('4295905573','TR.FirstTradeDate') start = dftemp['First Trade Date'][0] df,err=ek.get_data('4295905573',['TR.PriceClose.Date', 'TR.PriceClose'], {'SDate':0, 'EDate':start}) df
as suggested by @chavalit.jintamalit you can use TR.RetireDate. If the TR.FirstTradingDate is null then you may try:
ek.get_data('TRIL.L^I09','MIN(TR.PriceClose.date)',{'SDate':0, 'EDate':-9999})
Hi @lgreen
There is no parameter to get "all" the available history.
For delisted company, you can get 'TR.RetireDate' and use it as the end date parameter.
Please also review API limitation at https://developers.refinitiv.com/en/api-catalog/eikon/eikon-data-api/documentation