NEW YORK - Stocks gained ground early Monday as they came off their best week in 2015, but faded in the afternoon and sustained small losses for the day.

Technology stocks fell more than the rest of the market.

The Dow Jones industrial average lost 31.13 points, or 0.2 percent, to 17,792.68. The Standard & Poor's 500 index declined 2.58 points, or 0.1 percent, to 2,086.59. The Nasdaq composite index fell 2.44 points, or 0.1 percent, to 5,102.48.

The S&P 500 index rose 3.3 percent last week, lifted by good news from retailers and tech stocks. That was its largest weekly gain since last December. However, it wasn't quite enough to cancel out the big loss the S&P suffered the previous week.

Apple dragged down the technology sector as its stock fell $1.55, or 1.3 percent, to $117.75.

Video game retailer GameStop slipped after it reported a smaller quarterly profit and less revenue than analysts had forecast. The company said sales of new games and game systems were not as good as it expected, and sales were also hurt by delays in opening some stores. Its shares slid $1.65, or 4.2 percent, to $37.61.

Video game maker Electronic Arts fell after GameStop's announcement, losing $3.44, or 4.8 percent, to $68.98.

Consumer discretionary stocks rose. Chipotle Mexican Grill rebounded $23.10, or 4.3 percent, to $559.29. The stock dropped 12 percent and set an annual low Friday on reports that an E. coli outbreak linked to its restaurants had spread.

Amazon rose $10.54, or 1.6 percent, to $678.99 days before Black Friday. Macy's, which like many retailers has taken a beating on fears the holiday shopping season will be weak, rose $1.44, or 3.7 percent, to $40.04.

Tuesday morning, the Conference Board will release its latest consumer confidence report. That will give investors more insight into how consumers are feeling and how much they may spend shopping.

Benchmark U.S. crude fell 15 cents, or 0.4 percent, to close at $41.75 a barrel in New York. Brent crude, which is used to price international oils, rose 17 cents, or 0.4 percent, to $44.83 a barrel in London.

Heating oil edged up 0.3 cents to $1.374 a gallon. Wholesale gasoline added 2.3 cents to $1.313 a gallon. Natural gas rose 6.5 cents, or 3 percent, to $2.21 per 1,000 cubic feet.

Metals prices are mired in a slump that has taken them to their lowest prices in six years. That continued Monday, as gold fell $9.50, or 0.9 percent, to $1,066.80 an ounce and silver lost six cents, or 0.5 percent, to $14.03 an ounce. Copper slid 3.4 cents, or 1.7 percent, $2.02 per pound.

U.S. government bond prices rose slightly. The yield on the 10-year Treasury note fell to 2.24 percent from 2.26 percent. The dollar rose to 122.85 yen from 122.84 yen.