U.S. stocks ended a smidgen higher in very light trading on Wednesday as a stronger-than-expected report on Midwest U.S. business activity was offset by investors taking profits in some of the year's better performers.

Still, the Dow and the Nasdaq eked out fresh highs for the year. The Standard & Poor's benchmark index is up 25 percent for 2009, putting it on track for its best year since 2003.

Most of the advance is the result of the nine-month rally the market has seen as investors turned bullish on prospects for the economic recovery. The S&P 500 is up a whopping 66.5 percent since its March 9 closing low.

On Wednesday, the Institute for Supply Management-Chicago business barometer surged to a four-year high, topping forecasts, on a recovery in employment and an acceleration in new orders.


, a Dow component, gained 0.5 percent to close at $34.05 on the New York Stock Exchange.

On the down side, Microsoft Corp , up 59.3 percent for the year, was among the biggest drags on both the Dow and the Nasdaq. The stock slipped 1.4 percent to $30.96 on Nasdaq.

We've had such a nice run up over the last two weeks. I think the best-case scenario is probably baked into stock prices at this point, said Angel Mata, managing director of listed equity trading at Stifel Nicolaus Capital Markets in Baltimore.

Oracle Corp , up 41 percent for 2009, was down 0.3 percent at $24.93.

In its run higher this year, the market has been underpinned by strength in the technology and materials sectors on expectations the economic recovery will spur capital spending and increase demand for natural resources. The S&P information technology sector <.GSPT> is up 62 percent since the start of the year, while the S&P materials index <.GSPM> is up 47 percent.

The Dow Jones industrial average <.DJI> rose 3.10 points, or 0.03 percent, to end at 10,548.51 on Wednesday. The Standard & Poor's 500 Index <.SPX> edged up just 0.22 of a point, or 0.02 percent, to finish at 1,126.42. The Nasdaq Composite Index <.IXIC> gained 2.88 points, or 0.13 percent, to close at 2,291.28.

Wednesday's tiny gains followed a modest decline in Tuesday's session, when stocks snapped a six-day streak of gains.

Investors appeared unfazed by a brief evacuation of the Nasdaq Times Square, New York, offices amid an investigation of a suspicious vehicle near its building. Nasdaq said trading was not affected.

While investors looked to the data for signs a recovery is taking hold, some traders have moved to safer assets like the dollar to lock in profits after a strong 2009.

The U.S. dollar hit a three-month high against the yen on year-end flows in thin trade and the belief that the U.S. economy is on the road to recovery.

Semiconductor stocks gained after Kaufman Bros upgraded both Marvell Technology Group Ltd and Nvidia Corp to buy, saying they could benefit from improved demand for personal computers.

The Philadelphia Semiconductor index <.SOXX> gained 1.5 percent. Marvell added 2.8 percent to $20.83 and Nvidia shot up 3.6 percent to $18.67, both in Nasdaq trading.

On the New York Stock Exchange, only 644.39 million shares changed hands, well below last year's estimated daily average of 1.49 billion. On the Nasdaq, about 1.33 billion shares traded, also sharply below last year's daily average of 2.28 billion.

Declining stocks outnumbered advancing ones on the NYSE by a ratio of 8 to 7.

On the Nasdaq, the opposite trend prevailed, with 14 stocks rising for every 13 that fell. (Reporting by Caroline Valetkevitch; Additional reporting by Ryan Vlastelica; Editing by Jan Paschal)