NEW YORK (Reuters) - U.S. stocks edged lower on Tuesday as quarterly results from banks added to concerns about lower interest rates dampening their profits, while comments from U.S. President Donald Trump on trade also dragged down Wall Street’s major indexes.

JPMorgan Chase & Co JPM.N and Wells Fargo & Co WFC.N beat quarterly profit estimates but reported weaker net interest income, pointing to rising deposit costs. Those results followed Citigroup Inc's C.N results on Monday, in which the bank reported a drop in its net interest margin.

JPMorgan shares erased early losses to end 1.1% higher. Wells Fargo shares, however, slipped 3.0% as the bank tempered its outlook for cutting costs.

“The expectation is the yield curve is going to remain flat, so you’re going to still continue to see net interest margins compress, and that’s going to hurt profitability,” said Michael O’Rourke, chief market strategist at JonesTrading in Greenwich, Connecticut. “There’s not a lot of expected upside to Q3 and Q4.”

Stocks also moved lower after Trump said there was a long way to go with China on trade and threatened to put tariffs on another $325 billion of Chinese goods.

The major indexes briefly pared losses after Federal Reserve Chair Jerome Powell reiterated that the central bank would “act as appropriate” to keep the U.S. economy humming, but they later moved back to their previous levels.

“In a really quiet market, a headline like this has a magnified effect, so even if it’s not something investors don’t already know, it can move the market with ease,” said Michael Antonelli, market strategist at Robert W. Baird in Milwaukee of Trump’s comments.

Slideshow ( 5 images )

Shares of Goldman Sachs Group Inc GS.N, which also announced results, rose 1.9%. Goldman Sachs is considered the least rate-sensitive of the three major banks that gave quarterly reports on Tuesday.

The Dow Jones Industrial Average .DJI fell 23.53 points, or 0.09%, to 27,335.63, the S&P 500 .SPX lost 10.26 points, or 0.34%, to 3,004.04 and the Nasdaq Composite .IXIC dropped 35.39 points, or 0.43%, to 8,222.80.

Johnson & Johnson JNJ.N shares slipped 1.6% after the diversified healthcare company warned that competition from generic and copycat drugs could impact its third-quarter results. Johnson & Johnson was the second-biggest drag on the S&P 500.

Shares of J.B. Hunt Transport Services Inc JBHT.O jumped 5.6%, the greatest percentage gain among S&P 500 stocks, after the trucking company posted strong quarterly performance in its second-largest unit DCS, which provides final-mile delivery.

The rise in J.B. Hunt shares helped lift the Dow Jones Transportation Average .DJT 1.8% and aided a 0.7% rise in industrials .SPLRCI.

In economic news, a better-than-expected June retail sales report pointed to strong consumer spending. The data did not change the expectations of a rate cut this month, though it lowered hopes of an aggressive cut.

Declining issues outnumbered advancing ones on the NYSE by a 1.06-to-1 ratio; on Nasdaq, a 1.23-to-1 ratio favored decliners.

The S&P 500 posted 58 new 52-week highs and one new low; the Nasdaq Composite recorded 76 new highs and 70 new lows.

Volume on U.S. exchanges was 6.18 billion shares, compared to the 6.71 billion average for the full session over the last 20 trading days.