The Canadian stock market closed higher Wednesday as U.S. Republicans and Democrats reached a last- minute deal to avoid hitting the U.S. debt limit. The Toronto Stock Exchange\'s benchmark S&P/TSX Composite Index rose 25.75 points, or 0.2 percent, to finish the day\'s trading at 12957.21. Canadian stock market surged as the U.S debt deal was reached hours before the debt limit deadline, at which point Washington would not be able to borrow money. The Senate and the House are to vote on the agreement later Wednesday. Commodities prices generally advanced following the news. The energy sector was ahead 0.6 percent as the November crude oil contract on the New York Mercantile Exchange erased early losses. Shares in Suncor Energy climbed 0.86 percent to 37.44 Canadian dollars apiece. Consumer staples led advancers with Loblaw Cos. Ltd., one of Canada\'s largest supermarket groups, up 2.3 percent to 47.09 Canadian dollars a share after the grocer said it was cutting its management and administrative staff by 275 employees as it tries to reduce expenses. The gold sector led decliners while December gold bullion in New York kept unchanged. Goldcorp. lost 2.24 percent to 24.41 Canadian dollars a share and Barrick Gold shed 1.25 percent to 18. 23 Canadian dollars. The industrials sector was slightly higher, up 0.1 percent. Investors are now turning part of their attention from the U.S. debt issue to the third quarter earnings reporting season. At closing, the Canadian dollar reached 0.9684 U.S. dollar at 5 p.m. local time (2100 GMT), up from 0.9637 U.S. dollar on Tuesday.