most robust.....get_timeseries or get_data for historic price series?

I am trying to download a lot of RICs (thousands) historic timeseries data for (adjusted) open high low close market cap and volume. Previously I have been told to use get_data to get around the 3k issue. But the results seem to be irregular and have missing data compare to the results in get_timeseries. Below is the code I am using with get_data and then I merge the 3 dataframes. But as an example the data is missing a lot of dates for example RIC 6857.T. TR.CLOSEPRICE field seems to be buggy if you go back to year 2012 onwards . So question is.....is using get_timeseries going to get me better data quality and hence I should just loop through the data to get around 3k issue or am I implementing get_data incorrectly below. Important that the data must be adjusted price series.

                dfpr, e = ek.get_data(riclist[i:i+chunksize],['TR.CLOSEPRICE.date', 'TR.CLOSEPRICE(Adjusted=1)','TR.HIGHPRICE(Adjusted=1)','TR.LOWPRICE(Adjusted=1)','TR.OPENPRICE(Adjusted=1)'],{'SDate':start_date, 'EDate':end_date,'Frq':'D'})
dfvol, e = ek.get_data(riclist[i:i+chunksize],['TR.Volume.date','TR.Volume'],{'SDate':start_date, 'EDate':end_date,'Frq':'D'})
dfmcap, e = ek.get_data(riclist[i:i+chunksize],['TR.CompanyMarketCap.date','TR.CompanyMarketCap'],{'SDate':start_date, 'EDate':end_date,'Frq':'D'})

Best Answer

  • Adjusted price history is what you get by default. You don't need to use Adjusted=1 parameter. If what you need is adjusted price history I would suggest using fields ['TR.PriceCloseDate','TR.PriceClose','TR.PriceOpen','TR.PriceHigh','TR.PriceLow'] in get_data method.

    I would only suggest using TR.CLOSEPRICE if you need unadjusted price history. It's less than perfect, but currently it's the only way to get unadjusted price history.