The 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 following steep declines in August and September. Industrials stocks were among the index's biggest gainers.

The rally followed a batch of encouraging earnings 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.

advertisement | advertise on newsday

A surge in European stocks set the stage for the three major U.S. stock indexes to go higher early on 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 also said that the ECB was also considering other measures, such as further cutting one of its key interest rates.

"The market was in a tight trading range leading up to today's move to the upside, waiting for a catalyst in essence to push the market in one direction or the other," said Quincy Krosby, a market strategist at Prudential Financial. "And you can see clearly that the Draghi comments were very positively received by the market."

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

Traders bid up eBay, which reported earnings late Wednesday that came in well ahead of what analysts were expecting. The e-commerce company jumped $3.37, or 13.9 percent, to $27.58.

McDonald's climbed 8.1 percent after the world's largest burger chain handily beat Wall Street estimates and said its sales increased in the third quarter. McDonald's shares added $8.33 to $110.87.

Texas Instruments' earnings also beat projections. The company also gave an upbeat outlook for the current quarter. The stock vaulted $6.19, or 11.9 percent, to $58.09.

Some companies turned in disappointing results, which sent their share prices tumbling.

Homebuilder PulteGroup fell $1.29, or 6.6 percent, to $18.16. American Express slid 5.2 percent a day after the credit card issuer reported a 16 percent drop in profits and cut its full-year forecast. The stock lost $4.01 to $72.50.

U.S. companies have been struggling to drum up sales overseas amid a stronger dollar, which makes their products less competitive, and decreased demand due to a sluggish global economy.

advertisement | advertise on newsday

All told, about 148 companies in the S&P 500 index have reported third-quarter earnings so far. Some 68 percent of those have reported results that beat Wall Street's expectations. That's better than the historic average of 66 percent, according to S&P Capital IQ.

Nine of the 10 sectors in the S&P 500 index rose, led by industrials, up 2.8 percent. The sector is down 2.7 percent this year. Health care stocks fell 0.5 percent. The sector, which was among the biggest risers in the index for much of the year, is down 0.9 percent.

Among the hardest-hit health care stocks Thursday were Tenet Healthcare and Universal Health Services. Tenet slumped $6.57, or 18.9 percent, to $28.23, while Universal Health slid $13.74, or 11 percent, to $111.73.

Germany's DAX rose 2.5 percent, while the CAC-40 in France rose 2.3 percent. The FTSE 100 index of leading British shares gained 0.4 percent.

In China, the Shanghai Composite Index finished up 1.4 percent following a 3 percent slide Wednesday. Elsewhere in Asia stock markets closed mostly lower. Japan's Nikkei 225 fell 0.6 percent and South Korea's Kospi dropped 1 percent. Hong Kong's Hang Seng fell 0.6 percent.

advertisement | advertise on newsday

In energy futures trading, benchmark U.S. crude rose 18 cents to $45.38 a barrel on the New York Mercantile Exchange. Brent crude, used to price international oils, added 23 cents to $48.08 a barrel in London.

Wholesale gasoline rose 2.6 cents to close at $1.307 a gallon on the New York Mercantile Exchange, while heating oil rose 1.5 cents to $1.465 a gallon. Natural gas fell 1.8 cents to close at $2.386 per 1,000 cubic feet.

Precious and industrial metals futures were mixed. Gold fell $1 to $1,166.10 an ounce, silver rose 13 cents to $15.84 an ounce and copper gained 2 cents to $2.38 a pound.

U.S. government bond prices rose. The yield on the 10-year Treasury note fell to 2.02 percent from 2.03 percent the day before. The euro fell to $1.1109 while the dollar rose to 120.72 yen.