Major indexes managed to eke out gains on Wall Street Thursday, even as most stocks fell following data showing an increase in the number of Americans who applied for unemployment aid last week.

Gains for big technology stocks, which have an outsize influence on indexes because of their gigantic values, were enough power a modest gain for the benchmark S&P 500 index and another all-time high for the Nasdaq composite.

Energy producers and financial companies had some of the sharpest drops. Treasury yields also fell, reflecting caution in the market.

On Thursday:

The S&P 500 rose 10.66 points, or 0.3%, to 3,385.51.

The Dow Jones Industrial Average gained 46.85 points, or 0.2%, to 27,739.73.

The Nasdaq composite picked up 118.49 points, or 1.1%, to 11,264.95.

The Russell 2000 index of small company stocks lost 7.76 points, or 0.5%, to 1,564.30.

For the week:

The S&P 500 is up 12.66 points, or 0.4%.

The Dow is down 191.29 points, or 0.7%.

The Nasdaq is up 245.65 points, or 2.2%.

The Russell 2000 is down 13.58 points, or 0.9%.

For the year:

The S&P 500 is up 154.73 points, or 4.8%.

The Dow is down 798.71 points, or 2.8%.

The Nasdaq is up 2,292.35 points, or 25.5%.

The Russell 2000 is down 104.17 points, or 6.2%.