The Toronto stock market closed lower Friday as traders played it safe going into a long weekend even as optimism picked up that Greece will get the bailout it needs to avoid triggering a default on debt next month.

The S&P/TSX composite index shed 27.29 points to 12,458.3 while the TSX Venture Exchange rose 10.03 points to 1,658.15. The Toronto stock market is closed Monday for Ontario’s Family Day holiday while New York markets are shut for Presidents’ Day.

The commodity-sensitive Canadian dollar was ahead 0.08 of a cent 100.43 US as oil closed at a nine-month high while early gains in copper and gold faded.

The loonie’s rise came amid signs of slightly higher price pressures. Statistics Canada reported that higher gasoline prices led to Canada’s annual inflation rate rising two notches to 2.5% in January.

As well, underlying core inflation — which excludes volatile items such as some fresh food and gasoline — rose to 2.1%, one tenth of a percentage point higher than the Bank of Canada’s target.

U.S. markets were mainly higher with the Dow industrials up 45.79 points to 12,949.87. The Nasdaq was down 8.07 points to 2,951.78 while the S&P 500 index rose 3.19 points to 1,361.23.

A spokesman for German Chancellor Angela Merkel said she and the leaders of Italy and Greece are “optimistic” that a second massive bailout for Greece can be agreed next week.

The 17 finance ministers of the countries that use the euro are meeting Monday to discuss the bailout.

The comment was the strongest indication yet that the meeting will bring some tangible decisions on the €130-billion rescue for Greece as well as a related €100 billion debt relief from private investors.

Toronto and New York markets had racked up strong triple-digit advances Thursday amid reports that the European Central Bank will swap its holdings of an estimated €50 billion of Greek government bonds for new bonds to ensure that it doesn’t take losses in a debt restructuring. The ECB bought most of the bonds at a deep discount while attempting to hold down Greek borrowing costs and would realize a profit on the exchange.

Traders were also encouraged by better than expected economic data on jobless insurance claims and an important index on manufacturing activity in the U.S. Northeast.

“There’s been a series of positive rumblings out of Europe,” said John Stephenson, portfolio manager at First Asset Funds Inc.

“And then you had this relatively strong U.S. news and then you have Europe seeming like they’re going to find a solution somehow to the crisis.”

The Toronto market ended the week ahead 0.55%.

The TSX gold sector led decliners, down about 1.6% as April gold gave back $3.40 to US$1,725 an ounce. Barrick Gold Corp. (TSX:ABX) gave back $1.17 to C$46.83 while Goldcorp Inc. (TSX:G) slipped 44 cents to $46.81.

Base metal stocks also weakened as March copper gave up early gains and fell eight cents to US$3.71 a pound. Teck Resources (TSX:TCK.B) was down $1.08 to C$38.30 while Ivanhoe Mines (TSX:IVN) fell 31 cents to $16.45.

Industrials led advancers, up 0.69% with Canadian Pacific Railway (TSX:CP) up 98 cents to $73.86.

The energy sector climbed 0.36% amid some major dealmaking as Encana Corp. (TSX:ECA) said it is selling its 40% interest in British Colombia gas assets to Japan’s Mitsubishi Corp. for $2.9 billion.

“They’re tight on cash so this helps them out a lot,” added Stephenson.

“They need a quality partner which they have with Mitsubishi. Gas prices have been in the toilet for a long time, they have this land that is doing nothing for them, they need someone to pony up some money to help them develop it.”

The energy giant also reported its quarterly loss narrowed to $246 million, down from $469 million a year ago and its shares slipped 18 cents to $19.97.

The March crude contract gained 93 cents to a nine-month high of US$103.24 barrel. Elsewhere in the sector, Canadian Natural Resources (TSX:CNQ) climbed 31 cents to C$37.38.

Crude has jumped from US$96 earlier this month as a surge in stock markets suggests investor confidence in the U.S. economic outlook is improving.

In other corporate news, pipeline and natural gas company Enbridge Inc. (TSX:ENB) reported fourth quarter net earnings grew slightly. Enbridge’s earnings were $335 million, or 44 cents per share, compared to $326 million a year ago and its shares fell $1.62 to $37.58.

Shares in Cott Corp. (TSX:BCB), one of the world’s largest soft drink producers, fell 29 cents to $6.48 as it reported it lost US$12 million or 12 cents a share for the three months ended Dec. 31. That compared with a net profit of profit of US$15 million or 16 cents in the year-earlier quarter as margins shrunk because of higher commodity costs.