The S&P 500, up for five straight sessions, traded within a point of its record closing high before shedding about half of the day's gains. The high was near the 1,593 level that is expected to be technical resistance.
Telecommunications companies' shares led the S&P 500's advance, with the sector's index up 1.7%. Verizon Communications hit a 13-year high with a 2.7% jump to $53.22 after sources told Reuters it has hired advisers to prepare a possible bid to take full control of Verizon Wireless.
Dow Chemical posted a 33% jump in quarterly profit as farmers in the Americas bought more of its seeds and pesticides, sending its shares up 5.6% to $33.97.
Market participants expected the first quarter to be difficult for corporate America after cuts in government spending and the payroll tax hike earlier in the year.
"But consumers are holding on pretty well," said Peter Jankovskis, co-chief investment officer of OakBrook Investments LLC in Lisle, Illinois.
"There's optimism out there that conditions will improve," he said. "There's potential for an uptick in the economy."
More From This Section
The Dow Jones industrial average rose 24.50 points or 0.17%, to 14,700.80 at the close. The S&P 500 gained 6.37 points or 0.40%, to 1,585.16. The Nasdaq Composite added 20.33 points or 0.62%, to close at 3,289.99.
Expectations were lowered sharply before the start of the current reporting season and 68% of S&P 500 companies that have reported results so far have beaten earnings forecasts. However, less than 42% have beaten revenue forecasts - below the average beat rate of 52% over the last four quarters.
Thursday's US data gave a less worrisome view of the economy than other data of late. Initial claims for unemployment benefits in the latest week dropped 16,000 to a seasonally adjusted 339,000 compared with expectations for 351,000.
Cliffs Natural Resources jumped 15% to $20.95 after it posted earnings late on Wednesday that were much better than analysts had estimated.
On Nasdaq, Alexion Pharma shares jumped nearly 11% after the company reported earnings and revenue above expectations. Akamai Tech soared almost 18% after a surge in earnings and a rosy outlook for this quarter. Alexion shares rose 10.7% to end at $98.82 and Akamai spiked 17.7% to close at $42.48.
UPS Inc , the world's largest package-delivery company, advanced 2.3% to $85.42 after it reported a quarterly profit above analysts' estimates.
But Exxon Mobil Corp and 3M Co bucked the trend as their shares fell.
Exxon Mobil shares slid 1.5% to $88.07 after it said quarterly profit edged up, helped by its chemicals business, but oil and gas production fell.
Fellow Dow component 3M Co lost 2.8% to $104.88 after the diversified US manufacturer posted first-quarter earnings and revenue that missed Wall Street's expectations and cut its 2013 profit forecast.
About 6.8 billion shares changed hands on the New York Stock Exchange, the Nasdaq and NYSE MKT, more than the daily average so far this year of about 6.38 billion shares.
On the NYSE, advancers outnumbered decliners by a ratio about 2 to 1, while on the Nasdaq, roughly five stocks rose for every three that fell.