Sen. Bernie Sanders is lambasting credit rating agencies for, in his view, giving AAA ratings that were “bogus.” But for the rating, he claims investors would not have purchased subprime mortgage assets. And the reason for these “bogus” ratings? Wall Street greed.

His solution is unsurprisingly to take the “profit” out of ratings. But that would result in ratings far worse than anything we’ve seen.

I have been among those who have regularly called for reform of the rating agencies. I still do. But any reform, to be effective, must be based upon facts, not ideology.

The most important fact may be that the actual losses ultimately experienced on AAA-rated subprime mortgage-backed securities were quite small and well within the estimates of the rating agencies. Economist Sun Young Park estimates that experienced losses were less than 1% of total face value. Over 94% of AAA-rated subprime tranches experienced no losses at all.

While it was certainly not apparent at the time of the crisis, the overwhelming majority of subprime MBS performed as rated. Sen. Sander’s assertion that the rating agencies knew their ratings were “bogus” is simply inconsistent with the performance of the rated assets.

So if subprime MBS performed as rated, why then did we have a crisis? For a number of reasons, one of which is that the over-leveraged nature of banks forced them to sell securities, including subprime MBS, as an avenue to cover mark-to-market losses that would have otherwise threatened their insolvency.

When many banks tried to sell the same securities at once, in an almost fire-sale manner, prices fell, reflecting the massive imbalance between the supply for sale and the much lower demand.

Subsequent research has found that it was the most highly leveraged companies that sold MBS during the crisis, and that those with greater capital shortfalls sold at greater discounts. Observed prices were ultimately reflective of illiquidity and the capital needs of sellers, not the long-run value of subprime MBS.

One contributor to fire sales is that banking regulation, including an overreliance on ratings, encourages uniformity in bank balance sheets. If everyone is required to hold only AAA and searches for yield within AAA, then everyone ends up with similar balance sheets.

Unfortunately, when many are forced to sell, they end up selling similar assets, resulting in fire-sale prices. When banks sold MBS to increase their regulatory capital levels, they found fewer buyers among their industry, since other banks were subjected to the same regulatory constraints.

Sanders is not the first to call for new nonprofit or government-supervised rating agencies. Politicians in Europe have led the way. Unfortunately, European politicians want to control the ratings agencies to make them less accurate, not more.

The justified downgrades of governments such as Greece and Italy were not welcomed. Hard truths rarely are. But neither were the downgrades of U.S. debt welcomed by then-Treasury Secretary Timothy Geithner. Sanders’ scheme would result in ratings that were reflective of politics not economics.

Sanders is also wrong in suggesting that regulators or nonprofits would do a better job predicting default. After all, it was the international financial regulators, not the rating agencies, who decided that Greek debt was “risk-free.”

Europe was not alone in this regard. For instance, the rating agencies had downgraded Washington Mutual, while its primary regulator still gave it a favorable Camels (CELS) rating.

Where the rating agencies erred most was in their forecast of housing prices. They clearly didn’t see a bust coming. But neither did regulators or government forecasters. It is hard to imagine Sanders’ new rating agency will be the one blowing the whistle on an overheated housing market, especially when Washington is enjoying the party that comes with every bubble.

As someone who raised these issues during the bubble, I can say that almost no one in Washington was interested in hearing them.

One of the few things Washington got right before the Congress was an attempt to bring greater competition to the rating agencies, an effort led by Chairman Richard Shelby during my time as Senate Banking Committee staff.

We know companies protected from competition are slower to innovate. Such was the case with the rating agencies. We know the same is generally true of nonprofits. What will improve the performance of the rating agencies is reducing regulatory barriers to entry, not erecting some politicized, nonprofit monopoly.

I commend Sen. Sanders for bringing attention to aspects of our financial system that remain broken. This is a debate we need to have. But solutions must be grounded in the facts.

What drove failures at the rating agencies, to the extent they existed, were barriers to entry combined with a bank regulatory system that was overly reliant on ratings, encouraging herd behavior and fire sales. These are fixable problems. We should address them.