How do I add date index to eikon get_data call with multiple historical values?

I am trying to retrieve historical amount outstanding for a list of debt securities. This can vary over time due to re-openings, conversions etc.

However, although the get_data function will return multiple values if the amount outstanding has changed within the specified time frame, it doesn't seem to tell you the date when this change happened - it just returns a integer index.

For example:

eikon.get_data('CA766910AY98', {'TR.CA.AmtOutstanding': { 'params':{ 'SDate': '2013-01-01', 'Edate': '2017-12-31'}}}, parameters=None, raw_output=False, debug=False)

returns:

(     Instrument  Amount Outstanding
0 CA766910AY98 150000000
1 CA766910AY98 250000000, None)

Initial issuance for this bond was CAD 150m on 2014-05-22

There was a re-opening on 2014-08-11 that saw an increase in total debt issued to CAD 250m.

How do I retrieve these dates along with the values themselves?

Best Answer

  • You can treat the field 'TR.CA.AmtOutstanding' as an object with several default properties, like description, value and associated dates. So, your request should look like that:

    result, error = eikon.get_data(['CA766910AY98'],['TR.CA.AmtOutstanding.date', 'TR.CA.AmtOutstanding.value'], {SDate': '2013-01-01', 'EDate': '2017-12-31'})

    image

Answers