Major stock indexes erased much of their early losses, leaving the market mixed at the end of trading Monday.

The S&P 500 rebounded from an early slide to finish barely out of the red, good enough for its third straight gain. Technology companies continued their steady march higher. Health care stocks also rose, getting closer to erasing their losses for the year.

Financial and industrial stocks accounted for much of the selling.

On Monday:

The S&P 500 inched up 0.52 points, or less than 0.1%, to 2,930.32.

The Dow Jones Industrial Average fell 109.33 points, or 0.4%, to 24,221.99.

The Nasdaq composite rose 71.02 points, or 0.8%, to 9,192.34.

The Russell 2000 index of small company stocks gave up 8.40 points, or 0.6%, to 1,321.24.

For the year:

The S&P 500 is down 300.46 points, or 9.3%.

The Dow is down 4,316.45 points, or 15.1%.

The Nasdaq is up 219.74 points, or 2.4%

The Russell 2000 is down 347.23 points, or 20.8%.