Stocks edged lower on Wednesday as investors took profits in some of the year's better performers, offsetting a much better-than-expected report on Midwest business activity.

Companies including Microsoft Corp , which is up 59 percent since the year's start, was among the biggest drags on the Dow and the Nasdaq. The stock slipped 1.6 percent to $30.88.

Shares of Oracle Corp , up 40 percent since the start of the year, was down 0.4 percent at $24.91.

We've had such a nice run up over the last two weeks that I think the best-case scenario is probably baked into stock prices at this point. I wouldn't be surprised if people wanted to take some money off the table, now that year end is approaching, said Angel Mata, managing director of listed equity trading at Stifel Nicolaus Capital Markets in Baltimore.

Among economic data, the Institute for Supply Management-Chicago business barometer surged to a four-year high, topping forecasts, on a recovery in employment and accelerating new orders.

Shares of DuPont was up 0.4 percent at $34.03.

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 views the U.S. economy is on the road to recovery.

The Dow Jones industrial average <.DJI> was down 10.50 points, or 0.10 percent, at 10,534.91. The Standard & Poor's 500 Index <.SPX> was down 2.17 points, or 0.19 percent, at 1,124.03. The Nasdaq Composite Index <.IXIC> was down 4.43 points, or 0.19 percent, at 2,283.97.

In Tuesday's session, indexes ended modestly lower and snapped a six-day streak of gains.

The Nasdaq Times Square, New York, building was briefly evacuated because of an investigation of a suspicious vehicle near the building, but Nasdaq said trading was not affected.

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.2 percent, while Marvell added 2.3 percent to $20.72 and Nvidia shot up 3.7 percent to $18.70, both in Nasdaq trading.

(Reporting by Caroline Valetkevitch; Additional reporting by Ryan Vlastelica; Editing by Jan Paschal)