Investor skittishness has recently touched all corners of the market, but there has been extra anxiety surrounding the stocks of companies involved in housing and mortgage loans. It should come as no surprise that Moody's (NYSE:MCO) would be swept into the market's downdraft. After all, this provider of credit ratings rode to higher profits on a wave of bond and collateralized debt obligation (CDO) underwriting, and much of that paper was backed by pools of mortgage loans.

And while Moody's stock has indeed suffered this year -- at a recent price of $54 per share, the stock is off almost 28% year to date -- the company's financial results prove that its underlying business is broad-based and resilient. For the second quarter, revenue increased to $646.1 million, a 26% increase over the previous year. Earnings per share reached $0.95, a 31% increase excluding a tax benefit that added approximately $0.19 to EPS.

As might be expected, Moody's structured finance group is showing weakness related to the downturn in residential mortgage loans. This group provides credit ratings for issuers of complex financial instruments, including various mortgage-backed securities. However, the group's strong revenue growth extended into the second quarter as the pace of debt issuance accelerated in anticipation of a shrinking market for these types of investments.

Revenues increased to $273 million in the second quarter from $216 million in the previous year, a 26% improvement. Management now warns, however, that the second half of the year will not be as bright for U.S. structured finance -- the anticipated slowdown in underwriting certain issues has definitely materialized. Consequently, residential mortgage ratings are expected to fall by a staggering 40% and credit derivatives ratings are forecast to drop by a hefty 20%.

Such a dramatic decline in business activity at Moody's most important unit is unnerving, even though lost revenue is expected to be somewhat offset by growth in ratings of asset-backed and commercial-mortgage-backed securities. Despite the uncertainty attached to structured finance, Moody's management is sticking with full-year forecasts of percentage revenue growth in the mid-teens and EPS growth in the low to mid-teens. That positive outlook reflects the continuing growth in Moody's international business, as well as strength in Moody's corporate finance ratings business.

Moody's also seems to be holding up well in the face of renewed criticism over its privileged strategic position. Moody's and its rival, Standard & Poor's, a unit of McGraw-Hill (NYSE:MHP), have developed expertise and reputations that bring them some 80% of the ratings business and a circle of recurring customers.

The existing regulatory framework also favors the industry's established players. Most notably, the SEC limits participation in the credit rating business to agencies that have been designated as Nationally Recognized Statistical Rating Organization (NRSRO). Congress last year made changes meant to widen the playing field, but a recent decision by the SEC effectively limited the potential impact of reform efforts. However, those efforts may get a second wind as the ratings agencies come under attack for failing to anticipate the riskiness of securities backed by subprime loans.

Moody's is also taking heat from the underwriters that provide the ratings assignments, particularly for commercial-mortgage-backed securities. Moody's reported that it has recently been passed over for a number of assignments, likely as a result of its demand that new issues contain certain credit enhancements in order to receive an investment-grade credit rating. For the time being, many underwriters have been able to shop around at rating agencies with less-strict standards.

In the long run, Moody's commitment to maintaining its reputation is a valuable investment in its future. In the short run, Moody's shareholders should rest easy in the knowledge that the company's diversified business lines continue to provide steady revenue and earnings growth, and the company is committed to using its considerable free cash flow to buy back shares. In the second quarter, Moody's spent $500 million to buy back 7.7 million shares -- an impressive program for a company with a market capitalization of just $14 billion.

Related Foolishness:

Moody's is a Motley Fool Stock Advisor recommendation and is up 177% since it was first recommended in 2002.

Fool contributor Michael Leibert welcomes your feedback. He does not have a position in the securities of any of the companies mentioned in this article. The Fool has a disclosure policy.