Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., October 13, 2017. REUTERS/Brendan McDermid

NEW YORK (Reuters) - Treasury yields slipped on Friday after muted underlying U.S. inflation data offset higher gasoline prices and strong retail sales while the U.S. dollar regained ground lost earlier in the day but was still set for its worst week in five.

Stocks on major world markets, however, hit their fourth record high in a row, with Wall Street moving higher as some investors bet the inflation data could curb future interest rate hikes while others eyed trade discussions and retail data.

U.S. consumer prices recorded their biggest increase in eight months in September as gasoline prices soared in the wake of hurricane-related refinery disruptions, but underlying inflation remained muted.

“It all comes out to the economic data that came out today,” said Chris Zaccarelli, chief investment officer at Cornerstone Financial Partners, in Huntersville, NC, referring to moves in bonds, currency and stocks.

“In general the idea of lower inflation puts in people’s minds that the Fed will go more slowly. It’s less of a headwind for the stock market.”

The Dow Jones Industrial Average .DJI rose 30.71 points, or 0.13 percent, to end at 22,871.72, the S&P 500 .SPX gained 2.24 points, or 0.09 percent, to 2,553.17 and the Nasdaq Composite .IXIC added 14.29 points, or 0.22 percent, to 6,605.80.

U.S. retail sales recorded their biggest increase in 2-1/2 years in September as demand rose for building materials and motor vehicles in areas hurt by hurricanes.

“It’s a risk-on day,” he said also citing a jump in technology stocks. “You’ve multiple levers here in multiple sectors. Earnings is almost taking a back seat today.”

The Trump administration is seeking to use talks on renegotiating NAFTA, the North American Free Trade Agreement, to propose automotive content rules that require the use of North American-made steel, aluminium, copper and plastic resins, according to a Reuters report.

European shares rose to their highest in nearly four months, helped by corporate earnings updates.

“There is really no fig leaf to cover up this notion that inflation is weak, and it’s weak in a very broad sense,” said Aaron Kohli, an interest rate strategist at BMO Capital Markets in New York. “The Fed has pointed to inflation bouncing back and there is no data to support that at the moment.”

Oil prices closed at their highest level in October on bullish news from strong Chinese oil imports and after U.S. President Donald Trump decided not to certify Iran compliance with a nuclear agreement.

U.S. crude CLcv1 rose 1.52 percent to $51.37 per barrel and Brent LCOcv1 was last at $57.16, up 1.62 percent.

Spot gold XAU= added 0.7 percent to $1,302.98 an ounce.

Additional reporting by Karen Brettell and Saqib Iqbal Ahmed in New York, Ritvik Carvalho and Helen Reid in London, Asia markets team; Editing by Clive McKeef and James Dalgleish