question

Upvotes
Accepted
16 0 1 2

[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 5.0 MiB each and 10.0 MiB total.

I am using the PyDSWS module for the above query.

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 5.0 MiB each and 10.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 5.0 MiB each and 10.0 MiB total.

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

Click below to post an Idea Post Idea