As an investor, when it comes right down to it, you want to make money on your investment, whether that is 20 years from now, 10 years from now, or five years from now.

If you have $10,000 to invest, it is a good time to put that money to work because so many stocks are selling at discounted values right now due to the bear market. But because of the still uncertain economic and market conditions, it is not clear where the market is headed. Not that you want to try to time the market, but you also don't want to sink $10,000 in an investment that remains overvalued and has not hit bottom yet. There is also great uncertainty, with a possible recession looming, about which stocks will emerge from this downturn as long-term winners.

That's why, if I had $10,000 to invest, I'd consider two stocks with nearly impenetrable moats that should be able to emerge from this market with lots of earnings power -- S&P Global (SPGI -0.27%) and Moody's (MCO -0.54%).

Impenetrable moats

Moat is a term popularized by Warren Buffett, chairman and chief executive officer of Berkshire Hathaway (BRK.A -0.65%) (BRK.B -1.00%), to describe a company that has such a strong competitive edge that it can't easily be challenged. For example, Visa (V 0.70%) and Mastercard (MA -0.33%) have long enjoyed their protective moats as the only two major credit processing networks, but that may be in jeopardy because of current legislation working its way through Congress that seeks to inject more competition into the industry. 

S&P Global and Moody's also have moats around their business, and there is no legislation in the works that would derail that. The two companies essentially own the credit rating business, and each has a 40% market share. Fitch Ratings is a distant third with about a 15% market share, and that pretty much accounts for the entire industry.

There are good reasons these two market leaders probably won't be challenged in the future. One, the industry is highly regulated, so there is a very high bar for would-be competitors. But beyond that, there really isn't a need for more than a few players in this industry; otherwise, the ratings would be watered down. A third reason is the trust and brand recognition that these firms have built up over the years, which is hard to duplicate for any newcomer.

Additional revenue streams

At times like this, when debt issuance is down, the credit rating business is going to be less profitable. But the down markets don't last nearly as long as the periods of growth, and when the market and economy start to recover, credit issuance will rise with it -- and these firms will dominate.

But what makes these great stocks is the fact that they have multiple revenue streams to sustain them during the periodic lulls in credit issuance. S&P has three other business lines; its most well known and most visible is indexes, which includes the S&P 500. The company is a a market leader in this area. It makes money from fees charged for listings as well as transactions on its indexes, as well as by licensing its indexes used in the creation of exchange-traded funds (ETFs) and index mutual funds.

And both Moody's and S&P have robust market data and analytics businesses, which provide market intelligence to institutional clients. These businesses tend to perform well when the credit rating businesses aren't. For example, in the second quarter, Moody's Analytics reported an 18% increase in revenue year over year, while the credit rating business had a 28% decline in revenue.

SPGI Chart.

SPGI data by YCharts.

Likewise, while S&P had a 26% year-over-year revenue decline from credit ratings, market intelligence had a 91% revenue increase, helped by its acquisition of IHS Markit, while its commodity insights business, formerly Platt's, saw revenue spike 74% year over year. Further, the indexes saw a 22% jump in revenue from the same period a year ago. 

Great long-term performance

Today's bear market shows exactly why these companies both have great business models that are built to perform well in all types of markets. And the past results speak for themselves, with S&P posting an average annualized return of a bit more than 18% over the past 10 years, while Moody's has an average annual return of a hair under 18%.

These stocks both have forward price-to-earnings ratios of about 22, which is reasonable given their consistent growth histories.

When you take it all into consideration, a $10,000 investment in these two growth stocks is a pretty rock-solid play.