Stay Ahead of the Game with Python's Dividend Date Tracker.

Getting Dividends Calendars for trading.


To make efficient decisions for successful investments several market KPIs should be analyzed and Dividends which show a distribution of profits by a corporation to its shareholders is one of them. The golden source of market information is NASDAQ - National Association of Securities Dealers Automated Quotation.

In our case we will use very handy Python package finance_calendars - a simple wrapper of NASDAQ public API for Financial Calendars.

Dividends Calendar.
Dividends Calendar meme.

Python Knowledge Base: Make coding great again.
- Updated: 2024-12-01 by Andrey BRATUS, Senior Data Analyst.




    Now you will get all the information on Dividends including todays' data and historical information on any date or any stock and ETF. Output data is in Pandas dataframe format which can be easily converted to any suitable form for further visualisation and analysis.


  1. Python code to extract todays' Dividends:


  2. 
    # pip install finance-calendars
    
    from finance_calendars import finance_calendars as fc
    from datetime import datetime, date
    import pandas as pd
    
    dividends = fc.get_dividends_today()
    print(dividends)
    


  3. Todays' Dividends output:


  4. Dividends today output.


  5. Python code to get Dividends for a certain date:


  6. 
    dividends = fc.get_dividends_by_date(datetime(2022, 9, 16, 0, 0))
    print(dividends)
    

  7. Dividends for a certain date output:


  8. Dividends by date output.


  9. Python code to get Dividends historical for a certain stock:


  10. 
    div_hist = fc.get_div_hist_per_stock('MSFT')
    print(div_hist)
    

  11. Dividends historical for a certain stock output:


  12. Dividends historical by stock output.



  13. Python code to get Dividends historical for a certain ETF:


  14. 
    div_hist = fc.get_div_hist_per_etf('QQQM')
    print(div_hist)
    

  15. Dividends historical for a certain ETF output:


  16. Dividends historical by etf output.





See also related topics: