Top 10 Dividend Stocks to Buy in 2024: Python's Top Dividend Picks for the Korean Stock Market
Hello, everyone! If you're feeling a little nervous about the future of the Korean stock market these days, I know I am. But don't worry. Today, we're going to talk about your best friend in stock investing: dividend stocks. Specifically, we're going to talk about the top 20 dividend stocks to watch in 2024. Analyzing the top 10 dividend stocks in PythonWe've done it. If you're looking for a steady income, stick with us, because we've got a lot of information for you!

Dividend stocks, why are they so attractive?
Dividend stocks are the pinnacle of stock investing. Why? Because you get regular cash payments. Regardless of whether the stock price goes up or down, if the company makes a profit, it gives a portion of that profit to us, the shareholders. Sounds great, right?
But just as there are pros and cons to everything, there are also downsides to investing in dividend stocks. For example, paying a high dividend can reduce a company's investment in growth. Also, if the stock price is too high at the time of purchase, you could lose more from a stock price decline than you gain from the dividend. So be careful when choosing dividend stocks.
How to calculate dividend stock yields
Before you start investing in dividend stocks, you need to know how to calculate the dividend yield, which is an important indicator of the return you can expect from investing in a stock.
The formula for calculating the dividend yield is as follows
Dividend yield = (dividends per share / share price) × 100
For example, Company A's stock price is 50,000 won and it pays an annual dividend of 2,500 won per share:
Dividend yield = (2,500 won / 50,000 won) × 100 = 5%
This means that the dividend yield on Company A's stock is 51 TP3T.
Top 10 Dividend Stocks to Watch in 2024
Now, let's dive in and see the top 10 dividend stocks to watch in 2024. I analyzed the high dividend stocks on the Korean stock market using Python. Let's see the code and results!
import yfinance as yf
import pandas as pd
import matplotlib.pyplot as plt
List of # dividend stocks (example)
stocks = ['005930.KS', '017670.KS', '033780.KS', '000270.KS', '051910.KS',
'032640.KS', '030200.KS', '000810.KS', '035250.KS', '316140.KS']
data = {}
for stock in stocks:
ticker = yf.Ticker(stock)
info = ticker.info
data[info['symbol']] = {
'Company': info['longName'],
'Dividend Yield': info['dividendYield'] * 100 if 'dividendYield' in info else 0
}
Create a # dataframe
df = pd.DataFrame.from_dict(data, orient='index')
Sort by # dividend yield
df_sorted = df.sort_values('Dividend Yield', ascending=False)
Graph #
plt.figure(figsize=(12, 6))
plt.bar(df_sorted['Company'], df_sorted['Dividend Yield'], color='skyblue')
plt.title('Top 10 Dividend Stocks to Watch in 2024.', fontsize=16)
plt.xlabel('Company', fontsize=12)
plt.ylabel('Dividend Yield (%)', fontsize=12)
plt.ylim(0, max(df_sorted['Dividend Yield']) * 1.2)
plt.xticks(rotation=45, ha='right')
Display numbers over the # bar
for i, v in enumerate(df_sorted['Dividend Yield']):
plt.text(i, v, f'{v:.2f}%', ha='center', va='bottom')
plt.tight_layout()
plt.show()
print(df_sorted)Code commentary
- yfinance Use the library to get real-time stock data from Yahoo Finance.
- Define a list of the top 10 dividend stocks and get information for each stock.
- Store the stock name and dividend yield information in a dictionary.
- Create a dataframe using pandas and sort by dividend yield.
- Use matplotlib to plot the graph.
- Visualize each stock's dividend yield in a bar graph.
- Display the actual dividend yield figure above the graph.
- Outputs a sorted dataframe.
When you run this code, you'll see a graph like the one below that shows the dividend yields of the top 10 dividend stocks to watch in 2024 at a glance. It uses real-time data, so you'll get the most up-to-date information every time you run it!

