By Christopher Whittall

Technology shares rose while retailers tumbled, leaving U.S. stocks little changed overall.

Consumer-discretionary companies were among the worst performers in the S&P 500 after retailers including Macy's and Kohl's warned of weak holiday results.

Shares of Macy's, which said Wednesday that its same-store sales fell in November and December, fell 13%. Kohl's, which lowered its profit targets, fell 17%, while other retailers including Nordstrom, L Brands and Michael Kors fell more than 5% apiece.

Tech shares rose 0.4% in the S&P 500 and helped lift the Nasdaq Composite.

The Dow industrials fell 2 points, or less than 0.1%, to 19941 shortly after the opening bell. The S&P 500 fell less than 0.1% and the Nasdaq Composite edged up 0.2%.

Most markets started this year where 2016 left off, said Jeroen Blokland, a senior portfolio manager at Robeco, with rising equities reflecting investor expectations of an improving economy that could be further boosted by President-elect Donald Trump's expected policies of cutting taxes and increasing spending.

"Most people are trying to extend this positive sentiment from last year, but we do have some caution in the coming months something could turn," said Mr. Blokland, who is taking a neutral stance on equities right now.

Risks that could derail the stock market rally include disappointing corporate earnings or a re-emergence of concerns over China's economy, he said.

Elsewhere, China was in the spotlight again Thursday as the Chinese yuan rose sharply against the U.S. dollar, tracking an even more dramatic rise in the offshore yuan late Wednesday.

Still, the moves in the yuan barely caused a ripple in other markets, in contrast to the tremors caused by a sharp depreciation in the currency in early 2016 and August 2015.

Mark Dowding, co-head of investment-grade debt at BlueBay Asset Management, said the recent gains in the yuan should be viewed in the context of what he sees as a longer-term decline. He said China appeared to be reasserting control over the currency.

"The fact that the Chinese authorities are showing they're still on top of the situation and in control, if anything, should be relatively supportive of other risk assets," he said.

The rise in the yuan came amid broader dollar weakness Thursday following the release of the Federal Reserve minutes. Minutes from the Fed's December meeting, issued Wednesday, showed officials were unsure about the potential impact of President-elect Donald Trump's policies on the economy.

That sent the U.S. dollar lower against most other currencies, with the buck at one point hitting a two-month low against the Chinese yuan in offshore markets.

The WSJ Dollar Index, which measures the dollar against a basket of 16 other currencies, was down 0.6% Thursday. The yield on the 10-year Treasury note, which falls as prices rise, was 2.426% Thursday, according to Tradeweb, compared with 2.452% Wednesday.

Meanwhile, gold continued to gain as investors pared back expectations of a more aggressive Fed rate-increase cycle. Prices were recently up 1.2% at $1,178.80 an ounce.

Stocks in Europe were little changed, with gains in health-care and telecom shares offsetting losses in energy companies and utilities.

In Asia, Hong Kong's Hang Seng Index rose 1.5% after purchasing managers index reports from China and Hong Kong registered improvements. The Nikkei Stock Average ended down0.4% after rising 2.5% on Wednesday.

Hong Shen and Saumya Vaishampayan contributed to this article.

Write to Christopher Whittall at christopher.whittall@wsj.com

(END) Dow Jones Newswires

January 05, 2017 10:32 ET (15:32 GMT)

Copyright (c) 2017 Dow Jones & Company, Inc.