The U.S. stock market rebounded Thursday from a two-day slump, notching its biggest gain in more than two weeks and pushing the Dow Jones industrial average up more than 300 points.

The gains brought the Standard & Poor’s 500 index nearly back to breakeven for the year after steep declines in August and September. Industrial stocks were among the index’s biggest gainers.

The rally followed a batch of encouraging earnings reports from McDonald’s, eBay and other companies. Alphabet, Microsoft and Amazon also delivered better-than-expected results shortly after the close of regular trading.

News that the European Central Bank could consider expanding its stimulus program in December also helped rally the market. Such a move could help stimulate spending in the region, a plus for U.S. companies struggling with declining overseas revenue, said Bob Doll, chief equity strategist at Nuveen Asset Management.

“We’ve had some pretty good earnings in a season that so far has been mixed,” Doll said. “Then you layer some chatter out from the ECB, and all the uncertainty and skepticism and negativism, and the mass amount of cash on the sidelines, and it doesn’t take much to get a rally going.”

The Dow climbed 320.55 points, or 1.9 percent, to 17,489.16. The S&P 500 index rose 33.57 points, or 1.7 percent, to 2,052.51. The last time the Dow and S&P 500 delivered bigger single-day gains was Oct. 5.

The Nasdaq added 79.93 points, or 1.7 percent, to 4,920.05.

A surge in European stocks set the stage for the three major U.S. stock indexes to go higher early Thursday.

Mario Draghi, head of the European Central Bank, signaled that the bank could boost monetary stimulus at its meeting in December. That raised expectations that the ECB might extend its $1.2 trillion bond purchase program. Draghi said the ECB was also considering other measures, such as further cutting one of its key interest rates.

Beyond that, investors pored over the latest slate of company earnings, which helped put them in a buying mood.