It's official: For stock investors, there's nowhere to hide.

As of the end of August, every sector in the S&P 500 was down for the year. Energy and materials stocks like ConocoPhillips (NYSE:COP) and U.S. Steel (NYSE:X), which had performed strongly for most of the year, plunged in July and August. Their drop made the consumer staples sector, which includes companies like Procter & Gamble (NYSE:PG) and Anheuser-Busch (NYSE:BUD), the best-performing sector so far this year -- with "only" a 3.2% loss.

Meanwhile, those investors who stayed close to home should count themselves lucky. Worldwide, markets have fallen an average of 23% in 2008 -- much worse than U.S. markets have suffered.

Even gold and silver, in their traditional role as a safe haven during serious crises, have lost ground since January. You've pretty much had to stay in bonds and cash -- and accept the slow erosion of their portfolio's purchasing power due to inflation and low yields -- in order to avoid losses.

The limits of diversification
Historically, owning a diversified stock portfolio has often helped to cushion the effects of market downturns. When weakness in the overall economy results largely from one sector, other industries are often able to take up the slack and pull the stock market forward. During the 2000-02 bear market, for instance, many companies outside the technology sector, including driller Baker Hughes (NYSE:BHI) and defense contractor General Dynamics (NYSE:GD), posted strong gains.

The problems that cause substantial market declines aren't always isolated to a particular sector, however. Although initial problems appeared in the relatively minor subprime mortgage market, the resulting backlash has spread through the global financial system, causing credit to seize up and forcing many companies to change their business models completely in order to adapt to increasingly unavailable capital.

When all-encompassing economic problems face the entire business world, you can't expect to diversify away that risk. You can only hope to minimize its effects.

Show me the money
With credit tight, cash is king. Lots of companies are struggling to raise capital at any cost, willingly diluting the interests of their existing shareholders in a basic effort to survive. Dividend cuts and other cash-preserving steps have become commonplace.

In such a bear market, companies with large cash hoards like Apple (NASDAQ:AAPL), which don't have to rely on dysfunctional capital markets, have more flexibility than those with big debt loads. There's a good argument that those companies currently swimming in money should loosen the purse strings and give some of that cash back to shareholders. But now, as many ailing businesses sport bargain-basement prices, consolidation becomes more attractive. Holding onto their cash gives companies the opportunity to consider long-term strategic moves such as buyouts. The payoff on those investments could dwarf the value of a higher dividend to investors.

Alternatively, even if a company carries some debt, that doesn't necessarily spell disaster. If a business generates enough free cash flow to support long-term debt and meet its other liquidity needs, it can also endure a temporary loss of access to credit markets. But while cash flow may be sufficient to support interest payments, companies may still face problems when their debt comes due -- if they can't get new financing.

A stock-picker's market
When markets face challenging times, as they are now, being able to distinguish good companies from bad ones becomes much more important. If you have the discipline to endure short-term losses from a passive investment strategy using index funds, you can simply put your head down and wait for the bear market to lumber back into its cave.

But especially during down markets, superior stock-picking skills are rewarded. Even when every sector of the economy is facing a common threat, identifying the companies best-positioned to meet that threat and prosper will help you make the most of your investment opportunities.

Apple is a Motley Fool Stock Advisor recommendation. Learn how to pick great stocks from Fool co-founders Tom and David Gardner by checking out their premier stock service free for 30 days.

Fool contributor Dan Caplinger has seen his stocks fall quite a bit. He doesn't own shares of the stocks mentioned in this article. The Fool's disclosure policy is always above average.