NEW YORK (

TheStreet

) --

Moody's Corp.

(MCO) - Get Report

and

McGraw-Hill's

(MHP)

Standard & Poor's have been attacked from all sides since the collapse of

Lehman Brothers

a year ago, but it appears the credit ratings agencies are still a long way from losing their central role in global finance.

The shares of both companies have taken a beating in recent weeks following a court decision that could expose them to liability for the first time, but, as of Monday, they were still outpacing the S&P 500 for the year . The 20%-plus returns are roughly on pace with

Bank of America

(BAC) - Get Report

and well ahead of

Citigroup

(C) - Get Report

, two other institutions that have been central to the crisis but are widely seen as long-term survivors.

The solid performance of the stocks reflects the view that, despite a loss in revenue and the threats from regulators and lawsuits, Moody's and S&P continue to enjoy an oligopoly in the credit ratings business along with

Fitch Ratings

.

The revenue drop and the legal and regulatory threats are linked to the part that the credit ratings agencies played in the boom and bust in structured finance, where banks including

Goldman Sachs

(GS) - Get Report

,

Morgan Stanley

(MS) - Get Report

and

JPMorgan Chase

(JPM) - Get Report

pooled ever-more-dubious home loans into bonds that were sold to investors. Many view the agencies as complicit in the wild popularity of these investment vehicles because they assigned triple-A ratings to many of the securities, dramatically understating their risk.

Now the ratings agencies are on the run. Hedge fund manager David Einhorn, of Greenlight Capital, has been shorting Moody's for more than a year, and began shorting McGraw Hill earlier this month after Federal District Court Judge Shira Scheindlin threw out the companies' claims that they were protected from lawsuits related to their ratings by the free-speech provisions of the First Amendment. Einhorn recently told

CNBC

that Moody's shares were "a lot higher," when he began shorting the company.

Einhorn famously shorted Lehman Brothers, a position he announced in May 2008, while the shares were trading in the high thirties. Lehman filed for bankruptcy protection less than four months later.

An even more iconic investor and longtime Moody's shareholder,

Berkshire Hathaway

Chairman Warren Buffett, now appears to be on the defensive. Buffett sold a large stake in Moody's in July, selling off another chunk of Moody's shares just ahead of Judge Scheindlin's ruling.

Despite these setbacks, and the threat of legislation to reform the credit ratings industry, it's difficult to see how the three largest agencies will lose their influential standing. So entrenched are they that, even after the crisis, the U.S. Treasury and the

European Central Bank

continue to rely on them to determine what collateral they will accept from the financial institutions they regulate. Not to mention that ratings of all kinds, not just on financial products, but on doctors, movies, students and countless other things are increasingly central to our culture, with its emphasis on speed and efficiency.

But if ratings aren't going anywhere -- and it doesn't appear they are -- let's hope the lessons learned from the financial crisis will lead to better analysis and heightened accountability.

--

Written by Dan Freed in New York

.