Canadian stocks ended slightly lower on Wednesday, weighed down by sharply weaker energy issues, as oil prices slid and investors remained cautious about Europe's debt crisis.

After hitting a two-month high on Tuesday, the TSX gave back a bit of its gains after ratings agency Fitch urged more action by European policymakers to prevent a cataclysmic collapse of the euro, which put a damper on broader risk sentiment and oil prices in particular.

But by the end of the day, most TSX sectors had turned positive, while Wall Street held near recent five-month highs, as markets awaited key bond market tests for Europe in the next two days, which could determine the direction of the euro zone crisis. .N

I think the consensus really is that the Europeans are finally going to come to grips with this sovereign debt problem that they have, and people are hoping for the best ... the mood is generally more positive to start this year, said John Kinsey, portfolio manager at Caldwell Securities.

The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE ended down 9.72 points, or 0.08 percent, at 12,260.94.

Heavyweight financials and materials issues climbed, helped by higher base metal and gold prices.

The only sector down materially was energy, off 1.6 percent as oil prices retreated. Among the group's biggest decliners, Canadian Natural Resources (CNQ.TO: Quote) dropped 3 percent to C$38.31, Enbridge (ENB.TO: Quote) lost 1.7 percent to C$36.80 and Cenovus Energy (CVE.TO: Quote) was down 1.6 percent to C$34.38.

U.S. crude fell more than 1 percent but still settled above $100 a barrel. The recent spike in oil prices has been fueled by threats from Iran to choke off supplies of Gulf oil. The United States warned that its navy was ready to open fire to prevent any blockade of the strategic Strait of Hormuz, and many analysts say Iran's threats have only amounted to saber-rattling.

Oil has had a good run ... I don't think anybody really believed anything was going to happen, it was really just jaw-boning, added Kinsey.

Looking ahead, investors are focused on Spain, which sells up to 5 billion euros of 2015 and 2016 paper on Thursday, just hours before a European Central Bank's first monetary policy announcement and interest-rate decision of 2012. Italy offers up to 4.75 billion euros of five-year bonds on Friday.

Despite continued worries about Europe, TSX financial stocks were among the most influential gainers. Royal Bank of Canada (RY.TO: Quote) rose 0.3 percent to C$52.61.

Canadian banks maintained their dividends during the recent financial crisis, and most have resumed raising their payouts over the past year, helping confidence in the sector.

In this environment, yield has a lot of value because of the volatility of the market, said Marc-Andre Robitaille, president and portfolio manager at Robitaille Asset Management in Montreal.

If investors have comfort that the economic situation (in Europe) won't affect the earnings of the banks too much then the banks might do well because of their yields.