Python Eikon API: incorrectly dealing with missing data

I try to download historical data for a stock (SHEN.OQ) using python Eikon API. It seems like there is no closing price print for this symbol on Feb 8th, 2006, which is confirmed when I check in Excel using the following formula:

=TR("SHEN.OQ","TR.PRICECLOSE","Frq=D SDate=2006-02-08 CH=Fd RH=IN;date")

(Output = NULL)

However, if I I use the below code in Python, it ignores this date and fills the data with the next days data. The final date is then set as NaN.

symbol = "SHEN.OQ" 
names_list = ["TR.PRICECLOSE", "TR.PRICECLOSE.DATE"]
start_date = str(20060201)
end_date = str(20060210)
df, error = eikon.get_data(symbol, names_list,
{"SDate": start_date, "EDate": end_date}, field_name=True)
df

Find the output attached.

screenshot-1.png

I assume this is a bug? Is there a workaround for this?

Best Answer

  • There is indeed a bug in an underlying API which we are aware of. If you are looking for a workaround for time series, you can use eikon.get_timeseries() as described here.

Answers

  • Thank you! Could you please give an indication when the bug will be solved?