* TSX ends up 48.90 points, or 0.4 pct, at 12,579.61
* Five of 10 main sectors higher (Updates with details, comments)
By Claire Sibonney
TORONTO, Aug 17 (Reuters) - Toronto's main stock index ended moderately higher on Wednesday, outperforming its U.S. counterparts, as financials and miners rallied on the back of firm commodity prices and earnings expectations.
The TSX trimmed most of its early gains, however, as U.S. markets slipped into the red on a weak sales outlook for Dell DELL.O and other computer makers, which offset recent upbeat earnings from retailers. [.N]
Leading the index higher were some of the country's big banks, as quarterly earnings begin next week with consensus expectations for profit gains in the double digits.
Bank of Nova Scotia (BNS.TO) added 1.1 percent to C$54.01, Bank of Montreal (BMO.TO) advanced 1.2 percent to C$60.24, and Royal Bank of Canada (RY.TO) edged up 0.6 percent to C$51.68.
"The yields are pretty good on them and I don't think we'll get any dividend increases this quarter, but I think that a good set of earnings will waylay part of the nervousness that is in this market for the financials," said John Kinsey, portfolio manager at Caldwell Securities.
"Consensus earnings for the banks is up around 10-12 percent, I think they've been maybe oversold here on the basis of that."
The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE ended up 48.90 points, or 0.39 percent, at 12,579.61.
"Earnings of companies have been much better than the macroeconomic outlook, and had we been in a position with a stable macro economic outlook, the markets would be much higher ... stocks are cheap," said David Baskin, portfolio manager and president of Baskin Financial Services.
Five of the 10 main index groups ended higher, though the S&P/TSX composite pulled back sharply after rallying as much as 1.5 percent earlier in the session.
The materials group, home to miners and fertilizer producers, rose 0.7 percent. Kinross Gold (K.TO) jumped almost 3 percent to C$16.45 as bullion rose toward $1,800 an ounce. [GOL/]
Energy shares ended up 0.05 percent as persistent worries about economic growth curbed oil price gains. [O/R]
Suncor Energy (SU.TO) was the heaviest decliner, down 0.5 percent to C$31.73, followed by Canadian Oil Sands COS.TO, which dropped 1.5 percent to C$22.43.
($1=$0.98 Canadian) (Reporting by Claire Sibonney; editing by Peter Galloway)