* Canadian dollar falls 3.2 percent versus greenback
* Bonds rally on safe-haven bid
* Canada September wholesale trade rises unexpectedly
TORONTO, Nov 20 (Reuters) - The Canadian dollar lost 2-1/2 U.S cents against the U.S. dollar on Thursday as commodity prices weakened and global stock markets were routed.
Canadian bond prices surged as the weakness in stock markets made government debt more attractive.
The Canadian dollar ended the North American session at C$1.2935 to the U.S. dollar, or 77.31 U.S. cents, down from C$1.2526 to the U.S. dollar, or 79.83 U.S. cents, at Wednesday's close.
The currency is down more than 22 percent versus the greenback so far this year.
"With crude posting at sub-$50 and the TSX effectively melting away, the factors are all lined up for a weaker Canadian dollar," said Jack Spitz, managing director of foreign exchange at National Bank Financial.
Canada is the biggest supplier of oil to the United States, and the decline of U.S. crude oilto below $50 a barrel from a peak of over $147 in July has hurt the outlook for Canadian economic growth, and the Canadian dollar has fallen with it.
Commodity prices in general have taken a beating as the global economy inches closer to recession and demand falls.
The Toronto Stock Exchange's composite index, heavily weighted in commodity stocks, lost 9 percent of its value on Thursday as stock markets around the world declined.
Almost paradoxically, the U.S. dollar has been benefiting from the economic distress, as market players "deleverage", or repatriate funds.
Over the past several years, U.S. investors built up a large, overweight position in overseas stocks, and as risk aversion increases, many of them are pulling their money out of those markets and bringing it back to the United States, boosting the greenback.
The Canadian dollar is close to its October low of around C$1.30. If it passes that point, it will be at its weakest level since September 2004.
NBF's Spitz said that is a likely scenario.
"I don't think there's anything material in the way that's going to reverse it," he said. "Factors that would otherwise move the Canadian dollar stronger are few, fleeting, and far between."
Canadian bond prices rallied as the weakness in equities increased the allure of relatively safe government debt.
While rallying strongly, they still underperformed U.S. Treasuries, however.
"There's a massive flight to buying of U.S. Treasuries and a view that the U.S. economy is headed for a deeper recession than Canada is," said Sal Guatieri, senior economist at BMO Capital Markets.
On the economic data front, Canadian wholesale trade numbers for September surprised to the upside, rising 1.5 percent as auto sales rose .See [ID:nN20480398]
The market was expecting a 0.3 percent decline in the month, according to a Reuters poll.
The Canadian data did not move the markets as it was released at the same time as U.S. jobless claims figures, which were well below expectations.
Canadian inflation data for October is due on Friday.
The two-year bond rose 26 Canadian cents to C$101.92 to yield 1.783 percent. The 10-year bond rose C$1.12 to C$107.12 to yield 3.368 percent.
The yield spread between the two-year and 10-year bond was 172 basis points, up from 158 at the previous close.
The 30-year bond added C$2.20 to C$117.70 to yield 3.958 percent. In the United States, the 30-year Treasury yielded 3.578 percent, its lowest ever. (Editing by Peter Galloway)