Wall Street capped a mostly listless day of trading Monday with an uneven finish for stock indexes.

Gains by technology and materials stocks were mostly outweighed by losses among real estate companies, banks and other sectors. Macy’s and other big retailers also took hefty losses.

advertisement | advertise on newsday

Energy companies rose as the price of crude oil rebounded from an early slide.

Investors were making moves ahead of the next corporate earnings reporting season, which ramps up this week. Technology stocks were a favorite, with traders expecting the sector companies to post solid results, said Anastasia Amoroso, global investment specialist at J.P. Morgan Private Bank.

“There’s definitely a pivot going on to earnings from some of the trading last week,” Amoroso said, adding that “investors are looking for some of the higher growth-opportunities and tech definitely stands out.”

The Standard & Poor’s 500 index rose 2.25 points, or 0.1 percent, to 2,427.43. The Dow Jones industrial average slid 5.82 points, or 0.03 percent, to 21,408.52. The Nasdaq composite rose 23.31 points, or 0.4 percent, to 6,176.39. The Russell 2000 index of smaller-company stocks lost 7.36 points, or 0.5 percent, to 1,408.47.

Bond prices rose. The yield on the 10-year Treasury note fell to 2.37 percent from 2.39 percent late Friday.