question

Upvotes
Accepted
16 1 2 3

[Possible Issue] Date index seems to be off by a single day.

The data-frame created by the following call:

ds = PyDSWS.Datastream(usern, passw)
df = ds.get_data(tickers=[TTOCOMP, S&PCOMP], start='-10D', end='-0D', freq='D')

will have its index (incorrectly) lagged by one workday. For example, it shows the close on 2019-05-16 to be 16401.75, when in fact this was the close for 2019-05-17. The right amount on 2019-05-16 should actually be 16443.85 (which shows up as being the close from 2019-05-15).

I'm no expert, but there might be a index issue in the python API function. It looks like a simple case of forgetting that Python indexes by starting at 0.

Please let me know if you face the same issue on your end or if this happens to be computer specific.

Thank you!

eikon-data-apipythondatastream-apidsws-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.

I am using the PyDSWS module for the above query.

@nicolas.charlton

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text next to the most appropriate reply.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
1.1k 3 3 3

@nicolas.charlton

We have created new beta package available for download here.

There is also Getting started guide with Python with downloadable examples under Downloads.

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.

Upvotes
1.1k 3 3 3

@nicolas.charlton

Thank you for raising this issue.

The PyDSWS library uses 'datetime' package, which is based on Unix Time (https://en.wikipedia.org/wiki/Unix_time). This is the reason that some clients see date offset. We are aware this is happening and we are in last stages of testing new library which we will post on the Portal: https://developers.refinitiv.com/eikon-apis/datastream-web-service

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.

@Monika.Stankovic, to manage expectations, when do you expect to post the new library ?

@Monika.Stankovic, it would be helpful, to manage expectations, to give us an indication of when you expect to post the new library.

Asked expert Monika Stankovic

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.