Everything is best in moderation.

However, some investors forget this wise advice when investing in the markets. It's great to have plenty of cash to invest as much as you want, but allocating too much money in the wrong places can devastate your portfolio. I'm referring to the misguided, all-too-common use of leverage to increase your returns.

The good, the bad ...
Leverage holds a tempting appeal for investors. Let's say you have $100,000 to invest, and your broker or banker floats you another $100,000 on margin. You can now invest $200,000, since you're levered 2-to-1.

The market has a good year, and so do you, earning 25% on $200,000 -- $50,000 in profit. You pay back the $100,000 (we'll ignore interest costs here), and you're left with $150,000. Presto! Leverage has given you a 50% annual return.

Unfortunately, the above wonderful scenario rarely plays out so cleanly; more commonly, the results are expensive at best or an absolute disaster at worst. If your portfolio experiences significant paper losses while you're levered, you might have to pony up additional capital you don't actually have. For example, if your $200,000 levered portfolio is sitting on a paper loss of 30% and is now worth $140,000, your bank or lender might require you to deposit additional cash.

Even worse, your lender may demand that you sell existing positions to bring up your cash balance to the required amount. That's the double whammy of using leverage -- the margin calls for more cash arrive only when your portfolio is down, requiring you to buy low and sell even lower. This forced timing of sell decisions destroys any hopes of long-term market-beating gains and usually leads to major losses, if not a complete wipeout. But the fun doesn't end there.

... and the ugly
So far, we've only been assuming a 2-to-1 leverage ratio. Higher levels of leverage put you at the edge of a cliff, with no control over your footing. That's exactly what caused the hedge fund Long-Term Capital Management to blow up years ago.

The fund was levered more than 20 to 1 at the time it collapsed. Worse, Long-Term's arbitrage trades were actually correct, but the fund didn't have the luxury of time when lenders began to demand that it pay up. Over the past months, highly successful hedge funds have had to shut down, battered by nosebleed losses created by the toxic combination of excessive leverage and rapidly declining markets.

Last week, Carlyle Capital, an investment fund linked to the high-profile Carlyle Investment Group, faced serious heat after numerous margin calls required the fund to pony up additional capital. Shares in the fund, trading in Amsterdam, fell 58% in a single day last week. The fund had about $22 billion invested in mortgage debt issued by Freddie Mac (NYSE: FRE) and Fannie Mae (NYSE: FNM). By some measures, the fund was levered 32 times the amount of its equity.

In other words, for every $100,000 of its own capital, the fund was borrowing $3.2 million! The slightest decline in value, coupled with a margin call from the lenders, required Carlyle to add substantial capital, often leading to dire results for its investors.

We're not done yet
And who might be lending the money to these firms to allow such astronomical leverage levels? In Carlyle's case, it's our good friends at Merrill Lynch (NYSE: MER), Citigroup (NYSE: C), Credit Suisse (NYSE: CS), Lehman Brothers (NYSE: LEH) ... you get the picture. As financial institutions scour the globe for sources of liquidity, beset by their own fiscal troubles, they can't afford to extend margin calls for investment funds.

Too much greed can kill you
We may all agree with Gordon Gekko's motto, "Greed is good," but too much greed can kill your entire investment operation. Once you borrow funds, you no longer have complete control over investment decisions. As for the lenders, they only care about getting their money back -- as they should.

In some cases, leverage can be helpful, but for most investors today, it's a bad idea. There are other ways to employ the advantages of leverage without risking margin calls. Still, you have to be completely aware of what you're doing.

Over time, you don't need leverage to do well and make money in the market. Just be patient, and don't overindulge.

You can never have too much Foolishness: