U.S. stocks rose Thursday as gains for technology companies and banks helped the market recover some of its losses from earlier in the week. However drug makers and distributors tumbled.

On Thursday:

The Standard & Poor's 500 index picked up 3.25 points, or 0.1 percent, to 2,560.40.

The Dow Jones industrial average climbed 71.40 points, or 0.3 percent, to 23,400.86.

The Nasdaq composite slid 7.12 points, or 0.1 percent, to 6,556.77.

The Russell 2000 index of smaller-company stocks advanced 3.98 points, or 0.3 percent, to 1,497.46.

For the week:

The S&P 500 is down 14.81 points, or 0.6 percent.

The Dow is up 72.23 points, or 0.3 percent.

The Nasdaq is down 72.28 points, or 1.1 percent.

The Russell 2000 is down 11.79 points, or 0.8 percent.

For the year:

The S&P 500 is up 321.57 points, or 14.4 percent.

The Dow is up 3,638.26 points, or 18.4 percent.

The Nasdaq is up 1,173.66 points, or 21.8 percent.

The Russell 2000 is up 140.33 points, or 10.3 percent.