It is a little contradicting in its reasoning, but the worse things are, the higher the odds of more quantitative easing from the Fed, which means the markets will rally.
When Bernanke gave his testimony yesterday, the initial market reaction was to sell off, but almost as fast, everything rebounded as the more aggressive traders took the weakness as an opportunity to buy shares and force a rally on QE hopes.
More on this in the daily stock market discussion thread for the week of July 16th.