how to calculate annual dividends per share using direct functions or python?

dusan_miletic
dusan_miletic Newcomer
edited December 2024 in Eikon Data APIs

I need assistance with obtaining dividend data from various companies. Since not all companies pay dividends at the same intervals, it is most practical to calculate the total annual dividend. In the attached image, you can see that individual dividend payments are listed. However, I would like to display the summed annual dividends directly in the MONITOR.

Screenshot 2024-12-07 153109.png

The "annualized dividends" function does not work as the fields remain empty. Is there another direct function to display annual dividends? Alternatively, can this be solved using Python and loops? If so, how exactly would one implement this solution?

Answers

  • Hi @dusan_miletic ,

    For Dividends overview app, please raise a question via Helpdesk (via Help& Support section in LSEG Workspace or MyAccount), they are better positioned to answer product related questions.

    As for the Python implementation, you can use LSEG Data Libraries for python to request dividend data. Below is a request for Gross Dividend Amount, for other fields, please check DIB app in Workspace:

    import lseg.data as ld

    dividends = ld.get_data("AAPL.O", fields=["TR.DivUnadjustedGross", "TR.DivUnadjustedGross.coraxdividenddate"], parameters={'SDate': '2020-01-01', 'EDate': '2024-12-31'})

    dividends

    Screenshot 2024-12-09 at 15.03.33.png

    Once you have the dividends, you can then group by Year:

    dividends['Year'] = dividends['Date'].dt.yeardividends_by_year = dividends.groupby('Year')['Gross Dividend Amount'].sum().reset_index()

    dividends_by_year

    Screenshot 2024-12-09 at 15.04.20.png

    Hope this helps.

    Best regards,

    Haykaz