Major stock indexes rebounded Wednesday, finishing higher for the third time in four days and lifting the Dow Jones industrial average to its second record close this month.

Investors had lots of market-moving news to consider, including encouraging corporate earnings from Intel, a higher profit forecast from hospital operator HCA Holdings and a pickup in U.S. homebuilders’ confidence.

Trading appeared to get the biggest jolt from the latest batch of corporate deal news.

Investors drove Time Warner’s stock up 17 percent on news that Twenty-First Century Fox made a takeover bid for the media giant. Other deals involving Apple and IBM as well as slot machine maker International Game Technology also helped lift the market.

“It’s a continuation of what we’ve really been seeing this year, and it’s almost a record amount of (mergers and acquisitions) going on,” said David Chalupnik, head of equities at Nuveen Asset Management.

Momentum from Intel’s strong second-quarter earnings late Tuesday and news that Apple and IBM are teaming up to sell more iPhones and iPads to corporate customers helped lift major stock indexes in premarket trading.

Investors also got a dose of good news about housing. A key index of U.S. homebuilders’ confidence in the housing market surged to its highest level since January and indicated that builders are more optimistic about selling homes in the second half of the year.

The major stock indexes opened slightly higher, led by the tech-heavy Nasdaq, and remained in positive territory the rest of the day.

All told, the Standard & Poor’s 500 index gained 8.29 points, or 0.4 percent, to 1,981.57. The index remains near its most recent all-time high of 1,985.44 set July 3.

The Dow added 77.52 points, or 0.5 percent, to 17,138.20. That’s up 0.4 percent from its previous record high of 17,068.65 set July 3.

The Nasdaq composite rose 9.58 points, or 0.2 percent, to 4,425.97.

The three stock indexes are all up for the year.

Bond prices rose. The yield on the 10-year Treasury note dipped to 2.53 percent from 2.55 percent late Tuesday.

Cheap financing and a tough global economy have made acquisitions an attractive option for companies to expand their business.

The value of U.S. corporate deals has surged 80 percent to $1.02 trillion so far this year from $563 billion in the same period a year ago, according to Dealogic.