TORONTO -- Rising gold and telecom stocks helped give the Toronto stock market a modest advance Tuesday.

The S&P/TSX composite index gained 27.42 points to 15,536.81.

The Canadian dollar was up 0.02 of a cent to 91.15 cents US.

Losses on U.S. markets picked up late in the afternoon with the Dow Jones industrials down 97.55 points to 17,013.87.

The Nasdaq gave back 40 points to 4,552.29 as Apple unveiled a wearable device. The Apple Watch marks its first major entry in a new product category since the iPad's debut in 2010.

It also launched a line of larger iPhones that will have a new, horizontal viewing mode to take advantage of larger displays. Apple also introduced a system for using the phone to make credit card payments at retail stores. Apple shares lost early momentum to shed 37 cents to $97.99.

The S&P 500 index was off 13.1 points at 1,988.44.

Meanwhile, the Scottish independence referendum scheduled for Sept. 18 has also grabbed market attention this week, particularly since a YouGov poll released on the weekend showed that the gap between the Yes and No sides had narrowed considerably.

A Yes vote in the referendum would plunge Britain into uncharted constitutional and economic waters. There is still optimism that the No side will prevail, but analysts point to what is perceived as a larger issue of whether the U.K. will stay in the European Union.

"Common sense, I think, will prevail," said Brian Belski, chief investment strategist at BMO Capital Markets, referring to the Scottish vote.

"I think there is some concern there but in levels of concern, there is a broader concern about the EU situation and the U.K. exiting the EU."

British Prime Minister David Cameron has given a "cast-iron" guarantee that there will be a referendum on the European Union in 2017 if he is still prime minister.

The gold sector was the biggest percentage gainer, up about 1.5 per cent as December bullion faded $5.80 to US$1,248.50 an ounce.

The telecom sector was up 0.44 per cent.

The energy sector also helped lift the TSX, up 0.36 per cent as the October crude contact on the New York Mercantile Exchange gained nine cents to US$92.75 a barrel.

After the markets closed Monday, Encana Corp. (TSX:ECA) announced that it is selling its remaining stake in PrairieSky Royalty Ltd. (TSX:PSK) in a deal valued at about C$2.6 billion. The company created PrairieSky earlier this year when it spun off a large portion of its royalty lands. Encana rose 80 cents to $25.50 while PrairieSky fell $1.69 to $36.40.

The base metals group was the leading TSX decliner, down one per cent as the December copper contract fell seven cents to US$3.10 a pound after weak Chinese import figures released Monday raised questions about domestic demand.

Copper prices have whipsawed in recent weeks, as investors weigh the possibility of lower demand from China against strong economic numbers from the U.S. Copper is widely used in manufactured goods and can be easily swayed by economic data.

In other corporate news, Canadian Tire (TSX:CTC.A) launched a program to allow shoppers to collect, manage and redeem Canadian Tire Money electronically on their smartphone or with a loyalty card in addition to the paper version of the retailer's popular currency. Its shares rose 46 cents to $114.37.