"The greatest trick the devil ever pulled was convincing the world he didn't exist."
Verbal Kint, The Usual Suspects

Though bankers may not have the bloodlust of Keyser Soze, we could probably adapt this quote to say something like, "The greatest trick the bankers ever pulled was convincing the world that risk didn't exist."

If we can find a major breakdown in free market functioning of the financial world anywhere, we can clearly find it in the handling of structured products over the past few years. Bankers sliced, diced, chopped, and rechopped all sorts of debt products and somehow turned masses of rubbish debt into securities that rating agencies like Moody's (NYSE:MCO) and McGraw-Hill's (NYSE:MHP) Standard & Poor's saw fit to rate AAA.

Ninja-like stealth
Though the inner workings of structured products can fill entire books, the basic idea is that banks are looking for ways to sell off pools of debt, while also creating less risky and riskier securities that are appropriate for different types of investors. They do this by taking a massive pool of loans and then selling off securities that are paid based on the payments on those loans. Some securities are first in line to be paid -- making them less risky on the whole -- while others hold much more risk by sitting at the end of the payout line.

Banks got even craftier in this process by going one step further and chopping up pools of already structured products using the same process. The idea was that this even further distributed and blunted the risk.

Banks like JPMorgan Chase (NYSE:JPM), Goldman Sachs (NYSE:GS), and, of course, Bear Stearns and Lehman Brothers, were able to secure lofty ratings for products that shouldn't have even sniffed "investment grade" by producing hard drives full of complex financial models. Oh yeah, and it helped that the banks were signing the paychecks for the rating agencies.

Cascading calamity
Armed with AAA ratings, banks were able to sell off these structured products to pension funds and insurance companies like MetLife (NYSE:MET) for higher prices than they'd otherwise be able to.

Since banks could get such high prices for this structured debt, they could be more liberal about whom they gave loans to and how they priced those loans. This, in turn, brought down borrowing costs for borrowers ranging from Joe Schmoe running up the Visa (NYSE:V) card for his small business to budding real estate moguls snatching up homes from builders like KB Home (NYSE:KBH).

While the financial industry crowed about how its products were doing great things by lowering borrowing costs, what it was actually doing was leading the charge in a massive countrywide -- if not worldwide -- mispricing of risk.

Annihilation isn't the solution
Structured products do have their place. There is some value to being able to pool loans and break off the risk into pieces so that institutional investors that might not otherwise have an appetite for, say, credit card loans, can dip their toes in that market. The issue, though, is making sure that a security with a AAA rating doesn't smell like month-old cabbage.

So how do we get back to accurately pricing risk? By attacking the problem from multiple angles.

1) The rating agencies
The most glaring change that needs to be made comes from the rating agencies. You'd have thought that institutional investors would have been crying bloody murder that the rating agencies were being paid by the same people producing the products they were rating. But they didn't; they played right along.

A good start would be to have someone other than the banks paying the rating agencies for their services. Having the investors foot the bill is a solid idea, but there's also probably an argument to be made for a government-controlled rating agency.

2) The investors
The investors who are buying these securities also need to step up and start doing more of their own research. If a security is so complex that the only option is to blindly trust a stamp of approval from an outside agency, then maybe it isn't something that Detroit's Police and Fire Retirement System should be buying.

3) The banks
And finally, it seems only fair that we get those tricky banks in on the changes. If banks were forced to hang onto a piece of the loan concoctions that they're selling off, it would probably go a long way toward upping the quality of what they're hawking. After all, do you think they want structured bags of poo stinking up their balance sheets?

Sick of the financial world? Why not leave it behind and check out Todd Wenning's five stocks for growth and income? (I promise none of them are financials.)

Moody's is a Motley Fool Stock Advisor selection and a Motley Fool Inside Value pick. Motley Fool Options has recommended selling puts on Moody's. Try any of our Foolish newsletters today, free for 30 days

Fool contributor Matt Koppenheffer does not own shares of any of the companies mentioned. You can check out what Matt is keeping an eye on by visiting his CAPS portfolio, or you can follow Matt on Twitter @KoppTheFool. The Fool's disclosure policy knows that the songs of its youth will someday be used as jingles to sell denture paste.