U.S. stocks advanced on Thursday, bouncing back after three days of declines as investors searched for bargains, but the near-term outlook remains bearish.

All three major U.S. stock indexes recovered from Wednesday's lows, which had put both the benchmark S&P 500 and the Nasdaq in negative territory for the year. Thursday's gains moved the S&P and the Nasdaq back into the black for 2011.

The CBOE Volatility Index, or VIX <.VIX>, eased as stocks rose. It was down 10.8 percent after rising sharply this week.

Trading volume, which was the highest of the year on Wednesday, was at 3.05 billion, about average for trading at this point in the session.

Worries about the crisis in Japan kept investors on edge.

From a chart standpoint, I don't see anything right now that suggests that the near-term decline is over, said Chris Burba, short-term market technician at Standard & Poor's in New York.

Momentum is still weakening ... I don't think the fear is going to be expelled, alleviated all at once, It's going to take some time for optimism to build back up again.

The recent declines followed a rally of nearly six months in stocks. The lofty gains alone have prompted calls for a market correction.

On Thursday, natural resource stocks helped lead the market as commodity prices rebounded. Tensions in the Middle East and North Africa drove oil prices up nearly 3 percent. Brent crude for May delivery gained $3.41 to $114.01 a barrel.

Cliffs Natural Resources Inc rose 5.5 percent to $88.36, while Chevron Corp gained 2.5 percent to $102.02.

The S&P energy index <.GSPE> shot up 2.7 percent, leading gains in the S&P 500.

The Dow Jones industrial average <.DJI> was up 145.09 points, or 1.25 percent, at 11,758.39. The Standard & Poor's 500 Index <.SPX> was up 17.88 points, or 1.42 percent, at 1,274.76. The Nasdaq Composite Index <.IXIC> was up 38.26 points, or 1.46 percent, at 2,655.08.

Economic bellwether FedEx Corp , the world's largest cargo airline, forecast improved revenue, boosted by strong demand. The stock rose 4.5 percent to $89.15 and helped lift the shares of United Parcel Service Inc , the largest package delivery company. UPS stock gained 2.1 percent to $71.82.

(Reporting by Caroline Valetkevitch; Additional reporting by Edward Krudy; Editing by Jan Paschal)