No company goes through its life without facing adversity. Well-run companies can usually deal with business headwinds while continuing to reward investors well via reliable dividends.
Right now, Hershey (HSY 1.08%) and Realty Income (O 0.63%) are both dealing with some adversity, and they are offering attractive yields to investors. I happily own both. Here's why.
1. Hershey is facing a major supply issue
Hershey is a food company that makes chocolate, with its two most famous brands being its namesake Hershey and Reese's. The company faces a large problem today because cocoa prices, a key ingredient in chocolate, have gone through the roof.
Hershey is expecting revenues to remain strong in 2025, but higher costs will materially crimp earnings. First-quarter adjusted earnings fell nearly 32%. For the full year, the drop is projected to be in the mid-30% range.

Image source: Getty Images.
That's terrible, of course, but the interesting thing is the company is projecting organic sales to be up "at least" 2%. So the company's business continues to see solid demand on the top line of its income statement -- it is just the rising cost of cocoa that is a major headwind. Still, investors are deeply worried, and the stock has fallen dramatically, pushing the yield up to a historically high 3.5%.
The thing is, high commodity prices have a way of curing themselves. The chance for large profits brings investment, which leads to increased supply, which ends up lowering prices. Cocoa comes from a tree, so the commodity cycle here is a long one. It could take a while for things to play out, but Hershey has plenty of time.
That's at least partly related to the fact that The Hershey Trust has a controlling stake in Hershey the company. Thus, the company can make long-term decisions without worrying too much about appeasing short-term-thinking investors.
The Hershey Trust basically wants the same thing I do: reliable and growing dividends from a financially strong Hershey. I believe Hershey will muddle through the current headwinds and come out the other side in one piece. I'm not losing any sleep at all worrying about commodity prices -- a problem that will, eventually, get solved.
2. Realty Income is being hit by interest rate shifts
Realty Income is a large net lease real estate investment trust (REIT). The basic model is important to understand, since REITs issue stock and take on debt to pay for property acquisitions.
The rise in interest rates over the last few years have caused some turbulence in the real estate market and made it more difficult to find profitable acquisitions. And thanks to that, many REITs have come under pressure, including Realty Income. This is another situation that is likely to pass in time.
Interest rates have a history of going up and down. Property markets eventually adjust so that buying properties remains a profitable endeavor. If they didn't, nobody would ever buy or sell properties ever again. That's just not the most likely outcome.
It could take some time for property markets to adjust to whatever the new normal ends up being, but I am confident they will eventually get there. Realty Income's investment-grade-rated balance sheet will help it survive until that point.
The opportunity right now is that Realty income's dividend yield, at 5.7%, is near a 10-year-high. The REIT's yield has been double that level in the past, but you have to take that figure with a grain of salt. REITs have become mainstream investments, and the yields on offer have compressed. Thus, Realty Income's current yield is quite attractive, and I'm happy to have this stock in my portfolio.
Two opportunities for investors willing to wait
The theme with both Hershey and Realty Income is that I believe they are both good companies facing temporary problems. Assuming the problems get resolved in a reasonable time frame, both of these industry-leading companies are likely to end up long-term winners. If dividend investors buy today, they can collect historically attractive dividend yields while they wait for the better days I expect to arrive in the future.