Stocks closed modestly higher in a shortened pre-holiday session on Wednesday, reversing earlier losses, as investors brushed off turmoil in Egypt and political uncertainty in Portugal and squared positions ahead of the U.S. jobs report due on Friday.
Among S&P sectors, telecoms, techs and consumer discretionary rose, while financials fell.
"We're still in this rough period. We have a 10 percent to 20 percent correction ahead of us later this quarter, early next quarter. For two months now I've been a seller of anything above Dow 15,000 and I'll stay that way," Paul Schatz of Heritage Capital told CNBC.
The day's economic data was largely mixed, providing traders with little direction ahead of the June jobs report due out on Friday, when the markets resume trading after Thursday's Independence Day holiday.
The ADP employment report showed that the U.S. employment rose by 188,000 private-sector jobs in June, while initial jobless claims slipped.
"This would suggest that nothing's changed. The job market is remarkably stable," Mark Zandi, chief economist at Moody's Analytics, told CNBC.
(Read More:Traders Watching Data for Clues to Jobs Report)
Meanwhile, consultants Challenger, Gray & Christmas said the number of job cuts in the first half of the year improved from the first six months of 2012.
Other data was less bright. The U.S. trade deficit widened in May to $45.03 billion from $40.15 billion in April, which could mean downgrades to second-quarter GDP estimates. Already, Goldman Sachs cut its GDP tracking estimate by two-tenths to 1.6 percent.
The ISM non-manufacturing index came in at 52.2, its weakest level since Feb. 2010.
"This market seems to be stuck between expectations of faster economic growth in the second half on the one hand and the threat of the Fed on the other," David Joy, Ameriprise Financial chief market strategist, said. "I think this market is stuck in a trading range until we get a clearer picture."
(Read More: Stocks Start Q3 on Upswing, But Headwinds Coming)
U.S. investors were largely able to brush off weakness overseas sparked by worries about the European periphery and slowing growth in China. China's official service sector Purchasing Managers' Index declined to its weakest level in nine months in June.
"Markets are speculating about the fate of the (Portuguese) prime minister, and to the extent that this problem reflects concerns over Euro inspired austerity, there are wider implications," UBS global economist Paul Donovan wrote in a note.
Despite fears of Fed tapering and weakness in global markets, "there's a lot of underlying strength in the (U.S.) equity market," said Doug Foreman, co-chief investment officer at Kayne Anderson Rudnick Investment Management. "The key questions over the next six to nine months will be does employment continue to improve, does consumer confidence continue to improve, does housing — which is driving the other two — continue to improve."