The stock market ran out of steam today after boosting the Nasdaq Stock Market composite index and the Standard & Poor's 500 stock index to new highs for the year.

Despite a batch of encouraging economic news, stocks inched ahead only incrementally with the S&P climbing one point to 1,227.92, the Nasdaq composite advancing 4 points to 2,156.78 and the Dow Jones industrial average gaining 12 to 10,640.83.

It was third day in a row of gains for the market, but also the third day in a row in which more stocks fell than rose. The gains added up to slightly more than the losses, but the greater number of losing stocks was regarded as a sign of weakness in the market.

Another sign of weakness was the small size of today's advance--a disappointment because the latest profit reports were mostly better than expected and the economic news was all good.

Today's producer prices report mirrored yesterday's consumer price index by showing no inflation at all last month. The industrial production report issued by the Commerce Department showed the biggest gain in 16 months. And the University of Michigan's consumer confidence poll also showed improvement.

Though the S&P 500 and the Nasdaq have climbed to their highest levels this year, the Nasdaq composite is still down 0.8 percent for the year, because it was a few points higher on New Year's eve. The S&P is up 1.3 percent since the end of last year, the Dow down by the same 1.3 percent.

For the week the Dow was up 192 points, the Nasdaq Composite gained 44 points and the S&P 500 climbed 16 points.

In today's trading McDonalds Corp. was hailed as the burger king of the Dow, giving the index its biggest gain after telling investors sales and profits for the second quarter will be significantly higher then projected.