Stocks edge up after 3 days of losses

In this May 16, 2011 photo, traders work on the trading floor of the New York Stock Exchange. World stocks climbed Wednesday, May 18, shrugging off weak U.S. economic indicators as Asia got a boost from signs that Japan's post-tsunami recovery is quickening. (AP Photo/David Karp)

/ AP

In this May 16, 2011 photo, traders work on the trading floor of the New York Stock Exchange. World stocks climbed Wednesday, May 18, shrugging off weak U.S. economic indicators as Asia got a boost from signs that Japan's post-tsunami recovery is quickening. (AP Photo/David Karp)

In this May 16, 2011 photo, traders work on the trading floor of the New York Stock Exchange. World stocks climbed Wednesday, May 18, shrugging off weak U.S. economic indicators as Asia got a boost from signs that Japan's post-tsunami recovery is quickening. (AP Photo/David Karp) (/ AP)

FRANCESCA LEVY, AP Business Writer

Energy and materials companies are pushing stocks higher as prices for oil and other commodities rose, but mixed earnings reports from retailers are tempering gains.

Oil rose to nearly $100 a barrel because of a weaker dollar, sending energy stocks in the S&P 500 up the most of the 10 industry groups in the index.

The Dow Jones industrial average is up 20 points, or 0.2 percent, at 12,500. The Standard & Poor's 500 index is up 6 points, or 0.4 percent, at 1,334.