The Toronto stock market closed at its highest level in almost six months Wednesday as commodity stocks ran ahead despite weak European and Chinese economic data.

Gains in energy and mining stocks helped take the S&P/TSX composite index up 77.9 points to 12,701.26 its highest close since early September, 2011, while the TSX Venture Exchange gained 6.32 points to 1,684.95.

The Canadian dollar closed below parity for the first time since the end of January, down 0.38 of a cent to 99.96 cents US.

U.S. markets were weak amid strong housing data that showed sales of previously occupied homes are at their highest level since May 2010.

The National Association of Realtors said Wednesday that resales increased 4.3% last month to a seasonally adjusted annual rate of 4.57 million. The supply of homes on the market has plunged to 2.3 million, the lowest level since March 2005.

New York’s Dow Jones industrials closed down 27.02 points to 12,938.67. The Nasdaq composite index dropped 15.4 points to 2,933.17 while the S&P 500 index was 4.55 points lower to 1,357.66.

The TSX ran ahead despite a fairly weak Chinese manufacturing survey.

The preliminary reading of HSBC’s China manufacturing index rose from 48.8 in January to 49.7 in February. But the number was still below the 50-level that signifies expansion, raising hopes that China could embark on further more stimulus measures to encourage growth. The TSX gained 165 points Tuesday after China’s central bank moved over the weekend to cut banks’ reserve ratios to loosen up lending.

Other data indicated that the European Union area will likely not be able to avoid slipping into recession.

The eurozone composite purchasing managers index fell to 49.7 during February. The manufacturing PMI rose less than expected to 49, still in contraction territory. The services PMI fell a point to 49.4, against economists expectations for a small increase.

“The world economy is still somewhat fragile, even though we are seeing better economic numbers,” observed Chris Kuflik, investment adviser at ScotiaMcLeod in Montreal.

Despite the economic news, the TSX base metals sector was ahead more than one per cent with April copper shedding earlier losses to close unchanged at US$3.83 a pound after surging 13 cents on Tuesday.

Teck Resources (TSX:TCK.B) was ahead $1.11 to $40.55 and Ivanhoe Mines (TSX:IVN) climbed 29 cents to $16.94.

The gold sector was ahead about two per cent with bullion up $13 to a three-month high of US$1,771.30 an ounce. Goldcorp Inc. (TSX:G) climbed $1.10 to $49.26 while Barrick Gold Corp. (TSX:ABX) advanced $1.23 to $49.48.

The TSX energy sector was ahead 0.85% as the April crude contract on the New York Mercantile Exchange added three cents to a nine-month high of US$106.28 a barrel.

Oil has jumped from US$96 earlier this month amid escalating tension between Western powers and Iran.

“The price of oil right now is mainly due to geopolitical events,” added Kuflik. He and other analysts point to the sharp rise in oil prices as something which could cause problems for the economic recovery.

“When you start to get to US$120 a barrel, it acts as a tax on consumers.”

Suncor Energy (TSX:SU) improved by 87 cents to $35.61 Talisman Energy Inc. (TSX:TLM) shares added 41 cents to $14.26 as it embarked on a partnership with Mitsubishi Corp. to develop natural gas properties in Papua New Guinea.

A strong earnings report from Rogers Communications Inc. (TSX:RCI.B) helped push the telecom sector up 1.2%. Its shares advanced 38 cents to $38.15 after it said it is increasing its quarterly dividend by 11% to 39.5 cents a share. Net income grew eight per cent to $327 million, or 61 cents per diluted share, from $302 million, or 50 cents per share. Operating revenue grew to $3.18 billion from $3.14 billion.

Meantime, rival telecom Telus Corp. (TSX:T) said Tuesday it would raise its dividend to 61 cents a share, up from 58 cents. Telus also said it wants to end its dual-class share structure by converting its non-voting shares into voting shares on a one-for-one basis. Telus shares rose $1.35 to $57.25.

The financials sector was the weakest component with Sun Life Financial (TSX:SLF) down 42 cents to $21.05 while Scotiabank (TSX:BNS) lost 45 cents to $53.71.

In other earnings news, Sears Canada Inc. (TSX:SCC) said Wednesday it earned $38.7 million or 36 cents per share in its latest quarter, which includes the key Christmas retail period. That compared with net profits of $82.7 million or 77 cents per share a year earlier. Its shares gained five cents to $12.

In the U.S., computer maker Dell Inc. fell shy of Wall Street’s profit estimates. Dell reported an adjusted fourth-quarter profit of 51 cents a share on revenue of US$16.03 billion, compared with 53 cents a share on revenue of $15.69 billion in the year-ago period.

Also overhanging markets was yet another downgrade for Greece.

The greenback rose against other currencies after Fitch ratings agency downgraded Greece further into junk status, from CCC to C following the announcement of the details of the country’s debt swap deal with private creditors.

The move came after eurozone countries signed off on a €130 billion bailout to head off a disorderly default by Greece.