Stocks finished modestly higher on Wednesday, with the S&P 500 up for a fourth session, although volume was one of the year's lowest on the day ahead of the Thanksgiving holiday.
Investors welcomed news that a ceasefire was declared to end the flare-up in violence between Israel and the Palestinians, though the lack of a deal to release emergency aid for Greece limited the market's advance.
Investors also remained anxious about the mandatory tax increases and spending cuts that would go into effect in the new year if a deal is not reached to prevent it - known as the "fiscal cliff" - though policymakers are not expected to get back to negotiations until after Thursday's Thanksgiving holiday.
About 4.76 billion shares traded on the New York Stock Exchange, the Nasdaq and the NYSE MKT, compared with year-to-date daily average volume of 6.5 billion shares. On Thursday, the U.S. stock market will be closed for the Thanksgiving holiday, and on Friday, it will close early at 1 p.m. (1800 GMT).
"Usually on patriotic holidays, which I think Thanksgiving is one, we often see a rally on a light volume. So I wouldn't be surprised if we see that on Friday, if there is no major news," said J.J. Kinahan, chief derivatives strategist at TD Ameritrade in Chicago.
"So far this week, we have heard good news in terms of (the) fiscal cliff. Both sides seem to be playing nice, but we will start to see big day-to-day swings (in the market) from next week, when we get more details."
Greece's international lenders failed again to reach a deal to release emergency aid to the debt-saddled country. Lenders will try again next Monday, but Germany signaled that significant divisions remain.
A truce between Israel and Hamas gave stocks some support around midday after Egypt announced a ceasefire would come into effect later in the day.
Fears that the fiscal cliff discussions in Washington could be drawn out or yield no resolution have been at the forefront of investors' minds in recent weeks. Combined with concerns about the euro zone's continued debt problems, the worries had driven a sell-off that has taken more than 5 percent off the S&P 500 since Election Day in early November.
Positive comments from U.S. politicians that they will work to find common ground have helped the S&P 500 recoup some of that loss in recent sessions.
The Dow Jones industrial average <.DJI> gained 48.38 points, or 0.38 percent, to end at 12,836.89. The Standard & Poor's 500 Index <.SPX> added 3.22 points, or 0.23 percent, to finish at 1,391.03. The Nasdaq Composite Index <.IXIC> rose 9.87 points, or 0.34 percent, to close at 2,926.55.
St Jude Medical shares tumbled 12.2 percent to $31.37 after an inspection report from health regulators raised new safety concerns about one of the company's leads that are used with implantable defibrillators, analysts said.
A modest gain in International Business Machines <IBM.N> helped the Dow outperform the other indexes. IBM rose 0.6 percent to $190.29.
Dow component Hewlett-Packard Co <HPQ.N> climbed 2 percent to close on Wednesday at $11.94, recouping a small slice of Tuesday's loss, when the stock slid to a 10-year low after the computer and printer maker reported a $5 billion charge related to "accounting improprieties" at Autonomy, a British software company that HP bought last year. At least two brokerages have cut their ratings on HP's stock, while analysts at several firms lowered their price targets.
Salesforce.com Inc jumped 8.8 percent to $158.78 a day after the business software provider reported results that beat Wall Street's expectations for the third quarter and maintained its outlook for the rest of the year.
But Deere & Co dragged on the S&P 500 after the world's largest farm equipment maker reported a weaker-than-expected quarterly profit. Its stock lost 3.7 percent to $82.83.
The market did not derive much direction from the day's economic data, with initial jobless claims falling last week, as expected.
Other data showed manufacturing picked up at its quickest pace in five months in November, while the Thomson Reuters/University of Michigan's final reading for November showed the consumer sentiment index improved only slightly from the previous month.
The focus will likely turn to retailers on Friday as analysts try to assess how strong the holiday shopping season will be this year, according to Kurt Brunner, portfolio manager at Swarthmore Group in Philadelphia.
The S&P 500 retail sector index <.SPXRT> was up 0.6 percent.
Holiday shopping traditionally kicks off the day after Thanksgiving, known as Black Friday, as stores offer deals and discounts to lure consumers.
Advancers beat decliners by a ratio of about 2 to 1 on both the New York Stock Exchange and the Nasdaq.
(Editing by Jan Paschal)