Major indexes ended higher on Wall Street Friday but not enough to erase the market’s losses from earlier in the week.

The S&P 500 added 0.8% but still posted a weekly loss after two weeks of gains. The benchmark index set a record high on Monday.

Trading was mostly subdued with earnings reporting season winding down for U.S. companies and relatively few economic reports.

On Friday:

The S&P 500 rose 35.87 points, or 0.8%, to 4,441.67.

The Dow Jones Industrial Average rose 225.96 points, or 0.6%, to 35,120.08.

The Nasdaq rose 172.87 points, or 1.2%, to 14,714.66.

The Russell 2000 index of smaller companies rose 35.18 points, or 1.6%, to 2,167.60.

For the week:

The S&P 500 fell 26.33 points, or 0.6%.

The Dow fell 395.30 points, or 1.1%.

The Nasdaq fell 108.24 points, or 0.7%.

The Russell 2000 fell 55.51 points, or 2.5%.

For the year:

The S&P 500 is up 685.60 points, or 18.3%.

The Dow is up 4,513.60 points, or 14.7%.

The Nasdaq is up 1,826.38 points, or 14.2%.

The Russell 2000 is up 192.74 points, or 9.8%.