This bear market has brought down the value of a lot of stocks of good companies, including those with nearly impenetrable moats or competitive advantages that allow them to dominate their markets. Two of those beaten-down stocks with these features are Moody's (MCO 0.95%) and Standard & Poor's Global (SPGI 0.70%).

Both of these stocks are in the same industries and should bounce back. Even if you only had $2,000 to invest, a handful of shares of these stocks would be a good investment. Here's why.

Owning their market

Moody's and S&P Global are the two leading credit-rating agencies in the U.S. They both own a market share of 40% -- while a third major player, Fitch Ratings, controls about 15% of the market. That's about a 95% market share between the three. There are several reasons it's unlikely any new competitors will emerge to take market share from them.

One, they are huge established brands that the market recognizes and trusts. Two, there's no need for more than a few credit-rating agencies; otherwise, the standard would become watered down. And three, there are many costly and complex regulatory hurdles that any new competitor would have to navigate to break into the market.

Both of these stocks have underperformed the market this year: Moody's is down 32% year to date and S&P Global is down 30% as of June 23. The primary reason is a slowdown in global bond issuance. If fewer bonds are issued, there are fewer bonds to rate.

One June 1, S&P Global suspended its revenue forecast for 2022 based on the slumping market for credit ratings. If these trends continue, bond issuance could decline in the high-teen percentages, compared to 2021, while rated, or billed, issuance could be 30% to 35% lower. The company said ratings revenue could be "negatively impacted by as much as $600 million relative to previous revenue guidance."

It should come as no surprise that both Moody's and S&P Global saw revenue drop in their credit-ratings businesses in the first quarter. But what makes these companies stand out is that both have diverse revenue streams that typically don't move in tandem with their ratings businesses.

Analytics and market intelligence

Both of these companies have robust data and analytics businesses that provide market intelligence to companies, institutions, and organizations. They both tend to perform well when markets are down, as organizations tend to seek out this data to understand changing and uncertain markets.

Moody's Analytics revenue jumped 23% in the first quarter year over year, while S&P Market Intelligence saw revenue climb 39% in the same quarter from a year earlier. S&P Global just bought IHS Markit to bolster its analytics business in markets it hadn't previously served.

S&P Global also has two other revenue streams -- commodity insights, through its Platt's property, and its indexes, including the S&P 500. S&P Global saw revenue increase 18% year over year in the first quarter, while net income jumped 61% due to a boost from the IHS Markit acquisition.

Both of these stocks have seen their valuations drop. Moody's has a price-to-earnings (P/E) ratio of 25, down from about 34 a year ago, while S&P Global's P/E ratio is at 24, down from about 40 a year ago.

Of the two, I like S&P Global a bit better because of its more diversified revenue stream and additional earnings potential from the IHS Markit acquisition. But both of these stocks have been stalwart long-term performers, as Moody's has posted an average annual return of 21.7% over the past 10 years, while S&P Global has an average annual return of 22% during the same period. Both are protected by their moats and diversity of revenue and have great earnings power to continue generating strong returns.