I try to buy great companies when they have historically high yields, focusing on names with very long histories of supporting, and increasing, their dividends over time. The hope is that the troubles facing the companies I buy will be short lived and that the company's execution will return to previous levels, pushing the stock higher. That's exactly what happened with Nucor (NUE -1.42%) and Procter & Gamble (PG -0.33%). Now that I own them I'm planning to keep them in my portfolio for as long as I can.

Good times and bad times

The business world doesn't move in a straight line, and neither do the fortunes of any company. It's better to think about a sine curve when looking at stocks, as businesses typically shift from good periods to difficult ones and back again to good periods. The hope is that the overall, long-term slope will be higher, while recognizing that short-term periods might look better or worse depending on the economic environment, industry trends, and company-specific issues. 

Procter & Gamble is a premium-priced consumer goods maker and its ability to execute in tough markets is on display right now.

Image source: Getty Images.

If you can step in when times are tough, you can pick up some great companies at relatively cheap prices and hold them forever. That said, it can be tough to buy when others are selling, which is why I focus on relative dividend yield. Since yields move in the opposite direction as stock prices, I'm effectively looking for companies with strong dividend histories that are trading with dividend yields at the high side of their historical range. A good place to start the search is with Dividend Aristocrats (at least 25 consecutive annual dividend increases) and Dividend Kings (at least 50 increases). Nucor is an Aristocrat and Procter & Gamble is a King.

When I bought Nucor, the steel maker was suffering through a deep industry downturn. When I added Procter & Gamble to my portfolio, growth had stagnated, but it was in the middle of selling assets to reposition its business. Both had historically high yields because of the headwinds they faced.

Great businesses

It wasn't easy stepping in, but I comforted myself with the historically high yields (both over 4% at the time I bought the stocks) and, equally important, the solid businesses backing the dividends. Nucor is the largest and most diversified U.S. steel mill. It uses highly flexible and modern electric arc mini-mills and has a vertically integrated business model, ensuring access to key supplies. It also has a unique employment model in which profit sharing is used to reward employees during good years while allowing Nucor the ability to reduce employee expenses during lean years. On the business front, meanwhile, Nucor has a long tradition of investing in its business through the highly cyclical steel industry's ups and downs to ensure that it comes out of the downturns a stronger company.

Nucor's 2021 results clearly show what it can achieve, as it posted record revenues ($9.2 billion) and earnings ($23.16 per share) coming out of pandemic-hit 2020 (revenues of $830 million and earnings of $2.36 per share). That strength continued into the first quarter of 2022, which the company reported was its most profitable first quarter ever, with earnings of $7.67 per share. Even though the fear of a recession has pushed the stock lower, it's still pretty expensive, noting the yield is just 1.8%. But watch the yield; if it peaks into the 3% range you might want to add Nucor to your portfolio as a long-term hold, too.

Procter & Gamble operates in the far more consistent consumer staples space, selling iconic brand names like Bounty and Gillette. The current yield here is around 2.5%, but a recession could lead investors to throw the baby out with the bathwater. A yield a touch above 3% space would make the stock pretty enticing. 

What's notable about P&G is that its size and strong brand portfolio have resulted in extremely strong relationships with retailers. That's partly because it can invest in product enhancements that drive product category growth and because it can afford to support the advertising that gets consumers into stores. Even when the company's portfolio was bloated with lesser brands, its leading nameplates still dominated their categories. The key change made when I bought the stock was that management was jettisoning slow-growth names so it could focus on higher-growth fare. 

The company's fiscal third-quarter 2022 organic sales growth of 10% proves just how capable the company truly is, even in the face of fast- rising inflation. Notably, it was able to increase prices, shift customers to higher-cost products, and increase sales volume all at the same time. This strength probably won't last (remember the sine curve), but Procter & Gamble is showing today why it is such a great company and one that you should have on your wish list just in case it gets cheap again.

I'm in for the long term

I consider myself lucky to own Nucor and Procter & Gamble -- even luckier that I was able to buy them at relatively cheap prices. I still think they are well run and expect them to be industry leaders for years to come, so I'm planning to hold them for a very long time. But, despite the current good run each has had, when they get cheap again, you might want to join me as an investor, if you aren't already one.