Different results using Python API and Excel Plugin

Hi There

I'm pulling the price history for SNHG.DE but found that using Excel and Python I get very different results.

Excel formula:

=TR("SNHG.DE","TR.PriceClose.calcdate; TR.PriceClose","SDate=2013-01-01 EDate=2017-08-24 Frq=D RH=In")

Python script:

ek.get_data(SNHG.DE, ['TR.PriceClose.calcdate', 'TR.PriceClose'], {'SDate': 2013-01-01, 'EDate': 2017-08-24, 'Frq': D} )

I've attached the two files where you can see that the dates at which prices are available (not null) differ quite substantially for the two methods of pulling the same data.

Please advise.

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    @Jan
    This is a known issue. We currently incorrectly handle the case when SDate<EDate and the value corresponding to SDate is null. The entire timeseries in the result set are shifted and the dates and values become mismatched. The issue has already been escalated to the development. In the meantime the only workaround I can suggest is to retrieve timeseries in reverse chronological order by swapping SDate and EDate values. In other words make sure that SDate>EDate.

Answers