(Reuters) - Wall Street closed slightly higher on Monday to mint new record highs for the S&P 500 and the Dow industrials, fueled by Bank of America’s better-than-expected profit and a major tech sector acquisition.

SoftBank's $32-billion deal to buy British chip designer ARM Holdings ARMH.O lifted U.S. chip stocks, and the technology sector led the way higher on the S&P 500. The tech-heavy Nasdaq rose more than the S&P and the Dow.

Bank of America's BAC.N earnings report continued the momentum for U.S. banks, kicked off by JPMorgan JPM.N last week. The bank's shares rose 3.3 percent to $14.11, helping the S&P financial index .SPSY gain 0.4 percent.

“The underlying catalyst is a breakout in economic optimism,” said Jim Paulsen, chief investment strategist at Wells Capital Management in Minneapolis.

“What’s really important is people are revising up their earnings numbers. You see more cyclical (sectors) taking over leadership and less of the bond-like stocks.”

The Dow Jones industrial average .DJI rose 16.5 points, or 0.09 percent, to 18,533.05, for its seventh consecutive up day. The S&P 500 .SPX gained 5.15 points, or 0.24 percent, to 2,166.89 and the Nasdaq Composite .IXIC added 26.20 points, or 0.52 percent, to 5,055.78.

The year-on-year decline in earnings of S&P 500 components is now expected to slow to 4.5 percent in the second quarter, from 5 percent in the first, and more companies are expected to beat analysts’ estimates, according to Thomson Reuters data.

Traders work at the Citadel Securities post on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., July 18, 2016. REUTERS/Brendan McDermid

Third-quarter earnings are then expected to turn positive, rising 1.5 percent, with fourth-quarter profit up a more robust 9.1 percent.

“There seems to be a growing consensus that this is the trough of earnings for the S&P 500,” said Bucky Hellwig, senior vice president at BB&T Wealth Management in Birmingham, Alabama. “If indeed it is, that can build some momentum on a fundamental basis going into the third and the fourth quarter.”

The S&P 500 and Dow set new records last week for the first time in more than a year, shaking off global economic uncertainty including Britain’s recent vote to leave the European Union.

The SoftBank deal sent ARM's U.S.-listed shares surging 40.5 percent, while the semiconductor index .SOX rose 1.5 percent.

The materials sector .SPLRCM gained 0.7 percent, boosted by a 2.9-percent rise in Monsanto MON.N shares. Monsanto is negotiating a confidentiality agreement with Bayer AG BAYGn.DE after Bayer raised its takeover offer to more than $64 billion, Reuters reported.

Hasbro HAS.O fell 6.6 percent to $79.82 on concerns of slowing growth in the toy maker's sales targeted at boys, its biggest business. Rival Mattel MAT.O dropped 1 percent.

After the market closed, Netflix NFLX.O shares tumbled 14.5 percent. The streaming video company's subscription additions in the second quarter fell short of analysts' expectations.

International Business Machines IBM.N shares rose 2.5 percent after hours following results.

About 5.6 billion shares changed hands in U.S. exchanges, well below the 7.7 billion daily average over the past 20 sessions.

NYSE advancing issues outnumbered decliners by a 1.72-to-1 ratio; on Nasdaq, a 1.25-to-1 ratio favored advancers.

The S&P 500 posted 22 new 52-week highs and no new lows; the Nasdaq Composite recorded 110 new highs and 23 new lows.