While all three indexes have recovered strongly from their lows of March, the broad S.& P. 500 is still far below where it was a year ago, when it was flying high near 1,300.

Image Trading was heavy at the New York Stock Exchange Thursday as stocks rose. Credit... Spencer Platt/Getty Images

Where stocks go from here will, of course, depend on the course of the economy. Some economists caution that the incipient economic recovery could falter, resulting in a double-dip recession that would snuff out the recent stock market rally.

But for now, the optimists say that poking holes in recent earnings statements misses the point. Investors, as ever, are looking ahead, and they are bullish on the prospects of many companies.

“The excitement is where we might be 12 months from now,” said David Kovacs, the chief investment officer at Turner Investment Partners. “It does require some leap of faith, but I find this rally extremely justifiable.”

Others point out that the improvement in the financial markets will help companies recover.

Many companies, including AT&T and Xerox, have managed to sell new shares to primp their balance sheets and raise cash. Others have sold bonds as the credit markets have thawed. Ford and others have refinanced their credit lines  a feat that would have been difficult, if not impossible, to pull off only months ago. And big banks, though suffering from bad loans, have at least stabilized.

Stephen Stanley, the chief economist at RBS Greenwich Capital, said that during this recession companies have cut back far more quickly and efficiently than they did in the past.

“Firms are now much more nimble in terms of their payroll,” he said.

But given the deep cuts, Mr. Stanley said the worry is that even though the economy might recover, employment could lag.