TORONTO - The Toronto stock market closed slightly higher, thanks to a late session runup in financial stocks.

Meanwhile, traders hoped that Greece is close to arriving at a deal that will see it get a crucial second bailout to stave off bankruptcy.

The S&P/TSX composite index rose 8.61 points to 12,521.02, weighted down by lower mining stocks, while the TSX Venture Exchange was up 2.41 points to 1,665.74. The Canadian dollar was down 0.13 of a cent to 100.39 cents US.

U.S. markets advanced with the Dow industrials adding 5.75 points to 12,883.95. The Nasdaq composite index jumped 11.78 points to 2,915.86 while the S&P 500 index was up 2.91 points to 1,349.96.

Greece has been kept solvent for the last two years by C110 billion in international rescue loans. But it needs to get its hands on another C130 billion. Otherwise, it will not have enough money to pay off a big bond redemption on March 20.

A default on the country's massive debts would create havoc in the financial system. However, in order to get the money, Greek coalition leaders must agree on a new slate of tough austerity measures. On Wednesday, the leaders held talks with Greece's prime minister to review a draft deal on steep cutbacks demanded by creditors.

Also, a meeting of eurozone finance ministers will go ahead in Brussels on Thursday evening to discuss the second massive bailout for Greece -- a key indication that a deal is close.

Greece has already accepted a demand to fire up to 15,000 workers in the public sector 2012, but is under pressure to impose deeper cuts, including reductions in pension payments and the minimum wage.

Hopes for a resolution to the Greece issue were raised after The Wall Street Journal said that the European Central Bank is prepared to contribute to lightening Greece's debt burden. According to the report, the ECB would essentially give up on profits that it stands to gain on its Greek bond holdings by handing them over to the European bailout fund, which then will sell them back to Greece. Athens would gain billions in the deal.

However, Dow Jones Newswires later reported that the ECB may hold off on helping Greece until after other key elements of its ongoing debt negotiations fall into place.

The financials sector was ahead 0.45 per cent with Bank of Montreal (TSX:BMO) ahead 48 cents to $58.60 while Royal Bank (TSX:RY) climbed 35 cents to $53.93.

The gold sector led decliners, down about 0.75 per cent as bullion turned negative while the April contract faded $17.10 to US$1,731.30 an ounce. Barrick Gold Corp. (TSX:ABX) lost 21 cents to C$48.92 while Goldcorp Inc. (TSX:G) fell 61 cents to $46.97.

The base metals group lost 0.52 per cent even as March copper in New York closed up three cents to US$3.89 a pound amid news that China's government will increase support for building affordable houses. China is the world's biggest consumer of the metal, which is viewed as a bellwether for the global economy as it is used in so many businesses.

Copper has been on a tear, surging 14 per cent so far this year.

"I don't know if copper was the worst performer but it certainly was among the worst performers last year," said Kate Warne, Canadian markets specialist at Edward Jones in St. Louis.

"So in the same way that last year we saw all of the riskier investments perform quite poorly, that's why the TSX did so poorly compared to other developed markets, I think we're seeing in January and now in early February the reversal of all those concerns from last year."

Teck Resources (TSX:TCK.B) was down 85 cents to $40.75.

The TSX energy sector drifted 0.12 per cent lower while oil prices moved off early levels after the U.S. Energy Information Administration reported a small rise in crude inventories last week. The March crude contract on the New York Mercantile Exchange rose 30 cents to US$98.71. Prices had earlier moved as high as US$100.09 after the American Petroleum Institute said Tuesday that crude inventories fell by 4.5 million barrels last week.

Canadian Natural Resources (TSX:CNQ) was down 60 cents to C$37.92 and Canadian Oil Sands (TSX:COS) lost 23 cents to $23.60.

Traders also took in earnings news from a variety of sectors.

WestJet (TSX:WJA) said it is raising its dividend by 20 per cent to six cents a share. The carrier also reported that profits fell 4.3 per cent in the fourth quarter to $35.6 million. Revenue grew 12.9 per cent to $721.5 million and the airline also reported that it will launch a regional carrier to give it a presence in smaller markets where competitor Air Canada is currently the sole operator. WestJet shares gained 55 cents to $13.65.

Fertilizer producer Agrium Inc. (TSX:AGU) said quarterly profits increased 43 per cent to US$193 million in the fourth quarter. Agrium's sales were up 32 per cent to $3.18 billion and its shares were up $1.53 to $82.63.

TMX Group Inc. (TSX:X) said its profits dropped 21 per cent to $52.7 million in the fourth quarter. Revenue dropped seven per cent to $161.7 million from $174.1 million. TMX Group chief financial officer Michael Ptasznik said the results reflect "the slowdown in listing and equity trading markets during the fourth quarter." TMX shares slipped 17 cents to $41.73.