Moody's (MCO -0.25%) was one of the best-performing stocks in 2019, returning almost 70% for the year. Moody's, a leading provider of credit ratings, research, and risk analysis, has been a juggernaut for the past decade, with a total return of over 800% since February 2010, when the stock traded at about $26 per share. Now it's trading at around $270 per share.

This year, the stock has picked up where it left off, returning almost 15% already as of Feb. 13. On Wednesday, Feb. 5, the company released its fourth-quarter earnings and showed continued momentum. Let's take a look at where Moody's is right now and if it's still a buy.

The words credit rating spelled out in wooden tiles

Moody's is one of the big three credit rating agencies. Image source: Getty Images.

Strong fourth quarter

As a credit rating agency (CRA), Moody's rates bonds and an entity's ability to make payments on its debt. It also has an analytics arm, Moody's Analytics, which provides economic research and analysis. Moody's is one of only three major credit rating agencies, along with S&P Global and Fitch. The three control about 95% of the global credit ratings market share. Moody's and S&P are the two largest, with about 80% of market share, while Fitch has about 15%.

Moody's has long been the leader in this market, building a wide moat protecting its competitive position. It's not a space that is susceptible to competition due to the simple fact that if there many different rating agencies, it would water down the standard and lead to investors shopping around for a favorable rating. Plus, CRAs are heavily regulated, which is another barrier to entry.

In the fourth quarter, Moody's beat earnings estimates with adjusted earnings per share of $2.00, well ahead of $1.92 consensus estimates.

Revenue was up 16% compared to the prior-year quarter, and 9% for the year. Moody's Investors Service -- the credit rating arm, which generates almost 60% of revenue -- saw revenue jump 21% in the quarter and 6% for the full year. Debt issuance -- bonds issued by commercial or government entities -- was up 18% in the quarter, which is good for Moody's because it makes money by rating debt issuance.

Furthermore, revenue was up 10% for the quarter and 13% for the full year at Moody's Analytics. Overall, adjusted net income was up 20% for the fourth quarter and 10% for the full year, while operating margin was up 540 basis points -- that is, 5.4 percentage points -- to 40.9% in the quarter.

"Moody's revenue growth for full year 2019 was the result of strong contributions from both Moody's Analytics and Moody's Investors Service. Robust performance at Moody's Analytics was driven by increasing customer demand for core research and data products, along with compliance and know-your-customer solutions. Additionally, Moody's Investors Service benefited from increased global bond issuance amid generally favorable market conditions," Raymond McDaniel, president and CEO, said in the earnings release.

Good buy

Moody's guidance for 2020 called for mid-single-digit increases in revenue and expenses. The operating margin is projected to increase to 44%, up from 41% at the end of 2019. Adjusted earnings per share is also expected to rise about 10% to the $9.10 to $9.30 range.

There's no reason to doubt that Moody's will be a good investment going forward. Debt issuance is expected to increase again in 2020 -- though not at the same rate as last year -- due to expected low interest rates, which is good for Moody's . Moody's also gets 40% of its revenue from its analytics side, so it is well diversified if issuance were to slow.

In January, Moody's acquired Regulatory DataCorp (RDC) -- a company that provides data to help companies stay in compliance with anti-money laundering (AML) and know-your-customer (KYC) regulations. RDC complements Moody's Bureau van Dijk (BvD) division, which provides compliance solutions. "The addition of RDC's proprietary data and technology to BvD's comprehensive company information offerings provides an industry-leading platform that will help customers make better informed decisions as they manage AML and KYC risks and requirements," Dan Russell, executive director of Bureau van Dijk, said in the Jan. 23 announcement.

Moody's price-to-earnings ratio is pretty high due to the company's strong growth last year. But it's still a great long-term buy, as market conditions remain good, it has a diversified revenue stream, and it is in no danger of losing its competitive advantage any time soon.