Stocks edged lower on Tuesday following three days of gains, but the recent rally has investors feeling less edgy about crises in Japan and Libya, and should help keep losses in check.

The CBOE Volatility Index <.VIX> fell 2.7 percent to 20.05, not far from its level before the crisis in Japan sparked a huge spike. That suggests investors are more sanguine about the continuing problems in Japan, the Middle East and North Africa.

Perry Piazza, director of investment strategy at Contango Capital Advisors in San Francisco, said that in the near term, the S&P may trade below its 50-day moving average at 1,304, which has been acting as a resistance level.

The combination of Japan getting better and some progress in Libya has been enough to get people interested again, said

That said, there's still a lot of uncertainty and high commodity prices that are starting to dent confidence.

Fighting in Libya and unrest in Yemen have contributed to rising oil prices, which has dragged on equities. April U.S. crude futures rose 1.5 percent to $103.82 while Brent added 0.2 percent to $115.17 a barrel.

According to a recent report from EPFR Global, fund flows took a marked turn toward the defensive in mid-March, following the crisis in Japan.

Jeffrey Davis, who oversees $5 billion as chief investment officer at Lee Munder Capital Group in Boston, said the more conservative positioning could limit future downside.

Most investors are pretty safe now, and I suspect the VIX should continue to settle back down gradually, he said.

The Dow Jones industrial average <.DJI> shed 15.37 points, or 0.13 percent, to 12,021.16. The Standard & Poor's 500 Index <.SPX> slipped 4.19 points, or 0.32 percent, to 1,294.19. The Nasdaq Composite Index <.IXIC> declined 11.10 points, or 0.41 percent, to 2,680.99.

European Central Bank President Jean-Claude Trichet and other ECB policymakers have reiterated they are ready to act quickly to guard against inflation.

At midday, volume was light, with about 3.56 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq. Contango's Piazza said the light volume wasn't surprising as there's a sense that we're consolidating and there's not much conviction one way or the other.

Walgreen Co was the S&P 500's biggest percentage loser, falling 6.4 percent to $39.31 after it reported its quarterly results.

One of the S&P's top percentage gainers was Netflix Inc , which rose 3.2 percent to $219.64 after Credit Suisse upgraded the stock to outperform.

In another upside move, Sprint Nextel Corp rose 3.9 percent to $4.54 in a rebound from Monday's hefty losses.

The chief executive of Verizon Wireless said he has no interest in buying Sprint Nextel even as the company stands to lose its top position in the U.S. wireless market because of AT&T Inc's planned acquisition of T-Mobile USA.

(Reporting by Ryan Vlastelica; Editing by Jan Paschal)