Stocks finished slightly lower Thursday as losses in technology and consumer-focused companies offset gains elsewhere in the market.

The market moved lower ahead of a new round of trade talks between the U.S. and China. The countries have threatened tariffs on each other. Energy stocks bucked the downward trend. Small-company stocks also rose.

On Thursday:

The S&P 500 index slipped 2.33 points, or 0.1 percent, to 2,720.13.

The Dow Jones industrial average lost 54.95 points, or 0.2 percent, to 24,713.98.

The Nasdaq composite fell 15.82 points, or 0.2 percent, to 7,382.47.

The Russell 2000 index of smaller-company stocks picked up 8.92 points, or 0.6 percent, to 1,625.29.

For the week:

The S&P 500 is down 7.59 points, or 0.3 percent.

The Dow is down 117.19 points, or 0.5 percent.

The Nasdaq is down 20.41 points, or 0.3 percent.

The Russell 2000 is up 18.50 points, or 1.2 percent.

For the year:

The S&P 500 is up 46.52 points, or 1.7 percent.

The Dow is down 5.24 points, or 0.02 percent.

The Nasdaq is up 479.08 points, or 6.9 percent.

The Russell 2000 is up 89.78 points, or 5.8 percent.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.