Python: disparity in fundamental data

If I use get_data, I'm able to get the current value. If I use get_timeseries, the most recent value is excluded. For example:

data = ek.get_timeseries('DST-STK-T-EIA', fields=['CLOSE','Timestamp'])

vs.

data = ek.get_data('DST-STK-T-EIA', 'CF_LAST')

I've obviously stripped-out dates, intervals, etc. from time_series, but including those yields the same result.

Best Answer

  • jason.ramchandani01
    Answer ✓

    @Corey.Stewart

    df =ek.get_timeseries(['DST-STK-T-EIA'],['CLOSE'],start_date='2010-03-01',interval='weekly')

    df

    image

    The above is fine - you are using real-time fields for the RIC which is an economic RIC:

    data, err = ek.get_data('DST-STK-T-EIA', ['CF_LAST','CF_DATE'])
    data

    image

    Which will give you the last value but the date is the current date not the date of the last release which was on 25-04-2021.

    I hope this can help.


Answers

  • @jason.ramchandani01. Thank you. There must be some sort of lag for this, because I am now able to use my original get_timeseries code and it displays the most recent data (ignore the end_date; I've reused code throughout my project) :


    inventories = ek.get_timeseries('DST-STK-T-EIA',

    fields=['Close','Timestamp'],

    start_date=(date.today()-timedelta(days=(13*365))).strftime("%Y-%m-%d"),

    end_date=(date.today()+timedelta(days=(5*365))).strftime("%Y-%m-%d"),interval="weekly"

    )

    inventories['Timestamp'] = inventories.index


    Anyway, thanks again for your response.

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.