Wall Street stocks shrugged off three straight negative sessions and finished higher on Wednesday following upbeat reports on US-China trade talks that offset lackluster economic data.

Analysts cited a Bloomberg News report that said Washington and Beijing as near finalizing a partial trade agreement that would avert new tariffs set for later this month.

The report countered downcast sentiment that has weighed on stocks in recent days and blunted disappointing private-sector hiring data released Wednesday. A report on services sector activity was also weaker than expected, although the sector still showed positive growth.

“While yesterday, the odds of an imminent trade deal seemed slim in the wake of the president’s hawkish words, we got upbeat reports regarding the state of the negotiations overnight,” Gorilla Trades strategist Ken Berman wrote in a client note.

The Dow Jones Industrial Average finished at 27,650.72, up 0.5 percent.

The broad-based S&P 500 advanced 0.6 percent to 3,112.78, while the tech-rich Nasdaq Composite Index gained 0.5 percent to 8,566.67.

Among individual companies, Google-parent Alphabet climbed two percent as the company announced that co-founder Larry Page was stepping down as chief executive and would be replaced by Google CEO Sundar Pichai.

Expedia shot up 6.2 percent as it announced the resignations of chief executive Mark Okerstrom and Chief Financial Officer Alan Pickerill because of strategic differences.

Expedia Chairman Barry Diller said the board disagreed with the two executives’ view anticipating slowing growth in 2020 and that the board expects to accelerate growth next year.

The company boosted its share buyback program and Diller said he would personally acquire shares “as a tangible sign of my faith in and commitment to Expedia’s long-term future.”

Petroleum-linked shares gained as oil prices rose in anticipation of an OPEC agreement to cut production more deeply. Apache won 1.7 percent, Halliburton 4.1 percent and ConocoPhillips three percent.