Stocks rose on Thursday as investors held out hope the economic deterioration was receding, boosting the consumer, technology and home builder sectors.

Although an unexpected rise in initial jobless claims still pointed to uncertainty in the labor market, investors took solace from the final reading of first-quarter gross domestic product, which contracted less than thought.

For now the hope is that we are still likely to be coming out of the recession sometime in the third quarter, said Steve Goldman, market strategist at Weeden & Co in Greenwich, Connecticut. Stocks tend to react months before that, and even when the growth starts, usually stocks support pretty decent gains three months after the recession ends.

The Dow Jones industrial average <.DJI> rose 67.18 points, or 0.81 percent, to 8,367.04. The Standard & Poor's 500 Index <.SPX> gained 8.80 points, or 0.98 percent, to 909.74. The Nasdaq Composite Index <.IXIC> added 22.50 points, or 1.26 percent, to 1,814.19.

Standouts included Bed Bath & Beyond Inc , which reported a surprise rise in quarterly profit as it cut costs to offset slumping demand. The retailer's shares jumped 10 percent to $31.18.

Shares of homebuilders rose after Lennar Corp posted a wider quarterly loss but saw an increase in new home sales and orders. Lennar was up 12.15 percent to $8.79, while the Dow index of homebuilders <.DJUSHB> gained 3.4 percent.

(Reporting by Leah Schnurr and Ellis Mnyandu)