Rising energy stocks helped nudge the Standard & Poor’s 500 close to its record high, but drops for smaller stocks left U.S. indexes mixed on Wednesday.

On Wednesday:

The Standard & Poor’s 500 index rose 4.10 points, or 0.2 percent, to 2,579.36.

The Dow Jones industrial average gained 57.77 points, or 0.3 percent, to 23,435.01.

The Nasdaq composite fell 11.14 points, or 0.2 percent, to 6,716.53.

The Russell 2000 index of smaller-company stocks lost 9.99 points, or 0.7 percent, to 1,492.78.

For the week:

The S&P 500 is down 1.71 points, or 0.1 percent.

The Dow is up 0.82 points, or less than 0.1 percent.

The Nasdaq is up 15.27 points, or 0.2 percent.

The Russell 2000 is down 15.54 points, or 1 percent.

For the year:

The S&P 500 is up 340.53 points, or 15.2 percent.

The Dow is up 3,672.41 points, or 18.6 percent.

The Nasdaq is up 1,333.42 points, or 24.8 percent.

The Russell 2000 is up 135.65 points, or 10 percent.