Stocks closed slightly lower on Thursday, posting the market’s first decline this week and erasing modest gains from a day earlier.

Trading was mostly subdued as investors sized up the latest company earnings and deal news. Technology stocks declined the most. Supermarket operators and other consumer-focused stocks also closed lower. General Electric and other industrial companies led the gainers. Banks also notched gains.

On Thursday:

The Standard & Poor’s 500 index lost 7.64 points, or 0.3 percent, to 2,500.60.

The Dow Jones industrials fell 53.36 points, or 0.2 percent, to 22,359.23.

The Nasdaq composite lost 33.35 points, or 0.5 percent, to 6,422.69.

The Russell 2000 index of smaller-company stocks gave up 1.24 points, or 0.1 percent, to 1,444.18.

For the week:

The S&P 500 is up 0.37 points, or 0.01 percent.

The Dow is up 90.89 points, or 0.4 percent.

The Nasdaq is down 25.78 points, or 0.4 percent.

The Russell 2000 is up 12.47 points, or 0.9 percent.

For the year:

The S&P 500 is up 261.77 points, or 11.7 percent.

The Dow is up 2,596.63 points, or 13.1 percent.

The Nasdaq is up 1,039.58 points, or 19.3 percent.

The Russell 2000 is up 87.05 points, or 6.4 percent.