For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
43 3 1 7

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?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonerror
screenshot-1.png (10.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
4.6k 26 7 22

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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

Click below to post an Idea Post Idea