Over the past couple of weeks, the implosion of a couple of internal hedge funds at Bear Stearns (NYSE:BSC) has sent small ripples through a somewhat complacent market. The hedge funds' problems were largely thanks to a big and highly leveraged bet on collateralized debt obligations (CDOs) that went bad, causing the funds' creditors -- like Merrill (NYSE:MER), Citigroup (NYSE:C) and JPMorgan (NYSE:JPM) -- to demand their collateral back to protect their loans. This has led many observers to ask one simple question:

So what the heck is a CDO, anyways?

Glad you asked. Let's start with the basics of securitization, which is probably one of the most important developments in the financial world. Securitization, as you might have guessed, happens when you take a pool of assets that earn interest, like car loans, mortgages, or credit card debt, and package it into securities.

For example, Wall Street might take $800 million worth of credit card debt from 80,000 different people and package that into credit card asset backed securities (ABS). Whoever invests in this ABS gets paid dividends from the credit card borrowers as they pay their interest and principal. Wall Street gets a fee for overseeing this whole process, and the investor gets a yield-earning asset. Nice! For the most part, the credit card borrowers have no idea of what's going on, as long as they keep making their payments.

Why securitization?
Standardization is one of the main advantages of securitization. It'd be too much of a hassle to go to the supermarket and buy individual eggs. Instead, farmers package them into cartons of 12. Similarly, investors who seek a nice yield don't want to go out and make individual auto loans to Bob, Billy, and Nancy. It's much more convenient to buy a slice of a prepackaged pool of loans.

Diversification is another important advantage of securitization. By taking a huge pool of credit card debt and securitizing it, the ABS investors aren't exposed to a single credit risk, but thousands or hundreds of individual credit risks. This is much different than investing in, let's say, Home Depot bonds, where a very deep and prolonged housing downturn might expose a concentration of credit risk.

Flexibility is also key to the securitization process. Securitizers can do a lot of different things with these pools of loans to meet investors' preferences. By customizing the securitization according to customer demand, they ensure customers can get what they want -- and thus will be willing to pay more for it, which lowers funding cost and helps with asset and liability matching.

Examples
Suppose for some reason I have $1 billion worth of junk bonds. A lot of institutional investors -- like banks, insurance companies, and pension funds -- aren't allowed (or don't have the appetite) to invest in non-investment grade bonds because they are deemed too risky.

However, these institutional investors control the big money, and not being able to sell to them is a like not being able to sell alcohol to people between the ages of 21 and 31. It sharply reduces the pool of possible customers.

However, if I repackage these junk bonds into different classes, where I sell, let's say, $800 million worth of securities (thus repackaging them into a CDO), but I pledge all $1 billion, then those securities are now overcollateralized (their collateral value of $1 billion is $200 million more than the $800 million of the CDO securities sold). Because of the $200 million cushion, that $800 million in CDO securities is very safe and can earn an AAA rating from Moody's or S&P, and this lets me sell them to institutional investors.

As you can see, securitization greatly expands the market for assets that, on an individual basis, are very difficult to sell. An individual auto loan or mortgage is very illiquid; once securitized, it becomes much more marketable.

Securitization risks
There was a time when, if you originated an auto loan, you basically just kept the loan and hoped the borrower paid you on time. Nowadays, loan originators can originate loans and sell them to Wall Street securitizers for a gain on sale or securitize the loans themselves. That also means the originator often isn't the ultimate bearer of the credit risk.

If the originator knows he can get rid of the loan, this might be an incentive to push for higher volumes at less disciplined underwriting standards -- a practice that greatly contributed to the subprime meltdown.

However, securitization also allows financial companies to earn much higher returns. For example, companies like Capital One (NYSE:COF) and Countrywide (NYSE:CFC) can take a bunch of their loans and securitize them.

Capital One takes a big pool of credit card debt, securitizes them into credit card ABS, and sells them to other people, like banks, pension funds, hedge funds, and insurance companies. The ABS investor gets the right to the yield, and Capital One often retains the rights to the excess cash flow (or any cash flow left over after the ABS investors are paid). The same process holds for mortgage loans in Countrywide's case.

The key here is that Capital One only retains a tiny portion of the ABS, so its credit risk is basically gone. This frees up its equity so it can go out and make more credit card loans and then securitize them again. Each time Capital One securitizes loans, it gets the rights to more residual cash flow.

Wal-Mart wants to sell its inventory as quickly as possible, because it earns a small margin on each item sold, and the more times inventory is turned over (sold), the more profit Wal-Mart makes. Similarly, financial service firms like Countrywide also want to sell their inventory of loans several times -- via the process of securitization -- to improve their returns.

Securitization is complicated, but understanding the mechanics will help you evaluate many financial companies.

Related Foolishness:

Fool contributor Emil Lee is an analyst and a disciple of value investing. He doesn't own shares in any of the companies mentioned above. Emil appreciates your comments, concerns, and complaints. Home Depot and Wal-Mart are Motley Fool Inside Value picks, and JPMorgan Chase is a Motley Fool Income Investor recommendation. Try any one of our investing services free for 30 days. The Motley Fool has a disclosure policy.