Stock indexes closed mostly higher on Wall Street after a wobbly day of trading Friday as the S&P 500 notched its third straight weekly gain.

Health care, technology and utilities stocks accounted for much of the gains, outweighing losses in financial, energy and other sectors. Stocks overseas, oil and gold made relatively modest moves. Treasury yields were mixed.

On Friday:

The S&P 500 rose 9.16 points, or 0.3%, to 3,224.73.

The Dow Jones Industrial Average dropped 62.76 points, or 0.2%, to 26,671.95.

The Nasdaq Composite gained 29.36 points, or 0.3%, to 10,503.19.

The Russell 2000 index of small company stocks added 5.76 points, or 0.4%, to 1,473.32.

For the week:

The S&P 500 rose 39.69 points, or 1.3%.

The Dow gained 596.65 points, or 2.3%.

The Nasdaq lost 114.26 points, or 1.1%

The Russell 2000 added 50.64 points, or 3.6%.

For the year:

The S&P 500 is down 6.05 points, 0.2%.

The Dow is down 1,866.49 points, or 6.5%.

The Nasdaq is up 1,530.58 points, or 17.1%.

The Russell 2000 is down 195.15 points, or 11.7%.