Moody's (MCO 0.25%) and Standard & Poor's Global (SPGI 0.07%) are two competitors that run in the same circles, so to speak. Most notably, they are the two leading credit rating agencies in the U.S., both with a dominant 40% share of their market. They basically own the market, which makes them both good stocks to consider for your portfolio.

But if you had room for only one or the other, which one is the better choice? Let's take a look.

A person sitting on a couch doing research on a tablet.

Image source: Getty Images.

Moody's

Moody's has two major business lines: its credit ratings business, Moody's Investors Service (MIS), and its data and analytics arm, Moody's Analytics (MA). MIS generated about $3.8 billion in revenue in 2021, 62% of total revenue, while MA generated roughly $2.4 billion in revenue, or 38%.

As mentioned, the credit rating business is the largest out there, tied with S&P, and there is really only one other major player, Fitch Ratings, which is considerably smaller with a roughly 15% market share. So Moody's and S&P enjoy an economic moat as there are few competitors -- and very little chance that any will emerge -- because their brands are so strong. There also is a high regulatory bar for entry and no need for any more major credit rating agencies.

This is why Moody's is one of Warren Buffett's favorite stocks, as the Berkshire Hathaway founder and chief executive officer appreciates a good moat -- a term he popularized.

The analytics business has grown from about 35% of revenue five years ago to about 38% as of the end of 2021. In recent years, Moody's has made several acquisitions to bolster its analytics, including recently, Kompany, an Austria-based business that provides data and analytics for anti-money-laundering solutions and know-your-customer (KYC) compliance. Moody's Analytics tends to do well when credit issuance is down, so it's a nice balance.

Moody's revenue is fee- and subscription-based, so the company generates a lot of steady, predictable cash flow. It has about $2 billion in operating cash flow, an operating margin of about 46%, and a profit margin of 35%. These are extremely high numbers, but they are down after the first quarter, as credit issuance fell year over year in Q1.

Moody's also has a ridiculously high return on equity of 101%, which is a measure of efficiency. Its price-to-earnings (P/E) is 27, which is down from about 36 at the end of 2021, a year when Moody's had record revenue. Net income has grown about 13% per year, on average, over the past five years.

Standard & Poor's Global

Standard & Poor's Global is also led by its credit ratings and analytics businesses. The credit rating business did about $4.1 billion in revenue in 2021, roughly 49% of total revenue, while analytics, or Market Intelligence, did about $2.2 billion last year, about 26%.

These two businesses are S&P's largest and account for about 75% of revenue. But S&P has two other businesses -- one most investors know very well, its indexes, including the S&P 500 and all of its variations. Indexes made about $1.1 billion in revenue in 2021, or 13% of the total, while Platt's, a provider of energy and commodity research, did about $950 million.

Five years ago, ratings and Market Intelligence (including Platt's) accounted for about 44% of revenue each, with indexes about 11%.

At the end of February, S&P closed on a major acquisition, the purchase of IHS Markit, a London-based data and analytics firm, primarily in the financial and commodities businesses, which complements S&P's analytics expertise. The acquisition is expected to boost S&P's revenue growth by 40%, expand its margins by about 260 basis points, and increase its diluted earnings per share from $12.51 to a range of $13.40 to $13.60.

S&P has an operating margin of 54% and a profit margin of 35%. It has a return on equity (ROE) of 73% and a P/E ratio of around 28. Also, it has about $3.6 billion in operating cash flow. Net income has increased about 12% over the last 10 years on average.

Which is the better buy?

It bears repeating that while both these stocks are excellent and would make a solid addition to a portfolio, one stands out as slightly better -- S&P Global.

A few things give S&P the edge. One, it has a more diversified revenue stream beyond ratings and data-analytics. Specifically, its indexes business, a market leader with a wide moat itself, allows it to better navigate market ups and downs. Case in point, S&P Global has not had a negative annual return since 2008, although it is down 16% year to date.

And with the continuing growth of exchange-traded funds (ETFs), the index business should also grow.

Furthermore, S&P has a great dividend -- in fact, it is a Dividend Aristocrat, having increased its annual dividend for 48 straight years and counting. Finally, its acquisition of IHS Markit will take its already robust Market Intelligence business to the next level, making it a market leader as well.