Stocks edged up on Thursday, adding to Wall Street's biggest single-day rally in a year on Wednesday after a deal in Washington to avert the "fiscal cliff."

Investors were more wary than in the previous sessions as they turned their focus to upcoming battles in Congress, including likely bitter fights over spending cuts and raising the federal debt ceiling.

"I would be cautious of big moves going forward. There are still some clouds over the horizon, with the fiscal issue of the government. We don't know how they're going to pan out, but in all likelihood there's not going to be a calamity," said Jeff Meyerson, head of trading at Sunrise Securities in New York.

Wednesday's rally began 2013 with Wall Street's best performance in over a year after the House of Representatives passed a measure to avert the fiscal cliff, which could have caused a recession.

The S&P Energy index rose the most of the major sector indexes, at 0.52 percent, led in part by CONSOL Energy , which said it expects to sell more non-core assets in 2013. CONSOL was up 3.5 percent to $32.09.

The Dow Jones industrial average gained 6.30 points, or 0.05 percent, at 13,418.85. The Standard & Poor's 500 Index rose 2.05 points, or 0.14 percent, at 1,464.47. The Nasdaq Composite Index was up 5.12 points, or 0.16 percent, at 3,117.39.

Retailers were mixed on Thursday after releasing December sales reports in an uncertain economy.

Shares in U.S. retailer Costco Wholesale Corp rose 1.4 percent to $102.88 after the company reported a better-than-expected 9 percent rise in December sales at stores open at least a year, primarily boosted by an additional sales day in the reporting period.

Gap Inc stock rose nearly 2 percent to $31.99 following news that the retailer will buy women's fashion boutique Intermix Inc for $130 million to enter the luxury clothes market, the Wall Street Journal reported.

Family Dollar Stores Inc stock dropped 11.7 percent to $56.52 on the company's report of lower-than-expected quarterly profit as its emphasis on selling more everyday items like cigarettes and soft drinks put pressure on margins.

Hiring data did not boost equity prices despite showing U.S. private employers added more jobs than expected in December.

"The report now sets the stage, as we expect a strong non-farm payroll reading on Friday," said Andrew Wilkinson, chief economic strategist at Miller Tabak & Co in New York

The government's broader monthly payrolls report, due on Friday, is expected to show the economy created 150,000 jobs compared with 146,000 in November, according to a Reuters poll. The U.S. unemployment rate is seen holding steady at 7.7 percent.

Another report on Thursday showed that the number of Americans filing new claims for unemployment benefits rose last week, but year-end holidays likely distorted the picture of labor market conditions.

(Additional reporting by Angela Moon, Editing by Bernadette Baum and Kenneth Barry)