* TSX ends down 6.41 points at 12,147.28 * TSX closes week up 0.9 percent * First weekly gain in 8 weeks By Claire Sibonney TORONTO, April 20 (Reuters) - Toronto's main stock index ended little changed o n F riday but racked up its first weekly gain in eight weeks on improving sentiment about the domestic and global economies. Performance on Friday was mixed, with six of the 10 in negative territory. On the downside, Barrick Gold fell 1.9 percent to C$39.96, Suncor Energy lost 1.4 percent to C$30.99 and Bank of Nova Scotia slipped 0.5 percent to C$54.75. Key names on the upside included Potash Corp, up 1.1 percent to C$43.61, Cameco Corp, which jumped 4.5 percent to C$22.01, and Enbridge Inc, up 0.9 percent to C$39.59. "We actually outperformed the S&P marginally this week, so all in all it has not been a bad week," said Elvis Picardo, strategist and vice-president of research at Global Securities in Vancouver. Helping global confidence on Friday, an improvement in German business sentiment countered nervousness about the euro zone debt crisis and solid North American corporate results propelled what has been a mostly positive earnings season. The encouraging tone in markets started earlier in the week after the Bank of Canada sounded more hawkish than expected, raising its economic growth forecasts for the first three quarters of 2012. The International Monetary Fund also said global growth is slowly improving as the U.S. recovery gains traction and dangers from Europe recede. "Both (the Bank of Canada and the IMF) struck a slightly positive note ... both of them gave grounds for encouragement to investors," added Picardo. "Anything that hints to improving global growth prospects tends to reflect well on the TSX." The Toronto Stock Exchange's S&P/TSX composite index ended down 6.41 points, or 0.05 percent, at 12,147.28. For the week, the index was up 0.9 percent, following a seven-week fall. "Some people are starting to look at some of these commodity stocks, they feel they've been oversold the last few weeks and they're starting to pick some entry levels in them," said Bruce Latimer, trader at Dundee Securities. On the data front on Friday, the influential German Ifo survey unexpectedly rose for the sixth month in a row in April in a sign that Europe's largest economy continues to outpace peers and shrug off persistent worries about the euro zone debt crisis. In individual company news, Canadian Pacific Railway , Canada's second-biggest railway, which is fighting a proxy battle with its biggest shareholder, rose 0.6 percent to C$76.45 after reporting soaring profit and efficiency gains. In the United States, the S&P 500 was buoyed by solid earnings from McDonald's, General Electric and Microsoft.