Stocks closed higher Friday, nudging the benchmark S&P 500 index and the Nasdaq composite to record highs for the second time in a week.

The latest milestones came as investors weighed a mixed bag of corporate earnings. They also drew encouragement from a government report estimating that the U.S. economy grew at a better-than-expected 3.2% annual rate in the first quarter.

On Friday:

The S&P 500 rose 13.71 points, or 0.5%, to 2,939.88.

The Dow Jones Industrial Average gained 81.25 points, or 0.3%, to 26,543.33.

The Nasdaq composite added 27.72 points, or 0.3%, to 8,146.40.

The Russell 2000 index of smaller company stocks climbed 16.20 points, or 1%, to 1,591.82.

For the week:

The S&P 500 rose 34.85 points, or 1.2%.

The Dow fell 16.21 points, or 0.1%.

The Nasdaq gained 148.34 points, or 1.9%.

The Russell 2000 added 26.07 points, or 1.7%.

For the year:

The S&P 500 is up 433.03 points, or 17.3%.

The Dow is up 3,215.87 points, or 13.8%.

The Nasdaq is up 1,511.12 points, or 22.8%.

The Russell 2000 is up 243.26 points, or 18%.