U.S. stocks posted modest gains Monday, extending a record-setting run into a sixth straight week.

Financial and technology companies notched some of the biggest gains. Energy stocks also rose as crude oil prices closed higher. Health care companies declined the most. Bond prices fell.

The three major stock indexes closed at new highs, despite a day of mostly listless trading as investors looked ahead to a slew of company earnings reports over the next few weeks.

“Today is a sort of wait-and-see market as investors are really looking for the direction of earnings and whether companies continue to report strong results,” said Kate Warne, investment strategist at Edward Jones.

The Standard & Poor’s 500 index added 4.47 points, or 0.2 percent, to 2,557.64. Last week marked the index’s fifth-straight weekly gain.

The Dow Jones industrial average rose 85.24 points, or 0.4 percent, to 22,956.96. The Nasdaq composite gained 18.20 points, or 0.3 percent, to 6,624. The Russell 2000 index of smaller-company stocks inched up 0.02 points to 1,502.68.

Trading was subdued for most of the day Monday. Stocks edged up early on and wavered somewhat by afternoon but ultimately held on to their slight gains as traders waited for more quarterly results from companies to pour in.

A few companies, mostly big banks, kicked off the third-quarter earnings season last week.