Eikon API: how to get the right calcdate for TR.PEG?

Question on behalf of a client. Client would like to calculate the historic TR.PEG for NSI (RIC: NSTEc.AS). The following code gives the wrong output for calcdate. Therefore, it is not clear for which this date this TR.PEG applies. Can anyone help out please? Thanks!

start_date = str(20161231)
end_date = str(20170301)

my_symbol = "NSTEc.AS"

data, error = eikon.get_data(my_symbol, ["TR.PEG", "TR.PEG.calcdate"], {"SDate":start_date, "EDate":end_date})

data

Best Answer

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

    This issue has been previously raised here. The workaround is to swap the values of SDate and EDate, i.e. ensure that SDate>EDate.

Answers