When a company is failing, usually it's a slow and painful process. Products don't live up to expectations, finances begin to falter, and management usually asks why the market doesn't seem to like them. These steps lead to falling stock price and sometimes (gasp!) bankruptcy for these companies.

After a year and a half of predicting some of these failures, and getting my fair share right, I've identified a few commonalities failing companies have.

Unrealistic expectations
Every company thinks its products are the best thing since sliced bread, especially companies new to the market. Projections from inside the company are wildly inflated, projections from analysts see no end to the possibilities, and for a while investors buy into the hype. But eventually a weak product is exposed, and while expectations don't send a company to bankruptcy court, it's the first step in a long process.

Last year, I predicted that Energy Conversion Devices and Evergreen Solar were on their last legs because falling sales in a tough solar market showed that their products were inferior to the competition. The response from readers about my Energy Conversion Devices pick was less than enthusiastic. Fool community member StarlightPower said, "I can tell you factually that the Uni-Solar PVL solar laminates are the best performing PV modules in the world." And that was one of the nicer pieces of feedback I got. But eventually a low-efficiency, high-cost product was exposed when Energy Conversion Devices followed Evergreen's lead by filing for bankruptcy.

Hyperdynamics (NYSE: HDY) has had bulls and bears in a fervor for a long time over its potential, but after running into a dry well, the company is running low on cash. As a result, the hype around Hyperdynamics' potential is leaking air along with its stock price. That doesn't mean bankruptcy is imminent, but at the very least, investors will probably continue to be diluted before the company strikes black gold.

New products can come with especially high expectations and long falls from the hype if sales fall short. That doesn't bode well for some companies today. Fisker can't seem to get its first product off to a strong start, dragging battery maker A123 Systems (Nasdaq: AONE) down with it. The two companies planned on massive demand, and when sales have fallen short, their finances have suffered.

Pacific Biosciences of California (Nasdaq: PACB) came to the market with extremely high expectations in mapping genomes, but that hasn't translated to enough sales for investors, and the stock has plunged. Even older companies can run into this problem. Remember when BlackBerrys were known as Crackberrys? Research In Motion's (Nasdaq: RIMM) latest attempts to overtake the iPhone are failing to inspire customers, and the company is in serious trouble, even with intellectual property worth enough to keep it out of insolvency.

No matter how it manifests, unrealistic expectations are the first warning sign investors should look for.

Restructuring solves everything
When sales are falling and losses are piling up, the first thing management does is reorganize the business. Of course, the hope is that this will solve all of its problems because there's a new "focus on the customer" or "elimination of waste."

Evergreen Solar, one of the solar industry's first casualties, attempted to restructure its business around manufacturing in China. The theory went that a superior manufacturing method -- another overhyped technology -- combined with lower labor costs would save the company. The company's Devens facility in Massachusetts was closed. That move didn't end well.

Rose-colored glasses
The key for any manager careening toward bankruptcy is to stay fervently optimistic about the future, no matter how bad things look. In March of last year, Evergreen Solar's management said that after moving to China, "we are now better positioned to facilitate a rapid transition to a strategic supplier of low cost multi-crystalline silicon wafers." Six months later, the company filed for bankruptcy.

Despite missing debt payments, Energy Conversion Devices said it was "not currently experiencing significant liquidity constrains," and was instead "repositioning its solar business." Just over a month later, the company was in bankruptcy court.

MF Global and Lehman Brothers may be two of the worst cases of denial before bankruptcy. Lehman CEO Richard Fuld was defiant even after the company had filed bankruptcy. MF Global CEO Jon Corzine ended his final earnings conference call with investors on a defiant note, saying, "With a modicum of market normalcy, I believe we will deliver for our shareholders in the quarters ahead." Less than a week later, the company was in bankruptcy.

Bottom line: The debt market will tell you when it's over
The three steps above are common in most of the bankruptcies I've seen recently. But there's a canary in the coal mine you should keep an eye on. Equity investors should watch the bond market, because it's an indication that a company may be failing, even before stock investors realize it.

Bond investors demand higher yield for high-risk investments, and as companies move closer to failure, yields increase. If you've been watching the debt crisis in Europe, you know that yields in Greece have gone so high that the market has been predicting some sort of default or restructuring for some time.

The move isn't sudden. Bond yields increase over time. For example, Caesars Entertainment (Nasdaq: CZR), which I've called out recently as a high-risk investment, has 2018 bond yields of around 12.2%, while competitor Wynn Resorts has a 2020 yield of around 6.5%. This shows that debt investors are demanding a lot of extra yield from Caesars' bonds, indicating substantial fear of failure.

Not every failing company looks the same. But by staying aware of some common themes, you can hopefully avoid losing money on a company that eventually goes bankrupt.

For some low-risk stock picks, check out our report: "Secure Your Future With 11 Rock-Solid Dividend Stocks." The report is free when you click here.