Hendrik Bessembinder of Arizona State University set out to answer a simple question: Do stocks outperform Treasury bills? The results, published in a paper earlier this year, were striking. Just 86 stocks accounted for more than half of all stock market gains between 1926 and 2015. They represent just 0.33% of all publicly traded companies. Meanwhile, just 4% of all stocks accounted for all of the stock market's gains in that span.

In other words, most stocks don't manage to beat the S&P 500 over long periods of time. While the data are imperfect (the economy was very different in 1926 than in 2015), they serve as a reminder of the importance of buying great companies and owning them for the long haul. For buy-and-hold investors looking for those select few opportunities to build wealth, Brookfield Infrastructure Partners (NYSE:BIP) and NextEra Energy (NYSE:NEE) fit the bill for stocks you can keep forever.

Two transmission line towers.

Image source: Getty Images.

A well-managed cash machine

Why is it so difficult to beat the S&P 500? Consider that the index has delivered a total return (gains plus dividends) of 265% in the last 10 years. That's a pretty high bar, but Brookfield Infrastructure Partners had no trouble clearing it with a total return of 641% in that span. Nonetheless, the stock is down 11% in 2018. If that holds, then this would be just the second year in the last decade returns have been negative. Opportunistic investors might want to take a closer look.

The company's "struggles" stem from the sale of electric utility assets in Chile earlier this year. While the divestment netted Brookfield Infrastructure Partners $1.1 billion, it reduced the business' funds from operations (FFO) -- similar to earnings per share -- by $80 million per year. Management was confident it could reinvest the proceeds to earn an even higher return over time, but executives also made statements suggesting market premiums suffocated the list of available opportunities. When combined with an economic slowdown in Brazil and lower hydroelectric dam output in North America, Wall Street decided there was too much uncertainty facing the business.

But management has quietly delivered since then. Brookfield Infrastructure Partners announced a new data center alliance with AT&T to begin building out the last part of its data utility strategy. It purchased the natural gas gathering and processing business of Enbridge in Western Canada. And a recent bidding war for a natural gas pipeline in Brazil demonstrates just how great the company has been at acquiring assets at great prices to maximize long-term earnings.

None of the recent portfolio announcements should be all that surprising for a company with the track record of Brookfield Infrastructure Partners. Considering the company's stated objective is to deliver long-term annual returns of 12% to 15% and grow its distribution (currently yielding 4.7%) at an annual clip of 5% to 9%, it seems clear that Wall Street overreacted to short-term concerns earlier this year. Investors with an eye on the future should consider the high-yield stock a great buy. 

Wind turbines and solar panels.

Image source: Getty Images.

A renewable energy leader

NextEra Energy stock has delivered a 10-year total return of 470%, again far outpacing the S&P 500 in that span. The company, the world's largest publicly traded utility by market cap, has accomplished that in a similar fashion to Brookfield Infrastructure Partners: by strategically and boldly managing its asset portfolio.

Specifically, the business was among the first to make a bold bet on onshore wind power, which has paid off in spades today. That's because wind power is now, on average, the lowest-cost source of electricity in the United States on a levelized cost basis; in no small part aided by avoiding fuel costs over the life of the asset. That frees up considerable capital for additional growth investments. NextEra Energy, the largest owner of installed wind capacity in the United States at over 14,000 megawatts, hasn't wasted time putting all of that incremental cash flow to good use.

NextEra Energy has announced ambitious plans to modernize the generation portfolio of its electric utility subsidiary Florida Power & Light with a heavy dose of solar power and natural gas. In fact, the company expects to become the largest owner of installed solar capacity (currently the third-cheapest source of electricity on a levelized cost basis) in the United States. It recently acquired two natural gas utilities in Florida to diversify the portfolio. And NextEra Energy Resources, the nationwide power generation subsidiary, is on track to expand its renewable energy asset backlog from 28,000 megawatts to 40,000 megawatts by the end of 2020.

These businesses provide the steady, predictable earnings and cash flow that have powered the stock's epic returns in the last decade. Management expects much of the same going forward. NextEra Energy is targeting annual earnings per share (EPS) growth of 6% to 8% from 2018 to 2021 -- no small feat for a $77 billion company. Meanwhile, the dividend (currently yielding 2.6%) is expected to grow at an annual clip of 12% to 14% through 2020.

A man cupping a seedling growing in soil in his hands.

Image source: Getty Images.

Buy great companies, hold on forever

Buy-and-hold investing is the best way to build wealth over long periods of time. Of course, investors still need to make sure they're holding on to great companies, and those with long track records of executing in the past are generally the best opportunities for the future. When it comes to Brookfield Infrastructure Partners and NextEra Energy, investors should feel confident that the businesses can continue delivering market-beating returns.

Maxx Chatsko has no position in any of the stocks mentioned. The Motley Fool recommends Brookfield Infrastructure Partners and Enbridge. The Motley Fool has a disclosure policy.