U.S. stocks finished mostly higher Tuesday as weeks of pronounced up-and-down trading, much of it related to trade tensions, gave way to smaller moves. Technology companies, retailers, and U.S.-focused companies kept rising while banks fell with interest rates.

On Tuesday:

The S&P 500 gained 1.93 points, or 0.1 percent, to 2,748.80.

The Dow Jones industrial average lost 13.71 points, or 0.1 percent, to 24,799.98.

The Nasdaq composite jumped 31.40 points, or 0.4 percent, to 7,637.86.

The Russell 2000 index of smaller-company stocks advanced 11.25 points, or 0.7 percent, to 1,664.63.

For the week:

The S&P 500 is up 14.18 points, or 0.5 percent.

The Dow is up 164.77 points, or 0.7 percent.

The Nasdaq is up 83.53 points, or 1.1 percent.

The Russell 2000 is up 16.64 points, or 1 percent.

For the year:

The S&P 500 is up 75.19 points, or 2.8 percent.

The Dow is up 80.76 points, or 0.3 percent.

The Nasdaq is up 734.47 points, or 10.6 percent.

The Russell 2000 is up 129.11 points, or 8.4 percent.