Stocks edged higher on Thursday as investors bought beaten-down technology and commodity shares, while a positive broker comment on Goldman Sachs boosted the financial sector.

Trading was choppy in light volumes for most of the day as investors remained cautious ahead of more corporate earnings reports in the coming weeks. Alcoa Inc set a positive tone when it kicked off the earnings season with a smaller-than-expected loss after the bell on Wednesday.

The Dow industrials closed just above break-even as shares of healthcare and consumer staples companies weighed. Merck & Co Inc fell 3.7 percent to $27.01 on speculation its Zetia cholesterol drug fared poorly in a clinical trial comparing it to a drug from Abbott Laboratories . Merck was the biggest weight on the Dow.

Sentiment remained cautious ahead of the release of more U.S. corporate earnings, said Kurt Brunner, portfolio manager at Swarthmore Group in Philadelphia.

Investors are still in more of a wait-and-see mode, he said. I still think we're in this grinding phase, this choppiness, because I don't know that we're going to get a whole lot out of earnings.

The Dow Jones industrial average <.DJI> gained 4.76 points, or 0.06 percent, to 8,183.17. The Standard & Poor's 500 Index <.SPX> added 3.12 points, or 0.35 percent, to 882.68. The Nasdaq Composite Index <.IXIC> rose 5.38 points, or 0.31 percent, to 1,752.55.

A treasury bond auction of 30-year debt showed signs of strength, providing some cheer for investors concerned about the growing mountain of U.S. government debt. Shares rose to session highs not long after the auction.

A lot of people went short in anticipation of a poor auction and then had to cover when the auction actually went better than everyone thought, said Jack Ablin, chief investment officer at Harris Bank in Chicago. He referred to the strategy of short-selling, which involves selling borrowed shares in the hopes of buying them back when prices fall.

Goldman rose 3.4 percent to $143.21 after Banc of America Securities-Merrill Lynch upgraded its rating to buy and raised its earnings estimates, saying the firm's earnings power and book value were increasing rapidly again. The S&P financial sector <.GSPF> led the S&P 500 with a gain of 1.4 percent.

Energy shares rose, with the S&P energy index <.GSPE> up 1.1 percent as crude oil futures edged up. Oil giant Chevron Corp , which is expected to report interim quarterly results later Thursday, was up 0.5 percent to $63.08.

Within the tech sector, KLA Tencor Corp shot up 4.9 percent to $26.36 after Barclays upgraded the chipmaker to overweight. The PHLX semiconductor index <.SOXX> gained 2.8 percent.

The number of U.S. workers filing new claims for jobless benefits fell to the lowest level since January, but the seasonally adjusted data was distorted by an unusual pattern of layoffs in the automotive industry.

Trading was light on the New York Stock Exchange, with about 1 billion shares changing hands, below last year's estimated daily average of 1.49 billion, while on Nasdaq, about 1.89 billion shares traded, below last year's daily average of 2.28 billion.

Advancing stocks outnumbered declining ones on the NYSE by 1,812 to 1,178 while advancers beat decliners on the Nasdaq by just 1,304 to 1,301.

(Editing by Leslie Adler)