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.