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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 2

get_data returns NA at last row, and data is shifted

I notice get_data gives different return (shifted data) when the duration is large (eg. 1400 days)

This can be reproduced with below:

  • The current date is 28 Jul 2019.
  • 27-28 Jul 2019 is none trading day.
  • The last row of return result is NA, no timestamp, BUT with a value of PE.
  • However, the PE value of last row (no timestamp) is for second last row (26 July).
df, error = ek.get_data( 'AIRX.KL',
            ['TR.OPENPRICE.Date','TR.OPENPRICE','TR.HIGHPRICE','TR.LOWPRICE',
            'TR.CLOSEPRICE','TR.PE','TR.VOLUME','TR.BIDPRICE','TR.ASKPRICE'],
            parameters = {
            	'SDate': -1400,
                'EDate': 0})

When I run this the same code (with smaller date window, just 5 days), the data is show correctly.

df, error = ek.get_data( 'AIRX.KL',
               ['TR.OPENPRICE.Date','TR.OPENPRICE','TR.HIGHPRICE','TR.LOWPRICE',
                'TR.CLOSEPRICE','TR.PE','TR.VOLUME','TR.BIDPRICE','TR.ASKPRICE'],
                parameters = {
                          'SDate': -5,
                           'EDate': 0})

Is this a correct behaviour ?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
airx.png (57.0 KiB)
airx2.png (23.9 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.

Upvotes
Accepted
39.2k 75 11 27

@yongks
The misalignment appears to be due to a gap in the timeseries of price history for AIRX.KL on 2015-01-30. This (or any other content issues that you find) needs to be reported to Refinitiv Helpdesk. I would be happy to open a ticket with the Helpdesk on your behalf, however unfortunately you chose to register on this portal with a personal rather than a corporate email address, which makes you anonymous to the moderators on this forum. And we cannot open a ticket with the Helpdesk for anonymous users.
Here's the best way to report such an issue to Refinitiv Helpdesk.
1. Reproduce the issue using Excel. In this case the data retrieved by the following function demonstrates that fields TR.OPENPRICE, TR.CLOSEPRICE omit the row for 2015-01-30 while TR.PriceOpen, TR.PriceClose return duplicate row for 2015-01-29, whereas TR.Volume returns a row for 2015-01-30 with zero volume.

=TR("AIRX.KL","TR.PriceOpen.date;TR.PriceOpen;TR.PriceClose.date;TR.PriceClose;TR.OPENPRICE.date;TR.OPENPRICE;TR.CLOSEPRICE.date;TR.CLOSEPRICE;TR.Volume.date;TR.Volume","SDate=2015-01-25 EDate=2015-02-05 CH=Fd RH=IN")
2. Use Contact Us capability in your Eikon application or follow the link below to report the issue to Refinitiv Helpdesk.
https://my.refinitiv.com/content/mytr/en/helpandsupport.html
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.

Upvotes
1 0 0 2

I drilled down further and notice that the error happened on below dates:

2-3 Feb 2015 (Mon, Tue) not a trading day.

I had compared MBBM.KL and AIRX.KL, and noticed that MBBM.KL data is correct, wherease AIRX.KL has this error.

df, error = ek.get_data( 'AIRX.KL',['TR.VOLUME.Date','TR.OPENPRICE.Date','TR.OPENPRICE','TR.HIGHPRICE','TR.LOWPRICE','TR.CLOSEPRICE','TR.BIDPRICE','TR.ASKPRICE','TR.VOLUME'],
      parameters = {
      'SDate':  '2015-1-25',
      'EDate':  '2015-2-04'})

In this situation, how do we adjust it ?


compare.png (58.1 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.

Click below to post an Idea Post Idea