question

Upvotes
Accepted
17 0 1 3

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?

eikoneikon-data-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-apidate
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
4.6k 27 7 22

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'})


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Perfect, thank you!

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.