TORONTO -- The Toronto stock market closed slightly lower Wednesday amid reminders of the slow pace of global economic activity and lower-than-expected earnings from the Bank of Montreal.

The S&P/TSX composite index finished well off session lows as gold and energy stocks erased early losses, coming back from a slide of almost 100 points to close down 17.91 points at 12,732.61.

BMO Financial Group (TSX:BMO) reported earning a second-quarter profit of $975 million or $1.42 per share, down from $1.03 billion or $1.51 per share a year ago, while its adjusted profit for the quarter was $997 million or $1.46 a share, three cents short of estimates. The bank's shares fell $1.20 to $62.50.

"It's a bit of a disappointment after coming off a couple of (positive) quarters and dividend increases," said Allan Small, senior adviser with DWM Securities.

"I'm still a believer in the banks in terms of being a good investment. I think when you're looking for a good yield, coupled with consistent growth over time I think our banks fit the bill."

The Canadian dollar advanced 0.4 of a cent to 96.6 cents US as the Bank of Canada said it was keeping its key rate unchanged at one per cent. The central bank added that "recent economic indicators suggest that growth in the first quarter was stronger than the bank projected in April."

The assessment came as the Organization for Economic Co-operation and Development said that Canada's growth will be slower than the United States, with a 1.4 per cent advance this year and 2.3 per cent next year. It expects the U.S. economy will register growth of 1.9 per cent in 2013 and 2.8 per cent in 2014.

Also, the International Monetary Fund trimmed its growth forecast for China this year from eight per cent to 7.75 per cent due to weaker global demand.

That was bad news for a resource-heavy market like the TSX. Chinese demand in the past has pushed commodity prices and stocks in energy and mining companies higher.

Worries that the U.S. Federal Reserve will start to reduce the amount of financial assets it buys also weighed on markets Wednesday.

The Dow Jones industrials also came back from the worst levels of the session, but still finished down 106.59 points at 15,302.8. Meanwhile, the Nasdaq slid 21.37 points to 3,467.52 and the S&P 500 index fell 11.7 points to 1,648.36.

Markets jumped Tuesday after reports showed that U.S. consumer confidence was improving and home prices were rising at their fastest rate in seven years.

Though investors initially welcomed the positive news, they then started to fret over the prospect of the Fed reducing the amount of assets it buys each month.

The Fed has been buying $85 billion of bonds a month in an effort to keep interest rates low and boost the U.S. economy. That stimulus has also been a major factor supporting the rally in stocks.

The base metals sector was the major TSX loser, down 0.57 per cent as the glum economic outlooks depressed copper prices with the July contract on the New York Mercantile Exchange losing two cents to US$3.30 a pound. Turquoise Hill Resources (TSX:TRQ) was off 13 cents to C$6.95 and Teck Resources (TSX:TCK.B) lost 32 cents to $27.90.

The financial sector was also a weight as Scotiabank (TSX:BNS) gave back 31 cents to $59.30 after the Bank of Canada's announcement did nothing to weaken the view that interest rates aren't going up until well into 2014 at the earliest.

"Whenever interest rates are low, it's bad for the banks because the spread in what they lend out and what it costs them is obviously very narrow," Small said.

Utilities were also lower with Algonquin Power & Utilities (TSX:AQN) down 27 cents to $7.69.

The gold sector was ahead about 3.7 per cent as June gold gained $12.40 to US$1,391.30 an ounce. Iamgold (TSX:IMG) gained 32 cents to C$5.51 while Goldcorp Inc. (TSX:G) jumped $1.13 to $28.70.

The energy sector edged up 0.23 per cent even as the July crude contract on the Nymex slid $1.88 to US$93.13 a barrel. Canadian Natural Resources (TSX:CNQ) was 50 cents higher at C$32.08.

Traders also digested major acquisition activity in the U.S. agribusiness. Chinese meat processor Shuanghui International Holdings Ltd. has agreed to take Smithfield Foods private for approximately US$4.72 billion. Smithfield is the world's biggest pork producer.