Investing in dividend stocks, here's how to do it
Now that you have a list of dividend stocks, you might be wondering how to invest in them. Here are some tips.
- Stable performance: Make sure it's a company that can consistently pay dividends.
- Moderate Dividend Yield: Too high a dividend yield can be dangerous.
- Growth potential: You need to see if there is room for stock price appreciation, not just dividends.
- DiversificationDon't go all in on one stock, diversify across multiple stocks.
Buy/Sell Dividend Stocks Strategy
The most important thing about investing in dividend stocks is picking the right time to buy and the right time to sell, and here are some strategies to help you do just that.
Buying strategies
- Buy when undervalued: Use metrics like PER and PBR to buy when a stock is undervalued.
- Buying after a dividend drop: Stock prices tend to drop right after a dividend cut, which can be a good buying opportunity.
- Split Buy: Consider buying in small increments rather than investing a large amount at once.
Selling strategies
- When you reach your target return: Consider selling, even partially, when you reach a predetermined target return.
- If your company's value drops: If a company's performance deteriorates or its dividend policy changes, I should consider selling.
- When you find a better investmentIf you find a stock with a higher dividend yield or growth potential, consider switching.
It's important to note that if the bid price is too high, you could lose more from the stock price decline than you gain from the dividend. Always evaluate the price of the stock to see if it's right for you. This can be difficult, but try not to rush into a purchase, and think about your own threshold.
Closing thoughts
Investing in dividend stocks can be a good option for investors looking for a steady income, but like all investments, it's not without risk, which is why it's important to do your research and analysis.
With this Python code, you should be able to easily analyze and visualize dividend stocks, and with a few modifications, you can analyze more stocks and more metrics.
In particular, Woori Financial Holdings, SK Telecom, and Samsung Chemical look like attractive dividend stocks with stable earnings, high dividend yields, and growth potential. I think they could be good choices for dividend stocks in 2024.
But remember, all investments involve risk, and you invest at your own risk. Always use your best judgment and seek professional advice if necessary. We hope this article has helped you on your investment journey. We wish you the joy of stable and generous dividends, and we'll be back with another informative post. Happy investing!
In fact, as a bumblebee, you've left your local stock market and are investing in the U.S. stock market, and you're interested in Bitcoin, which is hotter than ever. If you're a beginner when it comes to Bitcoin, you'll want to know how to get started. Bitcoin's first price of $0.003, the myth of digital gold debunked with R We recommend you take a look at the post.
# Code Details section
1. load the required libraries
import yfinance as yf import pandas as pd import matplotlib.pyplot as pltIn this part, we load the necessary Python libraries:
yfinance: Library to pull stock information from Yahoo Financepandas: Libraries for data analyticsmatplotlib.pyplot: A library for plotting graphs2. Define a list of stocks to analyze
stocks = ['005930.KS', '017670.KS', '033780.KS', '000270.KS', '051910.KS', '032640.ks', '030200.ks', '000810.ks', '035250.ks', '316140.ks']Define the stock codes of the Korean stocks you want to analyze as a list, where '.KS' stands for Korean stocks.
3. Collect stock information
data = {} for stock in stocks: ticker = yf.Ticker(stock) info = ticker.info data[info['symbol']] = { 'Company': info['longName'], 'Dividend Yield': info['dividendYield'] * 100 if 'dividendYield' in info else 0 }For each stock, we use yfinance to get information: we store the company name and dividend yield, which we convert to a percentage.
4. Create and align dataframes
df = pd.DataFrame.from_dict(data, orient='index') df_sorted = df.sort_values('Dividend Yield', ascending=False)Convert the collected data into a pandas DataFrame and sort it in descending order by dividend yield.
5. draw a graph
plt.figure(figsize=(12, 6)) plt.bar(df_sorted['Company'], df_sorted['Dividend Yield'], color='skyblue') plt.title('Top 10 Dividend Stocks to Watch in 2024.', fontsize=16) plt.xlabel('Company', fontsize=12) plt.ylabel('Dividend Yield (%)', fontsize=12) plt.ylim(0, max(df_sorted['Dividend Yield']) * 1.2) plt.xticks(rotation=45, ha='right')Use matplotlib to plot a bar graph. Show the company name on the x-axis and the dividend yield on the y-axis.
6. Show numbers in a graph
for i, v in enumerate(df_sorted['Dividend Yield']): plt.text(i, v, f'{v:.2f}%', ha='center', va='bottom')Displays the exact dividend yield above each bar.
7. Display graphs and output data
plt.tight_layout() plt.show() print(df_sorted)Display the graph on the screen and output the sorted data to the console.






