Here’s some finance 101.
Dividends are a form of distribution made by a company to its shareholders, representing a portion of the company’s earnings. When a company generates profits, it can choose to reinvest them back into the business or distribute them to shareholders as dividends. Dividends are usually paid out on a per-share basis, meaning shareholders receive an amount for each share they own.
Dividends are a key indicator of a company’s financial health and stability, as consistent dividend payments signal strong and sustainable earnings. They also play a crucial role in attracting investors, particularly those seeking regular income from their investments. However, not all companies pay dividends, especially those in growth-oriented sectors that prioritize reinvesting profits to fuel expansion and innovation.
When it comes to dividend performance, two factors matter the most –
- Dividend Yield: The annual dividend income expressed as a percentage of a stock’s current market price. How much bang per buck you get.
- Dividend Payout Ratio: The proportion of a company’s earnings paid out as dividends to shareholders. How much reserve the company still has for growth.
Fun fact: Over the historical period, stocks with dividend growth have always outperformed the total stock market as a whole so its no wonder value investors chase companies with consistent dividend growth.
Methodology
Now the approach of this post is to find stocks that can give us a good consistent stream of dividend income. Its not as easy as it sounds as we need to look at a companys or funds historical dividend performance to make sure it is a good bet.
Companies that have historical continuously had strong dividend performances across multiple decades are called dividend aristocrats . These are companies like Coca-Cola, MMM, Pepsi etc. Pretty much household names. But for this exercise its not just enough that a company has a good history of raising dividends but also those which give a very strong and healthy dividend yield.
Here’s some quick math – for a stock X has 2% dividend yield, in order to have a income of $1000 a month you need to have $600,000 worth of that stock. For a stock with 4% yield you need half that.
Note: Its often advantageous to buy these dividend stocks in tax efficient retirement accounts like a Roth 401k so you dont get taxed on earnings as ordinary income.
Implementation
Im going to use a very simple method to pick a few funds with a good dividend yield and strong performance. As usual disclaimer this is not financial advice and must not be construed as such. You can try out your own algorithm or methodology – as always this blog is meant to provide education and tools you need to succeed in investing and not what stock to invest (there are more than enough resources on the internet for that – and I don’t trust any of them).
Here is my algorithm
- Pick stocks that have atleast 4% yield
- Stocks with consistent dividends over atleast 15 years
- Stocks with low payout ratio (I used 0.75)
Ok here is the code
import yfinance as yf
def get_dividend_yield(ticker):
stock = yf.Ticker(ticker)
dividend_history = stock.dividends
if len(dividend_history) > 0:
latest_dividend = dividend_history[-1]
price = stock.history(period="1d")["Close"].iloc[-1]
dividend_yield = (latest_dividend / price) * 100
return dividend_yield * 4.0
return 0
def has_low_payout_ratio(ticker, ratio_threshold=0.75):
stock = yf.Ticker(ticker)
info = stock.info
earnings_per_share = info.get("trailingEps", 0)
if earnings_per_share:
dividend_per_share = stock.dividends.iloc[-1]
payout_ratio = dividend_per_share / earnings_per_share
return payout_ratio < ratio_threshold
return False
def total_dividend_increase(ticker, years=15):
stock = yf.Ticker(ticker)
dividend_history = stock.dividends
dividend_history = dividend_history.sort_index()
dividend_values = dividend_history.values.tolist()
if len(dividend_values) > years*4: # atleast 15 years
return (dividend_values[-1] - dividend_values[0]) / dividend_values[0]
return 0.0
def filter_dividend_stocks(tickers):
filtered_stocks = {}
for ticker in tickers:
try:
dividend_yield = get_dividend_yield(ticker)
if dividend_yield >= 4.0 and has_low_payout_ratio(ticker):
filtered_stocks[ticker] = total_dividend_increase(ticker)
print(ticker + " success")
except Exception as e:
print(ticker + " failed")
sorted_items = sorted(filtered_stocks.items(), key=lambda x: x[1], reverse=True)[:25]
return sorted_items
It gets the top 25 stocks with highest percentage dividend increase subject to the constraints I have put. As of this writing this is what I get –
[('MO', 600.4075495841331), ('BEN', 504.902192242833), ('TROW', 389.4), ('USB', 215.02160216021602), ('PFE', 128.62377489724943), ('MMM', 119.0), ('WBA', 68.81818181818181), ('DVN', 47.0), ('AEP', 32.87755102040816), ('IFF', 31.4), ('STX', 22.333333333333332), ('CCL', 18.999999999999996), ('CAG', 17.652739287998294), ('VTRS', 15.200891049007694), ('FITB', 14.662078785002375), ('OKE', 12.635065676756138), ('WMB', 10.972847292746806), ('ZION', 8.11111111111111), ('CMA', 7.713687853610043), ('PSA', 7.571428571428572), ('PNC', 7.157894736842105), ('WHR', 6.777777777777777), ('IP', 6.691029900332227)]
I will make another post soon on more nuanced strategies on doing this for ETFs as well. There are some ETFs/Mutual Funds out there with phenomenal dividends.
Happy investing!
Disclaimer: The information provided here is for general informational purposes only and should not be considered as professional financial or investment advice. Before making any financial decisions, including investments, it is essential to seek advice from a qualified financial advisor or professional.
Leave a comment