by Aleksandra Sagan, The Canadian Press Posted Feb 26, 2016 9:33 am MDT Last Updated Feb 26, 2016 at 3:32 pm MDT AddThis Sharing ButtonsShare to TwitterTwitterShare to FacebookFacebookShare to RedditRedditShare to 電子郵件Email TORONTO – The Toronto stock market closed with a modest gain Friday but remained in the red for the week as a whole after an early triple-digit advance evaporated.Canada’s main market was well off gains earlier in the day as oil prices turned negative.The Toronto Stock Exchange S&P/TSX composite index finished the day’s trading up 44.19 points at 12,797.79, giving it a slight loss for the week of 15.61 points.The commodity-sensitive loonie rose slightly as well, up 0.15 of a U.S. cent to an even 74 cents US.Michael Greenberg, a portfolio manager at Franklin Templeton Solutions, said higher oil prices early in the day helped drive up the S&P/TSX as energy stocks rose significantly.However, those gains began eroding as the April contract for benchmark U.S. crude oil began falling from near US$34 a barrel to close down down 29 cents at US$32.78.The rise in oil prices may have come from expectations that the G20 meeting in Shanghai could lead to some fiscal policy co-ordination, Greenberg said.It’s unclear what caused the oil to fall later in the day, but energy markets have been very volatile recently, something Greenberg expects will level out as expected investment and production cuts by oil companies bring supply and demand more into balance.Base metals miners were among the biggest gainers as the May copper contract advanced 5.2 cents to US$2.125 a pound.Elsewhere in commodities, the April contract for natural gas was unchanged at US$1.79 per mmBtu, while April gold shed $18.40 to settle at US$1,220.40 a troy ounce.U.S. indexes were mixed, with the Dow Jones industrial average losing 57.32 points to 16,639.97 and the S&P 500 falling 3.65 points to 1,948.05. The Nasdaq gained 8.27 points to 4,590.47.Still, all three indexes closed up about 1.5 per cent for the week, their second straight weekly gain.The relatively flat showing in New York came despite encouraging economic news from the Commerce Department, which said U.S. gross domestic product grew at an annual rate of one per cent in the fourth quarter.That was an improvement over earlier estimates of 0.7 per cent and better than the 0.4 per cent growth economists had expected. However, it remained only half of the third quarter’s two-per-cent growth rate.In a separate report, Commerce said consumer spending increased 0.5 per cent in January, the best showing since May and far higher than December’s 0.1 per cent gain.Also at the G20 meeting, the governor of China’s central bank, Zhou Xiaochuan, said China would not devalue its currency for the sake of export competitiveness. The potential for China to devalue its currency has remained a source of concern for investors.— With files from the Associated PressFollow @AleksSagan on Twitter. TSX posts modest advance, remains in the red for the week; New York mixed