NEW YORK (Reuters) - U.S. stocks rose on Thursday after data showed domestic inflation increased at its slowest pace since late 2015, boosting expectations that the Federal Reserve will hold off from increasing interest rates again this year.

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

The dollar surrendered early gains against a basket of major currencies, and gold prices rose as simmering tensions on the Korean peninsula supported sentiment.

U.S. consumer spending rose slightly less than expected in July and annual inflation increased at its slowest pace since late 2015. Investors’ focus now turns to the monthly U.S. payrolls report, to be released on Friday.

The combination of moderate consumer spending and tepid inflation casts doubts on whether the Fed will raise rates at its December policy meeting.

The S&P 500 Index .SPX has been building momentum this week and closed above its 50-day moving average for a second straight day. This was a technical level that acted as resistance in the past week.

“People are coming back from vacation and noticing the market is near its all-time highs still, that a hurricane and all the North Korea bluster didn’t impact it,” said Michael Antonelli, managing director, institutional sales trading at Robert W. Baird in Milwaukee.

“There’s no doubt that the market is still in an uptrend. We’ve been throwing all sorts of bricks into the wall of worry and it’s still reaching for the sky.”

Stocks extended gains after U.S. Treasury Secretary Steven Mnuchin said President Donald Trump’s administration has a detailed plan on tax reform and is still on track to execute the agenda by the end of this year.

MSCI's world index .MIWD00000PUS, which tracks shares in 46 countries, was up 0.55 percent, having touched a three-week high.

The Dow Jones Industrial Average .DJI rose 55.67 points, or 0.25 percent, to finish at 21,948.1, the S&P 500 .SPX gained 14.06 points, or 0.57 percent, to close at 2,471.65 and the Nasdaq Composite .IXIC added 60.35 points, or 0.95 percent, to end at 6,428.66.

European stocks rallied after Reuters reported that the euro's rapid gains are worrying a growing number of European Central Bank policymakers, raising the chance asset purchases will be phased out only slowly. The pan-European STOXX 600 .STOXX closed up 0.77 percent.

The euro EUR=, which hit a more than 2-1/2-year high against the dollar on Tuesday, slipped on the Reuters report, before recovering to trade up 0.19 percent at $1.1904.

The dollar, which weakened after the U.S. inflation data, edged lower as month-end investment flows and caution ahead of Friday’s U.S. jobs report weighed.

The dollar index .DXY, which measures the greenback against a basket of six major rivals, was 0.28 percent lower at 92.62.

The weaker dollar and continued security concerns related to North Korea helped gold prices rise. Spot gold XAU= was up 1.06 percent at $1,322.17 an ounce.

U.S. Treasury prices gained after the U.S. data and as tensions with North Korea kept up demand for safe-haven bonds.

Benchmark 10-year U.S. Treasury notes US10YT=RR were up 7/32 in price to yield 2.1222 percent, down from 2.145 percent on Wednesday.

Gasoline futures RBc1 surged 13.5 percent as almost a quarter of U.S. refining capacity remained offline due to Tropical Storm Harvey and traders scrambled to reroute millions of barrels of fuel.

U.S. crude CLc1 settled up $1.27 or 2.76 percent, at $47.23 a barrel and Brent crude LCOc1 settled $1.52 higher, or 2.99 percent, at $52.38.