U.S. stocks rose on Thursday, as robust earnings reports supported a third day of recovery from a bruising selloff in October, but a drop in Apple’s shares ahead of results kept technology stocks under pressure.

Chemicals producer DowDuPont Inc rose 6.6 percent after quarterly profit topped estimates and the company announced a $3 billion share buyback.

NXP Semiconductors climbed 8.6 percent after the chipmaker topped profit and revenue estimates, while American International Group Inc gained 4.7 percent after the insurer posted a smaller-than-quarterly loss.

Markets also got a lift after U.S. President Donald Trump said in a tweet he had a “very good” talk with Chinese President Xi Jinping on trade and North Korea and that the two planned to meet at the upcoming G-20 summit.

The rebound comes after the benchmark S&P 500 in October posted its worst monthly performance since September 2011, battered by worries over rising borrowing costs, global trade disputes and a possible slowdown in U.S. corporate profits.

“Over the past few days, we’ve seen the pressure valve taken off the selling which certainly helps from a sentiment perspective,” said Michael Antonelli, managing director, institutional sales trading at Robert W. Baird in Milwaukee.

The S&P technology index slipped 0.1 percent after two days of solid gains, with Apple, last among the major technology names to report earnings, falling 0.2 percent ahead of earnings after markets close.

Netflix, Facebook and Alphabet also fell, pushing the communication services index down 0.3 percent.

Shares in Spotify Technology fell about 10 percent after the paid music streaming service reported quarterly revenue and margins in line with expectations and a modest rise in premium subscribers.

S&P 500 companies are on pace to have posted a 26.3 percent rise in third-quarter earnings with more than half of the constituents having reported, according to IBES data from Refinitiv. Despite the big overall profit increase, some high-profile companies have issued disappointing reports.

At 10:12 a.m. ET, the Dow Jones Industrial Average was up 147.40 points, or 0.59 percent, at 25,263.16, the S&P 500 was up 12.40 points, or 0.46 percent, at 2,724.14. The Nasdaq Composite was up 23.57 points, or 0.32 percent, at 7,329.47.

Eight of the 11 major S&P sectors were higher, with a 2 percent jump in the materials index leading the gainers after DowDuPont’s results.

Health insurer Cigna Corp rose 3.1 percent after beating quarterly profit estimates and raising its full-year earnings forecast on tight cost controls.

Advancing issues outnumbered decliners by a 2.99-to-1 ratio on the NYSE. Advancing issues outnumbered decliners by a 2.28-to-1 ratio on the Nasdaq.

The S&P index recorded 6 new 52-week highs and 2 new lows, while the Nasdaq recorded 12 new highs and 29 new lows.