U.S. stocks gained for a third day on Friday, lifting the S&P 500 to a record finish, as Hewlett-Packard surged and after a better-than-expected report on the sale of new homes in April.
"The housing numbers were good today, so maybe that is helping a little bit. But it's such a thin market that any news that comes out has an expediential effect because people are looking for anything to trade on," said JJ Kinahan, chief strategist at TD Ameritrade.
"We've had generally weaker housing numbers over the last two months; we'll probably see manufacturing lead the economy as opposed to housing, that shift will likely occur over the next six months to a year," said Paul Nolte, senior vice president, portfolio manager at Kingsview Asset Management in Chicago.
"The market is still holding up well in the face of bad global news like China slowing, and earnings have been so-so at best. We're still correcting the big run-up from last year by trading sideways," Nolte said.
Hewlett-Packard rose after posting quarterly results and saying it could reduce its workforce by as many as 16,000 more jobs as part of CEO Meg Whitman's effort to turn the personal computer maker around.
Read MoreHP shares rise on raised job cut target, cash flow outlook
Aeropostale declined sharply after the teen retailer projected a larger-than-estimated loss for the current quarter.
GameStop gained after reporting first-quarter earnings that beat expectations.
At an economic summit in St. Petersburg, Russian President Vladimir Putin argued that his nation was not at fault in its current stand-off with Ukraine.
On Thursday, small-cap stocks advanced and biotechnology shares surged, with the market cheered by the Federal Reserve's prior-day signal that interest rates would remain low for the foreseeable future.