Stocks closed higher Friday, extending a record-setting drive for major indexes.

The Standard & Poor's 500 index and Dow Jones industrial average closed out their sixth straight week of gains. Both indexes also finished at record highs for the fifth day in a row.

Banks and technology companies had some of the biggest gains as investors cheered strong quarterly results. The Senate's passage of a budget bill raised traders' expectations of an easier path for the White House's tax cut proposal.

On Friday:

The S&P 500 index rose 13.11 points, or 0.5 percent, to 2,575.21.

The Dow gained 165.59 points, or 0.7 percent, to 23,328.63.

The Nasdaq composite added 23.99 points, or 0.4 percent, to 6,629.05.

The Russell 2000 index of smaller-company stocks picked up 7.20 points, or 0.5 percent, to 1,509.25.

For the week:

The S&P 500 is up 22.04 points, or 0.9 percent.

The Dow is up 456.91 points, or 2 percent.

The Nasdaq is up 23.25 points, or 0.4 percent.

The Russell 2000 is up 6.59 points, or 0.4 percent.

For the year:

The S&P 500 is up 336.38 points, or 15 percent.

The Dow is up 3,566.03 points, or 18 percent.

The Nasdaq is up 1,245.94 points, or 23.2 percent.

The Russell 2000 is up 152.12 points, or 11.2 percent