Placeholder stockmarket new

NEW YORK — In the stock market, it’s all about trade now.

Stocks were jumping early Thursday after China said both sides in the U.S.-China trade war had agreed to roll back tariffs if their talks progress. But much of the enthusiasm evaporated in the afternoon amid concerns that some in the White House oppose easing up on tariffs.

By the end of trading, the S&P 500 was up 8.40 points, or 0.3%, at 3,085.18. It managed to set a record for the second time this week, but it had been on pace for a bigger, 0.7% gain earlier in the day.

The Dow Jones Industrial Average climbed 182.24, or 0.7%, to 27,674.80 and also set a record. The Nasdaq composite finished just shy of its all-time high after rising 23.89, or 0.3%, to 8,434.52.

Encouraging reports on the economy and corporate profits have helped drive stocks back to record heights in recent weeks. The U.S. job market remains strong, and the Federal Reserve has cut interest rates three times since the summer to bolster the economy. Earnings for big companies, meanwhile, weren’t as bad in the summer as Wall Street had feared.

That leaves the U.S. trade war as the wild card for the global economy, and markets are trading on every whiff of movement about it as a result.

“It’s not that trade is more important to the market than economic growth or than the Fed,” said Steve Chiavarone, equity strategist at Federated Investors. “It’s that the market has already priced in that picture” of a still solid economy and easier interest rates.

“What’s left to be determined is trade, and there’s a greater amount of uncertainty because we’ve had head fakes before.”