NEW YORK (Reuters) - U.S. stocks ended little changed on Thursday as the recent rally continued to stall following President Donald Trump’s latest comments on trade and the policies he will pursue.

The S&P 500 traded at levels it was six weeks ago, losing steam as investors focus on Trump’s priorities, such as restricting travel to the United States and rewriting trade deals.

Markets had run up sharply following Trump’s Nov. 8 election win on the expectation that tax cuts, deregulation and a fiscal stimulus would accelerate economic growth.

“The market had only priced in the potentially good type of policies like tax cuts,” said Arian Vojdani, investment strategist at MV Financial in Bethesda, Maryland.

“Now we’re seeing potential protectionist and populist sentiment really come out and take the front seat. That could be bad for the world economy and that’s why markets are taking a step back.”

The Dow Jones Industrial Average .DJI fell 6.03 points, or 0.03 percent, to 19,884.91, the S&P 500 .SPX gained 1.3 points, or 0.06 percent, to 2,280.85 and the Nasdaq Composite .IXIC dropped 6.45 points, or 0.11 percent, to 5,636.20.

Trump reiterated his concerns about the trade deal with Canada and Mexico and said he would like to speed up talks to either renegotiate or replace it.

Investors are also wary of the consequences of other of Trump’s comments, including labeling a refugee swap agreement with staunch ally Australia as a “dumb deal” and that “nothing is off the table” in dealing with Iran after it test-fired a ballistic missile.

“There’s a lot of noise and we have to try at best to look at fundamentals,” said Vojdani.

A trader works on the floor of the New York Stock Exchange (NYSE) shortly after the opening bell in New York, U.S., January 31, 2017. REUTERS/Lucas Jackson

Earnings of S&P 500 companies are estimated to have risen 7.5 percent during the last quarter of 2016 - the most in nine quarters, according to Thomson Reuters I/B/E/S data.

After the closing bell, Amazon AMZN.O shares fell 3.7 percent as the retailer's revenue missed analyst estimates. The company forecast a bigger-than-expected fall in operating income for the current quarter.

Facebook FB.O fell 1.8 percent during the regular session to $130.84 after hitting a record high of $135.49. Its results on Wednesday beat earnings and revenue expectations.

Macy's M.N shares rose 5.2 percent to $30.72. The New York Post reported the retailer's outgoing CEO Terry Lundgren has become open to offers from potential buyers. The stock hit a high of $31.06 and trading volume was 2.1 times the average over the last 10 days.

Mead Johnson Nutrition MJN.N jumped 21.4 percent after Reckitt Benckiser RB.L said it was in advanced talks to buy the company for $16.7 billion.

Ralph Lauren RL.N dropped 12.3 percent to $76.61 after it said Chief Executive Officer Stefan Larsson would leave following differences with the company's founder and chairman.

Economic data showed the U.S. labor market continues to tighten, while productivity is still weak.

Advancing issues outnumbered declining ones on the NYSE by a 1.23-to-1 ratio; on Nasdaq, a 1.10-to-1 ratio favored decliners.

The S&P 500 posted 17 new 52-week highs and 5 new lows; the Nasdaq Composite recorded 86 new highs and 24 new lows.

About 7.03 billion shares changed hands in U.S. exchanges, above the 6.75 billion daily average over the last 20 sessions.