Stocks ended higher on Wall Street following hopes that China and the U.S. are getting closer to a trade deal and more in Thursday’s Stock Market Update.

The Dow Jones industrials and the S&P 500 ended at record highs again Thursday, but they would have been even higher if not for a late-afternoon report saying a proposed rollback of tariffs was facing stiff opposition in the White House.

Technology companies led the way higher. Qualcomm soared 6.3% after turning in strong quarterly results.

Gold prices fell as traders embraced riskier assets.

Leading the way for the market were companies in industries that do best when the economy is strengthening, such as oil producers and banks. In another sign of optimism about the economy’s prospects, Treasury yields jumped higher. Gold fell as investors felt less need to hide out in assets seen as safe.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 rose 8 points, or 0.3%, to 3,085. The Dow Jones Industrial Average climbed 182 points, or 0.7%, to 27,674. The Nasdaq added 23 points, or 0.3%, to 8,434.

LIFTING CLOUDS: President Donald Trump’s trade war has been one of the biggest concerns for investors since early 2018. Increased tariffs not only raise costs and sap profits for U.S. companies. They also can and have made CEOs hesitant to spend on new factories, expansions and other investments given all the uncertainties about what the rules of trade will be.

If progress continues on the trade front, it would add to a growing pile of encouraging data on the economy. Besides last week’s solid jobs report, the Federal Reserve has also cut interest rates three times since the summer, which helps support stock prices and economic growth. Corporate profits from the summer have also proven to be not as bad as analysts feared.

Altogether, it means the worries about a possible recession that dominated markets just a few months ago are diminishing. That in turn has more on Wall Street confident that this bull market for stocks, which already is the longest on record, can keep going.

“Bull markets end in recessions,” said Steve Chiavarone, equity strategist at Federated Investors. “It’s been that way since the beginning of time and will be that way until the end of time. The storm clouds have dissipated, and we’ve cancelled the 2020 recession in the market’s mind.”

Of course, a breakdown in the U.S.-China talks could upset things, as they have in the past. But investors aren’t looking for the two sides to reach a deep, structural deal that settles all their disputes, Chiavarone said. They just want conditions to stop getting worse.

“What we’re talking about is not a solving of this conflict but a de-escalation of the trade tensions,” he said. “We have sufficient evidence that the economy is OK. We know earnings are OK. The thing that’s left is whether trade comes to fruition.”

JUST BEAT IT: More than a dozen companies joined the lengthy parade of those reporting stronger profits for the latest quarter than analysts expected.

Qualcomm (QCOM) jumped 6.3% after it reported both revenue and earnings that topped Wall Street’s forecasts.

Ralph Lauren (RL) surged 14.6% for the biggest gain in the S&P 500 following its own better-than-expected results.

Companies are no longer getting the benefit of the first year of lower tax rates, and they’re also contending with a slowing global economy weighing on their sales. But the S&P 500 is on track to report a drop of 2.5% in third-quarter earnings per share from a year earlier, versus the 4% that analysts initially expected, according to FactSet.

RATE WATCH: The yield on the 10-year Treasury climbed to 1.92% from 1.81% late Wednesday. It has risen sharply over the last five weeks and is close to its highest level since the start of August.

CYCLICAL SPURT: Bank stocks, whose profits benefit from higher rates for mortgages and other loans, climbed to some of the market’s biggest gains.

So did oil companies and others that Wall Street calls “cyclical” stocks because their profits are so closely tied to where the economy is in its growth-and-recession cycle.

Energy stocks jumped 1.3% for the largest gain among the 11 sectors that make up the S&P 500. It’s a turnaround from a few months ago, when utilities and other so-called “defensive” areas led the way.

On Wednesday, these kinds of stocks that tend to hold up better when the economy is souring got left behind. Utilities sank 1.5% for the largest loss in the S&P 500.

HIGH TIDE: SeaWorld Entertainment (SEAS) surged 10.8% after the theme park operator named an executive from the timeshare and resort industries as its new CEO. Sergio Rivera will lead the company months after the previous CEO abruptly resigned.

TRIP HAZARD: Several companies that focus on travel were punished by investors after reporting weak results. TripAdvisor (TRIP) plunged 22.4%, and Expedia Group (EXPE) plummeted 27.4%.

© The Associated Press. All rights reserved.