For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 2

Dividen data and date data fields together in Python code

Hi,

I am trying to get both dividend data and date in time series using following:

df, err = ek.get_data(

instruments = ['HYG'],

fields = ['TR.DivAdjustedGross(EDate=-1AW,SDate=2013-01-01)']

)

It gets only dividend data but does not show date. How do I write query to fetch both date(when it was declared or distributed) and dividend

Regards,

RS

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
39.2k 75 11 27

@rsharan

There's a number of dates associated with each dividend, and there's a field name for each of those dates, e.g. TR.DivAnnouncementDate, TR.DivExDate, TR.DivPayDate, TR.DivPeriodEndDate etc. Use CodeCreator app in Eikon application to search the field names for the data items you're interested in and to help you construct the data retrieval expression.

ek.get_data('HYG', ['TR.DivAnnouncementDate','TR.DivExDate',
                    'TR.DivPayDate','TR.DivPeriodEndDate',
                    'TR.DivAdjustedGross'],
            {'EDate':'-1AW', 'SDate':'2013-01-01'})
icon clock
10 |1500

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

Thanks a lot, Alex! It works
Click below to post an Idea Post Idea