TORONTO -- The Toronto stock market closed modestly higher Wednesday as commodity prices rose amid stronger than expected trade figures from China.

The S&P/TSX composite index gained 19.5 points to 13,900.49, held back by sliding gold stocks.

The Canadian dollar was ahead 0.16 of a cent to 90.93 cents US.

U.S. indexes were mainly lower following substantial gains Tuesday after both houses of Congress voted to extend the U.S. debt ceiling without any spending conditions. The Dow Jones industrial average slipped 30.83 points to 15,963.94, the Nasdaq gained 10.24 points to 4,201.29 while the S&P 500 was 0.48 of a point lower at 1,819.27.

Markets were also relieved after the new head of the U.S. Federal Reserve vowed a continuation of low interest rates. Janet Yellen said that while she thinks the U.S. economy is strong enough to weather a cutback in a key stimulus program, rates should stay low to support a still lacklustre economy.

Meanwhile, data showed that China's trade growth accelerated in January as imports rose 10 per cent to $107.2 billion, up from December's 8.3 per cent growth. Exports rose 10.6 per cent to $126.7 billion, more than double the previous month's 4.3 per cent expansion and the trade surplus widened to $31.9 billion. All three numbers beat expectations.

"Without a doubt, I think it's a huge positive," said John Stephenson, a portfolio manager at First Asset Funds. "We think, in general, the market looks good."

Stephenson said that is because "the U.S. has had the best earnings season in two years, U.S. economic growth is likely to be three per cent plus, that translates into over 7.5 per cent earnings growth, maybe more. And then you have share buybacks."

There was major acquisition activity as Mexico's Grupo Bimbo announced it is buying all the shares of Canada Bread Co. Ltd. (TSX:CBY) in a deal worth $1.83 billion or $72 a share. Maple Leaf (TSX:MFI) currently holds 90 per cent of Canada Bread's outstanding shares. Maple Leaf shares slipped 142 cents to $15.70 while Canada Bread ran up $4.94 to $72.20.

On the earnings front, Air Canada (TSX:AC.B) posted quarterly earnings ex-items of $3 million or one cent a share, missing expectations of 12 cents. The carrier also warned that this year's first quarter will continue to feel the impact of weather-related costs and the effect of the lower loonie. Its shares plunged more than 20 per cent to $6.22.

Rogers Communications Inc. (TSX:RCI.B) fell $2.41 to $43.28 as the media and telcom company posted adjusted earnings of $347 million or 69 cents a share, missing estimates by six cents. Revenue of $3.24 billion also missed estimates of $3.3 billion while the company upped its quarterly dividend by five per cent.

The Chinese data helped March crude on the New York Mercantile Exchange climb 43 cents to US$100.37 a barrel and the energy sector led advancers, up 1.24 per cent.

Financials were also strong, up 0.69 per cent.

The base metals group climbed 0.35 per cent while March copper gained four cents to US$3.26 a pound.

The gold sector was the major decliner, down about 3.25 per cent while April gold was ahead $5.20 to US$1,295 an ounce.