New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
43 6 2 8

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-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-api
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 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
87.8k 294 53 79

@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 512.0 KiB each and 1.0 MiB total.

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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