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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
43 3 1 7

EIKON API: Incorrect output when start_date is before first trade date

Hi, I try downloading historical market cap values for some companies. I noticed when the start_date is before the first trading date, all data seems to be incorrect. For examples:

import_symbols ="AAC.N"
start_date = "20141001"
end_date="20141006"
field_name = "TR.COMPANYMARKETCAP"
df_a, error = eikon.get_data(import_symbols, [field_name, field_name + ".DATE"],
                             {"SDate": start_date, "EDate": end_date}, field_name=True)
df_a

The output is:

While if I use the following code:

import_symbols ="AAC.N"
start_date = "20141002"
end_date="20141006"
field_name = "TR.COMPANYMARKETCAP"
df_a, error = eikon.get_data(import_symbols, [field_name, field_name + ".DATE"],
                             {"SDate": start_date, "EDate": end_date}, field_name=True)
df_a

The output is as follows:

I think this applies to more columns than just market cap.

I assume the latter is correct? What would be the best way to get the correct data?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
output1.png (7.3 KiB)
output2.png (6.2 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
38.1k 71 35 53

@sim19

It is a known bug that the API doesn't handle NULL data properly. The NULL data is replaced with the next available data which causes the data is shifted upward.

If you use Eikon Excel with the same formula, the Company Market Cap on 1 Oct 2014 is NULL.

However, with Eikon Data API, the NULL data (data of 1 Oct 2014) is replaced with the next available data (data of 2 Oct 2014).

For more information, please refer to this question.


excel.png (6.5 KiB)
eikon.png (9.3 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.

The issue is fixed as of 30-Apr-18.

Click below to post an Idea Post Idea