Surprisingly strong data on U.S. private jobs growth and factory activity in May revived traders' appetite for the dollar and reduced the safe-haven appeal of gold and U.S. and German government bonds.

The Institute for Supply Management said its barometer of U.S. factory activity edged up to 54.9 last month from 54.8 in April, while ADP reported private payrolls grew by 253,000 last month, beating analysts' median forecast of a 185,000 increase.

These reports led traders to almost fully price in chances that the Federal Reserve will raise interest rates at its June 13-14 policy meeting. They also supported the outlook for possibly another hike after June.

"We think it’s consistent with continued progress in the economy and possibly a hike in September," said John Herrmann, director of interest rates strategy at MUFG Securities in New York.

If the U.S. government's payroll report for May were to show another solid pickup in hiring, it would cement expectations that a rate hike in less than two weeks is a done deal.

"I don’t think it locks in payrolls are going to be good, it’s more of payrolls aren’t going to be a disaster," said JJ Kinahan, chief market strategist at TD Ameritrade in Chicago.

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

The S&P and Nasdaq reached intraday record peaks at 2,429.95 and 6,247.07, respectively.

Europe's broad FTSEurofirst 300 index <.FTEU3> ended up 0.39 percent, at 1,538.07. MSCI's broadest index of Asia-Pacific shares outside Japan <.MIAPJ0000PUS> rose 0.67 point or 0.13 percent, to 498.49.

The MSCI world equity index <.MIWD00000PUS>, which tracks shares in 45 nations, rose 2.41 points or 0.52 percent, to 466.2.

The dollar index <.DXY>, which tracks the greenback versus a basket of six currencies, rose 0.28 percent, to 97.197.

China's yuan strengthened beyond 6.8 per dollar for the first time since Nov. 11 after the central bank pushed its reference rate, around which the spot rate can fluctuate, 0.8 percent higher. It was the second-largest single-day appreciation of the currency since it was unpegged from the dollar in 2005.

In the bond market, benchmark 10-year Treasury yields were up 2 basis points at 2.215 percent, while the German counterpart was marginally higher at 0.302 percent.

In commodities, Brent crude settled down $0.13, or 0.26 percent, at $50.63 a barrel. U.S. crude settled up $0.04, or 0.08 percent, at $48.36 per barrel.

Government data on Thursday showed U.S. crude inventories dropped by 6.4 million barrels, greater than a forecast 4.4 million-barrel decline. The stock draw offered some respite from worries over a global oversupply in oil.

Spot gold prices fell $0.18 or 0.01 percent, to $1,267.91 an ounce, retreating from $1,273.74 which was the strongest level since April 25.

(To view a graphic on '2017 asset returns' click http://fingfx.thomsonreuters.com/gfx/rngs/COMMODITIES-ASSETS/010031B62XZ/index.html)

(To view a graphic on 'World FX rates in 2017' click http://tmsnrt.rs/2egbfVh)

(To view a graphic on 'Global bonds dashboard' click http://tmsnrt.rs/2fPTds0)

(Additional reporting by Chuck Mikolajczak, Sam Forgione, Gertrude Chavez-Dreyfuss and Julia Simon in New York, Nigel Stephenson, Ritvik Carvalho and Christopher Johnson in London, Nichola Saminather in Singapore, and Aaron Sheldrick in Tokyo; Editing by Chris Reese and Nick Zieminski)

By Richard Leong