Wall Street stocks gained Monday on optimism over US-China trade talks and upcoming earnings reports, while Boeing tumbled again as the crisis over the 737 MAX deepened.

US President Donald Trump said he expects to sign a partial trade pact with China next month following progress in developing the text of a preliminary agreement reached earlier this month.

“There is optimism on the trade front,” said Adam Sarhan of 50 Park Investment.

Markets were also hopeful that the revised Brexit deal would avert a no-deal Brexit and that a heavy week of corporate earnings was likely to boost stocks.

The Dow Jones Industrial Average ended up 0.2 percent at 27,827.64.

The broad-based S&P 500 gained 0.7 percent to 3,006.72, while the tech-rich Nasdaq Composite Index jumped 0.9 percent to 8,162.99.

This week’s earnings calendar includes reports from Procter & Gamble, Caterpillar and Amazon.

Among companies reporting so far, 84 percent of the S&P 500 have topped estimates for earnings per share, according to FactSet.

But gains in the Dow were limited by Boeing, which plunged for a second straight session, losing 3.8 percent after the Federal Aviation Administration, criticized the aerospace giant for not providing it with key documents in the 737 MAX for months after learning about them.

Several analysts downgraded Boeing, including Baird, which said the revelations mean the “long road back just got harder” and that the company’s plan for the MAX to return in the fourth quarter “looks way more vulnerable.”

Apple gained 1.7 percent after a note from Raymond James lifted the price target on the company.

Large banks also advanced, with JPMorgan Chase, Bank of America and Citigroup all winning at least two percent.