Stocks edged higher on Thursday after weekly jobless claims fell in the latest week, but gains were limited as investors were reluctant to make big bets ahead of Friday's payrolls report and a recent rally.

Coming off a surge of nearly 1 percent in the previous session that built on advances of more than 4 percent in January, some traders said the market might be nearing a top.

In the latest data on employment sector, new claims for unemployment benefits dropped more than expected to a seasonally adjusted 367,000 versus the forecast of 375,000.

Economists forecast that the government report on Friday will show that 150,000 jobs were added in January, a decline from the previous month, which benefited from holiday hiring.

The jobless claims continue the trend of decent news, though there have also been other indications of a general loss of momentum, said Bruce McCain, chief investment strategist at Key Private Bank in Cleveland. That suggests we're in the right ballpark with estimates for the jobs report, but also that we aren't likely to see a huge upside surprise.

The Dow Jones industrial average <.DJI> was up 3.18 points, or 0.03 percent, at 12,719.64. The Standard & Poor's 500 Index <.SPX> was up 2.84 points, or 0.21 percent, at 1,326.93. The Nasdaq Composite Index <.IXIC> was up 14.14 points, or 0.50 percent, at 2,862.41.

The third warmest January in 50 years hurt same-store sales at department stores and apparel retailers. But discounters such as Target and Costco as well as high-end stores beat expectations.

Target Corp rose 1.1 percent to $51.98 while Abercrombie & Fitch Co slumped 12.3 percent to $41.08, and Costco Wholesale Corp was up 2.2 percent to $85.05.

The S&P Retail index <.RLX> added 0.3 percent.

The level of retail spending indicates consumers are becoming more cautious when it comes to spending money, McCain said. There could be a pause in that source of economic improvement.

Drugmaker Merck & Co Inc fell 1.4 percent to $38.08 after fourth-quarter sales missed expectations and it forecast flat full-year results.

Dow Chemical Co posted weaker-than-expected profit and revenue, sending shares down 1.2 percent to $33.54.

Green Mountain Coffee Roasters Inc surged 16 percent to $62.23 a day after its first-quarter earnings far exceeded expectations.

U.S. Federal Reserve Chairman Ben Bernanke faced tough questioning by members of the House Budget Committee after his testimony on the state of the economy.

Facebook could raise as much as $10 billion in the biggest-ever Internet initial public offering, according to a filing Wednesday. In 2011, Facebook said net income rose 65 percent to $1 billion on revenue of $3.71 billion.

(Reporting by Ryan Vlastelica; Editing by Jeffrey Benkoe)