The Canadian dollar fell below 89 cents US on Friday, hitting a six-month low of 88.81 cents at the close of trading after ​ Canadian trade data missed expectations.

The loonie was down 0.72 cents in early trading, after Statistics Canada reported Canada had moved from a trade surplus in July to a trade deficit in August. The currency is down three cents US since the beginning of September.

At the same time, the U.S. was getting news of an improved labour market, with unemployment falling to 5.9 per cent, the lowest since July 2008.

That pushed up the U.S. dollar against most currencies and buoyed North American markets.

The Toronto Stock Exchange's S&P/TSX composite index was up 29.14 points at 14,789.78. That reversed three days of declines that saw the index at a four-month low.

In New York Friday, the Dow was up 206.97 points or 1.24 per cent at 17,009.69 and the Nasdaq up 45.43 points at 4,475.62 at the end of the day. The S&P 500 rose 21.73 to 1,967.90.

Markets seem to have discounted geopolitical tensions, including the violence in Hong Kong and the escalating fight against ISIS.

Commodity prices were weak as the November crude contract on the New York Mercantile Exchange was $1.46  lower  at $90.63 US a barrel while December copper remained at its low of $3 US a pound.  December gold bullion tumbled $20.20 to $1,194.90 US an ounce.

Falling commodity prices tend to hurt both the resource-heavy Toronto market and the loonie.

The energy sector has taken a pounding as the price of oil declined over the last three months. Lower oil prices make extraction from the Alberta oilsands less economically viable and the cancellation of two large projects has hurt sentiment.

As an oil exporter, Canada’s currency is vulnerable to falling oil prices. As oil sells in U.S. dollars, petroleum products are getting more expensive for the rest of the world. And opportunities to sell in the U.S. are constrained by the oil boom there and the difficulty of getting crude to market.

On the TSX, the financial sector rose as traders looked forward to earnings next week.

Even with the gains on Friday, the U.S. indexes ended more than half a per cent lower for the week, adding to losses last week.

The good news in the U.S. contrasts with troubling signs in Europe and China. The Chinese economy is slowing, and 18-country eurozone is teetering on another recession. 

The prospect of a two-speed global economy drove up the value of the U.S. dollar on Friday. The U.S. Dollar Index, which measures the dollar against six other major currencies, surged 1.3 per cent. The euro fell 1.2 per cent to $1.2515 while the dollar gained 1.2 per cent to 109.76 yen.

With files from the Canadian Press