Major U.S. stock indexes closed mostly higher Wednesday, ending near the record highs they reached last week.

Gains in several Big Tech companies, including Intel, Apple and Amazon, helped nudge the S&P 500 higher, even though most of the stocks in the index fell. Those gains outweighed losses in industrial, materials and other sectors.

Treasury yields stalled after rising sharply since the beginning of the year.

On Wednesday:

The S&P 500 rose 8.65 points, or 0.2%, to 3,809.84.

The Dow Jones Industrial Average fell 8.22 points, or less than 0.1%, to 31,060.47.

The Nasdaq composite added 56.52 points, or 0.4%, to 13,128.95.

The Russell 2000 index of smaller companies dropped 15.99 points, or 0.8%, to 2,111.97.

For the week:

The S&P 500 is down 14.84 points, or 0.4%.

The Dow is down 37.50 points, or 0.1%.

The Nasdaq is down 73.03 points, or 0.6%.

The Russell 2000 is up 20.31 points, or 1%.

For the year:

The S&P 500 is up 53.77 points, or 1.4%.

The Dow is up 453.99 points, or 1.5%.

The Nasdaq is up 240.67 points, or 1.9%.

The Russell 2000 is up 137.11 points, or 6.9%.