Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 2 2 6

Different results using Python API and Excel Plugin

Hi There

I'm pulling the price history for SNHG.DE but found that using Excel and Python I get very different results.

Excel formula:

=TR("SNHG.DE","TR.PriceClose.calcdate; TR.PriceClose","SDate=2013-01-01 EDate=2017-08-24 Frq=D RH=In")

Python script:

ek.get_data(SNHG.DE, ['TR.PriceClose.calcdate', 'TR.PriceClose'], {'SDate': 2013-01-01, 'EDate': 2017-08-24, 'Frq': D} )

I've attached the two files where you can see that the dates at which prices are available (not null) differ quite substantially for the two methods of pulling the same data.

Please advise.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

Hi @Jan

Thank you for your participation in the forum.

Does the reply below answer your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide other community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks, AHS

Upvote
Accepted
39.4k 77 11 27

@Jan
This is a known issue. We currently incorrectly handle the case when SDate<EDate and the value corresponding to SDate is null. The entire timeseries in the result set are shifted and the dates and values become mismatched. The issue has already been escalated to the development. In the meantime the only workaround I can suggest is to retrieve timeseries in reverse chronological order by swapping SDate and EDate values. In other words make sure that SDate>EDate.

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.

Hi @Alex.

In the latest python api release notes I saw that one of the updates involved "change sort_dir default value to None in TR_Field constructor." I really hoped that this would fix my error but after updating to 0.1.10 (BETA) I still get the same discrepancy comparing Python with Excel as before. The reverse chronological order does not always work as nulls are sometimes included in the center of the set. Please advise on when we can expect to see this resolved? Many thanks.

Hi @Jan
I'm afraid the fix you saw in Eikon Python library 0.1.10 is for a different and unrelated issue. There's no committed date for fixing incorrect handling of NULL values in the result set returned by get_data method yet, but I hear it's being targeted for April this year.

Upvotes
0 3 2 1

Hi folks,


I have the same problem. I make the same request in Excel and in the Api (same ric, same dates, same interval) and I don't get the same results (numbers are different, number of rows is different). Any idea to solve the issue? In the formula builder function in Excel, How could I retrieve the volume?

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.

@arnoldpredator
Whenever you ask a new question on these forums, always start a new thread. Old threads with accepted answers are not monitored by moderators. In this case an example illustrating the discrepancies you see will be very helpful. Please start a new thread and provide an example.

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.