Wall Street stocks shrugged off two weak sessions and won solid gains Wednesday on more upbeat sentiment ahead of key US-China trade talks.

Major indices had lost more than one percent on Tuesday after new US sanctions on Chinese entities prompted a brusque response from Beijing, setting a harsh tone ahead of high-level trade talks due to begin Thursday.

But stocks were in positive territory the entire day on Wednesday following reports that a pared-down agreement was still possible. The rally faded a bit near the end of the session following less upbeat headlines on the talks.

The Dow Jones Industrial Average gained 0.7 percent to close at 26,346.14.

The broad-based S&P 500 advanced 0.9 percent to 2,919.40, while the tech-rich Nasdaq Composite Index climbed 1.0 percent to 7,903.74.

Trade “appears to be the fulcrum of market volatility,” said a note from CFRA Research’s Sam Stovall.

“Investors are trying to ascertain whether the administration will settle for face-saving piecemeal agreements or hold out for a broad, sweeping concession. The markets will likely cheer the former but cringe at the latter.”

Federal Reserve minutes showed US central bankers have become more anxious over a global slowdown even though the US outlook remains good for the moment.

Futures markets expect the Fed to cut interest rates again later this month.

Among individual companies, Johnson & Johnson fell two percent after a jury in Pennsylvania ruled the company should pay $8 billion in punitive damages over the psychiatric drug Risperdal. The company said it would appeal.

American Airlines jumped 3.1 percent as it said a key benchmark on revenue rose to 2.5 percent from 1.5 percent in the third quarter, indicating strong demand despite a hit from Hurricane Dorian and the continued effect of the grounding of Boeing’s 737 MAX planes.

American again pushed back the timeframe for resuming flights on the MAX, this time until January 15, 2020.