U.S. stocks finished mixed Monday as banks, media and energy companies climbed just enough to cancel out losses for technology companies including Facebook and Amazon.

Cable provider Charter Communications surged on a report it might be bought by a Japanese technology company. Meanwhile, cable networks Scripps Networks and Discovery Communications agreed to combine in a deal worth almost $12 billion.

advertisement | advertise on newsday

Technology companies missed out. Facebook returned some of its gains from last week, when it posted strong second-quarter results, and reports of higher expenses continued to affect Amazon’s shares. Banks rose.

The Standard & Poor’s 500 index fell 0.07 percent to 2,470.30.

The Dow Jones industrial average continued to build on its record highs. It gained 60.81 points, to close at 21,891.12.

The Nasdaq composite fell 0.42 percent to 6,348.12. The Russell 2000 index of smaller-company stocks dipped 0.29 percent to 1,425.14.

Charter Communications climbed after Bloomberg reported that Japanese conglomerate SoftBank is considering buying it. The report Sunday said that SoftBank initially wanted to combine Charter with Sprint, but after Charter rejected that idea the technology company may buy Charter outright. — AP