Stocks closed higher for a third-straight session in choppy trading Thursday, with the S&P 500 hitting its best level since May, but gains were limited following some disappointing economic reports that underscored ongoing weakness in the recovery.
"Although we are a bit above 1,375 resistance on the S&P 500, the market may be due for some consolidation given the lagging breadth and the flat Russell 2000," wrote Elliot Spar, market strategist at Stifel Nicolaus. "You should consider some selective profit taking or hedging in this area."
The Dow Jones Industrial Average rose 34.66 points, or 0.27 percent, to finish at 12,943.36, led by IBM and United Tech. BofA and AmEx tumbled.
The S&P 500 added 3.73 points, or 0.27 percent, to finish at 1,376.51, hitting its best level in more than two months. The Nasdaq climbed 23.30 points, or 0.79 percent, to end at 2,965.90.
The CBOE Volatility Index, widely considered the best gauge of fear in the market, ended below 16.
Among the key S&P sectors, techs and materials rallied, while telecoms and banks sagged.
“There are two possible explanations to the market’s advance over the past few sessions," explained Michael Sheldon, chief market strategist at RDM Financial Group. "First, there were more negative earnings pre-announcements this quarter. Historically, when this happens, market tends to rally once companies actually report numbers with some beating the lowered estimates.”
“And secondly, a certain number of investors are looking ahead to the growing likelihood that the Fed will step in once again and provide stimulus to the markets.”
Stocks rallied in the last two sessions after Federal Reserve Chairman Ben Bernanke said the central bank stands ready to actif needed. Recent economic reports have been largely disappointing, leading investors to hope and believe that the Fed will step in soon.
In the latest round of weak economic news, jobless claims jumped 34,000 last weekto a seasonally adjusted 386,000, according to the Labor Department. The four-week moving average for new claims fell 1,500 to 375,500.
Existing home sales fell 5.4 percent in Juneto an annual rate of 4.37 million units. But the median sales price was higher than a year ago.
Economic activity decline more than expected in June, according to the Conference Board's Leading Economic Index. And adding to woes, factory activity in the mid-Atlantic region contracted for the third-straight month, according to the Philadelphia Fed Reserve Bank's business activity index.
Among earnings, Morgan Stanley tumbled after the financial giant missed earnings expectations, hurt by a sharp decline in its trading-related businesses. The results come as a surprise to analysts who had also expected the company to beat following better-than-expected earnings news from rivals JPMorgan,Goldman Sachs, Citigroup and BofA in the last week.
IBM rallied after the tech giant boosted its full-year earnings target, even after it posted a quarterly revenue shortfall. BMO raised its price target on the company to $205 from $200.
Fellow Dow component Verizon posted earnings in line with forecasts, while revenue topped Wall Street's expectations. S&P Capital IQ cut its rating on the stock to "strong sell" from "hold."
And Travelers edged lower after the insurance company reported profit that missed expectations.
EBay jumped after the online auction company posted better-than-expected quarterly results and reaffirmed its full-year forecasts. At least 11 brokerages boosted their price target on the company.
Qualcomm handed in a disappointing guidance for the current quarter, hurt by weak demand for chips, but shares rallied after the company said it expects a strong final quarter in 2012.
A parade of tech companies are slated to post results after the closing bell tonight including Google , Microsoft , AMD and SanDisk .
“Google’s recently bought land in Hong Kong, Singapore and Taiwan to build new data centers to support big data and cloud,” said Dani on CNBC’s “Power Lunch.” “So we expect cautious guidance, but they will probably beat the Street.”
So far, almost a fifth of the S&P 500 companies have reported earnings, with 65 percent of firms beating expectations, according to data from Thomson Reuters. Meanwhile, 56 percent of companies have missed revenue estimates.
Express Scripts and Walgreen both rallied after the two companies struck a pharmacy network agreementthat settles a long-running dispute.
Oil prices rallied to settle at an eight-week highamid the ongoing tensions in the Middle East.
—By CNBC’s JeeYeon Park (Follow JeeYeon on Twitter: @JeeYeonParkCNBC)
Coming Up This Week:
FRIDAY: Fender and Kayak trading debut; Earnings from GE, Schlumberger, Xerox
More From CNBC.com: