TORONTO — The Toronto stock market closed with a slight loss Tuesday amid further volatility in oil prices, but damage was limited by a strong run-up in gold stocks.The S&P/TSX composite index declined 23.88 points to 14,640.04 on the second-last trading day of the year.The energy sector fell one per cent even as February crude in New York gained 51 cents to US$54.12 a barrel ahead of the release Wednesday of the latest U.S. inventory levels from the Department of Energy. Crude futures are down about 50% since their 2014 high of $107.26 in June amid rising production and lower demand as a result of slowing economies in Europe and China. The rout in prices has pushed the TSX energy sector down about 20% this year as traders try to gauge just how low prices can go.“It’s a gigantic game of chicken that is going on right now,” said Craig Jerusalim, a portfolio manager at CIBC Asset Management, adding that OPEC is trying to slow the trajectory of growth in North American supply.“The U.S. has gone from (production of) six million barrels to 10 million barrels in about four years and that pace has them scared.”He believes that oil touching $50 and then bouncing right back up is not going to be enough. Jerusalim thinks OPEC needs to keep pricing low for at least six months and he is looking for production, capital expenditures and rig counts to come down.Oilfield service companies have been a major casualty of the plunge in oil prices. Shares in Civeo Corp. (NYSE:CVEO), which provides accommodations for energy company workers mainly in the Canadian oilsands region and in Australia, cratered $4.35 or 52 per cent to US$3.92 as it announced that falling oil prices would negatively impact earnings in 2015. The company also suspended its dividend.The Canadian dollar rose 0.16 of a cent to 86.15 cents US.New York markets were in the red amid mixed data covering American house prices and consumer confidence.The Dow Jones industrials declined 55.16 points to 17,983.07, the Nasdaq was down 29.47 points to 4,777.44 and the S&P 500 index gave back 10.22 points to 2,080.35.The U.S. Case Schiller home price index rose by a greater than expected 0.76% on a seasonally adjusted basis in October. Economists had looked for a rise of 0.4%. The year-over-year rate eased to an almost on-consensus 4.5%.And the Conference Board’s U.S. consumer confidence index came in at 92.6 in December, up from a November read of 88.7. Economists figured confidence would improve due to plunging gasoline prices, faster job creation and higher stock prices and had expected a reading of 93.9.Elsewhere on the TSX, financials were also a drag, down 0.6% while industrials fell 0.55%.The gold sector was the leading advancer in Toronto, up about 3.7% as a weaker U.S. dollar helped push February bullion up $18.50 to US$1,200.40 an ounce.The base metals group climbed 1.45% as March copper edged up three cents to US$2.85 a pound.