U.S. stocks advanced on Thursday, with each of the major U.S. indexes notching record highs, after a batch of economic data suggested the economy was picking up speed.

Continue Reading Below

The ADP private sector employment report showed 253,000 jobs were added in May, well above the 185,000 estimated by economists polled by Reuters.

The report could signal a strong government payrolls report on Friday that includes hiring in both public and private sectors, which would cement expectations for an interest rate hike by the Federal Reserve in two weeks.

"More than anything it is employment data driven, it was such a resounding uptick over expectations," said Paul Springmeyer, investment managing director at the Private Client Reserve at U.S. Bank in Minneapolis, Minnesota.

"It bodes well for the Fed; certainly the numbers are very, very high in terms of the likelihood of that (hike) coming through for June."

Forecasts are for 185,000 nonfarm jobs created in May.

In addition to the ADP data, a separate report showed factory activity ticked up in May after two straight months of slowing.

San Francisco Federal Reserve Bank President John Williams said on Wednesday that while he sees three interest rate hikes this year as his baseline scenario, four rate increases would also be appropriate if the economy got an unexpected boost.

Fed Governor Jerome Powell, an influential policymaker, told CNBC that he expects three rate hikes this year.

Forecasts from Fed officials suggest that a median of two more hikes are planned before the end of the year.

Traders are currently pricing in an 88.9-percent chance of a quarter-percentage-point rate hike at the U.S. central bank's June 13-14 meeting, according to Thomson Reuters data.

The Dow Jones Industrial Average rose 135.53 points, or 0.65 percent, to end at 21,144.18, the S&P 500 gained 18.26 points, or 0.76 percent, to 2,430.06 and the Nasdaq Composite added 48.31 points, or 0.78 percent, to 6,246.83.

Gains were broad, with each of the 11 major S&P sectors on the plus side, led by gains in materials , up 1.09 percent and healthcare , up 1.18 percent.

Deere's shares were up 1.8 percent to close at $124.70 after the farm and construction major said it would buy privately held German road construction company Wirtgen Group for $5.2 billion, including debt.

Hewlett Packard Enterprise dropped 6.9 percent to $17.52 as the biggest drag on the S&P 500 after the company reported a steep fall in quarterly revenue.

Palo Alto Networks jumped 17.2 percent to a more than four-month high of $138.99 after the cybersecurity company's profit forecast topped expectations.

Advancing issues outnumbered declining ones on the NYSE by a 4.73-to-1 ratio; on Nasdaq, a 3.03-to-1 ratio favored advancers.

The S&P 500 posted 28 new 52-week highs and 11 new lows; the Nasdaq Composite recorded 82 new highs and 70 new lows.

About 6.89 billion shares changed hands in U.S. exchanges, compared with the 6.72 billion daily average over the last 20 sessions.

(Reporting by Chuck Mikolajczak; Editing by Nick Zieminski and James Dalgleish)