python eikon API - is there a parameter value for Edate which will get "all" the available history?

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"

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • m.bunkowski
    Answer ✓

    @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

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.