Toronto's main stock index bounced back from a steep early loss on Tuesday as energy shares turned positive on higher oil prices and bank shares stabilized on some better-than-expected U.S. earnings.

U.S. crude futures shot up more than 2 percent, making Suncor Energy  one of the biggest heavyweight gainers on the Toronto market, up 1.2 percent at C$30.12. Canadian National Railway  also rallied, rising 1.8 percent to C$73.80 after it said it has bought more energy-efficient equipment to improve service.

The TSX index took its cue from U.S. stock indexes, which jumped after Bank of America  reported a third-quarter profit that was lifted by accounting gains and asset sales.

We've been following the S&P earnings on a daily basis and so far as we can tell, most companies are meeting or beating expectations, said David Baskin, portfolio manager and president of Baskin Financial Services.

I think people are recognizing that even with the stresses with Europe and all of the other things people are worried about, basically companies are making money and they're worth buying at this price.

Also on Tuesday, Goldman Sachs Group  reported a rare loss but said it was moving to cut costs, including employee pay.

At 12:44 p.m. (1644 GMT), the Toronto Stock Exchange's S&P/TSX composite index was up 29.90 points, or 0.25 percent, at 11,952.94, reversing an early loss of more than 1 percent to a one-week low. Six of the 10 sectors were stronger.

Financial shares were flat, but some banks were in positive territory. Royal Bank of Canada , the country's biggest lender, was up 0.3 percent at C$47.62.

Among the decliners, gold-mining shares dragged 0.6 percent as the price of bullion looked set for its biggest one-day fall in two weeks. But golds too were off earlier lows.

Barrick Gold  lost 1.6 percent to C$47.50, Goldcorp  fell 1.4 percent to C$47.44, and Silver Wheaton  dropped 2.4 percent to C$31.39.

Investors remained cautious after Moody's said it may slap a negative outlook on France's credit rating in the next three months, and data showed China's annual gross domestic product expanded at its slowest pace since 2009 in the latest quarter.