No matter how many numbers are involved, investing isn't a science. For me, the art is about finding stocks that pay dividends when they are out of favor with investors. My goal is to buy great companies while they are temporarily offering high dividend yields.

My timing, however, isn't always so good, and I sometimes get in too early. But owning a great dividend-paying company at a fair price is better than owning a bad company at any price. Which is why I'm happy to have bought U.S. utility giant The Southern Company (NYSE:SO) and healthcare real estate investment trust (REIT) Ventas, Inc. (NYSE:VTR). And I'll be just as happy if they fall further from here.

1. The Southern Company

Utility giant Southern has made a few big mistakes lately, including an attempt to build a clean coal plant that didn't work out (it is now a very expensive natural gas plant) and cost overruns and delays at a nuclear construction project. There's a good reason why investors have pushed shares lower and the yield up above 5%.

A nest made of dollar bills holding three golden eggs

I'm building my dividend portfolio one out-of-favor stock at a time. Image source: Getty Images

That's near the highest yield levels in more than a decade at a company that has increased its dividend annually for 17 consecutive years. Equally important, Southern hasn't cut its dividend in over six decades. It clearly has a focus on rewarding investors with dividend income through good times and bad.

The elevated construction costs it is facing today, meanwhile, aren't life-threatening, even if they are headline worthy. I believe Southern will work with regulators to get through this period of spending while continuing to slowly adjust its business in accordance with the changes taking place in the utility sector. In fact, management is still calling for 4% to 6% earnings growth through 2022, with $0.08 per share annual dividend hikes, despite the troubles. That outlook is backed by the company's reasonable balance sheet (it's investment grade, at A-), a largely regulated monopoly business, and the fact that we simply can't live without the products and services it sells. I'm reinvesting my dividends, so lower stock prices mean I get to buy more at what I believe to be reasonable prices.

2. Ventas, Inc.

Ventas is one of the largest and most diversified healthcare REITs in the United States. It's only increased its dividend for eight consecutive years, but that's because it paused the hikes during the 2007 to 2009 recession -- not because of a dividend cut. The roughly 6.4% yield, meanwhile, is the highest it's seen since the recession. But the long-term picture here hasn't materially changed.

SO Dividend Yield (TTM) Chart

SO Dividend Yield (TTM) data by YCharts

The REIT's senior living facilities, medical office properties, medical research centers, and hospitals are all set to benefit from the aging of the Baby Boomers. This massive generation has started to hit retirement in force, with the leading edge of the group having reached age 75. These older age cohorts use materially more medical care than younger ones; in fact, the 75-and-up age group will be the fastest growing demographic for the next 20 years. This is a major demographic shift that nothing can stop.

The best part here is that diversified and investment-grade rated Ventas (BBB+) will be there to ride the wave in a still fragmented property sector. And it is run by a management team that has proven prescient with portfolio shifts, including spinning off its nursing home business before nursing homes started to become a trouble spot for healthcare REITs. (The dividend dip in the graph below was related to that spin off, but was made up by the dividend from the spun-off company, which has since merged with another REIT.)

SO Dividend Per Share (Annual) Chart

SO Dividend Per Share (Annual) data by YCharts

All of that said, there's an oversupply of senior housing today that's going to depress results in this segment of Ventas' business (roughly half of its net operating income). But that's a short-term issue that the aging Boomers will eventually resolve. I'm happy to reinvest that fat dividend while I wait. And if the stock goes lower, all the better -- I'm reinvesting the dividend, and I might buy some more shares, too.

Slow and steady

Southern and Ventas have some warts, to be sure. But the problems they face appear to be short-term in nature and, just as important, surmountable. Add in the solid financial state of each of these investment-grade rated companies and their long histories of rewarding investors via dividends, and I'm happy to buy at what appears to be a good price even if the stocks drift lower from here. I'll just keep letting the dividends reinvest -- and perhaps even add to my positions.