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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
37 3 3 10

Different in price value depending on date range

i have noticed that running those 2 requests to get prices for a stock over different range return different data:

Version1:

data,err    = ek.get_data(['000001.SZ'], ['TR.PriceCloseDate(SDate="2018-10-02", EDate="2018-12-31"),TR.ClosePrice(SDate="2018-10-02", EDate="2018-12-31")'])

This returns:

2018-10-08 - NaN

2018-10-09 - NaN

2018-10-10 - NaN

2018-10-11 - NaN

2018-10-12 - 10.45


Version2:

data,err    = ek.get_data(['000001.SZ'], ['TR.PriceCloseDate(SDate="2018-06-02", EDate="2018-12-31"),TR.ClosePrice(SDate="2018-06-02", EDate="2018-12-31")'])

This returns:

2018-10-08 - 10.45

2018-10-09 - 10.56

2018-10-10 - 10.45

2018-10-11 - 9.86

2018-10-12 - 10.3


Can anyone explain what is going on? Why do I get different prices for the same date? and all those NaN? Is there something wrong in request?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythontime-seriespricing
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
3.8k 4 4 6

Hi @Tulkkas

You are using fields that are not aligned in a one time series.

TR.PriceCloseDate, TR.PriceClose, TR.PriceClose.date

and

TR.ClosePrice, TR.ClosePrice.date

Please have a look at the example below

ek.get_data('000001.SZ', ['TR.PriceCloseDate,TR.PriceClose,TR.PriceClose.date,TR.ClosePrice,TR.ClosePrice.date'],{"SDate": "2018-10-01", "EDate":"2018-12-31"})

I hope it clarifies


ahs.jpg (167.8 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
37 3 3 10

Thx for the explanation. I indeed did not notice those series were not aligned. So what is the difference between PriceClose and ClosePrice and what is recommended to use?

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.

Hi @Tulkkas

You may check a similar question here

Click below to post an Idea Post Idea