Banks and technology companies led U.S. stocks to modest gains Thursday, pushing the Dow Jones industrial average to its second record close in two days.

Big retail chains and other consumer-focused stocks were among the gainers. Energy companies rose as the price of crude oil increased. Phone companies and utilities lagged the market.

“We’re continuing to hit record highs,” said Erik Davidson, chief investment officer for Wells Fargo Private Bank. “It is a resilient market, impervious to whatever comes out of Washington.”

The Standard & Poor’s 500 index gained 4.58 points, or 0.2 percent, to 2,447.83. The Dow rose 20.95 points, or 0.1 percent, to 21,553.09. The Nasdaq composite added 13.27 points, or 0.2 percent, to 6,274.44. The Russell 2000 index of smaller-company stocks inched up 1.34 points, or 0.1 percent, to 1,425.66.

The major indexes are all on pace to end the week with gains.

Trading was mostly subdued for much of the day as investors weighed new economic data on applications for unemployment benefits and prices at the wholesale level.

“Markets are really biding their time until we get into tomorrow’s more robust earnings releases,” said Eric Wiegand, senior portfolio manager for Private Wealth Management at U.S. Bank.

Several big banks, including Citigroup, JPMorgan Chase and Wells Fargo, release their second-quarter results Friday.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.