Another spurt higher for Apple and other technology stocks helped the Standard & Poor’s 500 set a new record on Friday, and the index closed out an eighth straight week of gains.

On Friday:

The Standard & Poor’s 500 index rose 7.99 points, or 0.3 percent, to 2,587.84.

The Dow Jones industrial average rose 22.93 points, or 0.1 percent, to 23,539.19.

The Nasdaq composite climbed 49.49 points, or 0.7 percent, to 6,764.44.

The Russell 2000 index of smaller-company stocks fell 1.64 points, or 0.1 percent, to 1,494.91.

For the week:

The S&P 500 is up 6.77 points, or 0.3 percent.

The Dow is up 105.00 points, or 0.5 percent.

The Nasdaq is up 63.17 points, or 0.9 percent.

The Russell 2000 is down 13.41 points, or 0.9 percent.

For the year:

The S&P 500 is up 349.01 points, or 15.6 percent.

The Dow is up 3,776.59 points, or 19.1 percent.

The Nasdaq is up 1,381.32 points, or 25.7 percent.

The Russell 2000 is up 137.78 points, or 10.2 percent.