U.S. stocks advanced on Thursday as optimism about upcoming earnings and investor buying of the quarter's top performers lifted the S&P 500 above a key technical level.

The S&P 500 broke above its 50-day moving average at 1,305, leading investors to believe the market may have absorbed the worst of its recent pullback caused by Japan's earthquake and tumult in the Arab world, positioning stocks for another move higher.

Yes, there are legitimate concerns. Yes, there are legitimate headline risks, said Phil Orlando, chief equity market strategist at Federated Investors, in New York.

But it's entirely possible the market feels comfortable that this 7 percent correction we saw from mid-February into mid-March has priced those concerns in, and now we are starting to look forward to the prospect of continued economic growth and solid first-quarter profits.

The S&P 500 is up 24.8 percent since the start of September but briefly dipped into negative territory for the year recently as global concerns pushed commodity prices higher.

The Dow Jones industrial average <.DJI> gained 84.54 points, or 0.70 percent, to end at 12,170.56. The Standard & Poor's 500 Index <.SPX> climbed 12.12 points, or 0.93 percent, to 1,309.66. The Nasdaq Composite Index <.IXIC> rose 38.12 points, or 1.41 percent, to 2,736.42.

Ken Polcari, managing director at ICAP Equities in New York, said the S&P's 50-day moving average has acted as a point of resistance for the last week and a half, and a close above 1,305 will be bullish in the short-term.

SEMIS' STAR TURN

Semiconductor stocks were among the best performers and helped boost the Nasdaq after Micron Technology Inc posted a quarterly profit that topped Wall Street's forecasts.

Micron shares jumped 8.4 percent to $11.50. The PHLX semiconductor index <.SOX> gained 2.5 percent.

It was the second consecutive day of gains for the market, with the S&P 500 up 2.4 percent so far for the week.

With the market near the end of the quarter, portfolio managers will buy equities that have performed well as they execute window dressing, and hedge funds will cover short positions that are under pressure.

The S&P energy index <.GSPE> is among leading sectors for the quarter, with gains so far of 13.7 percent. Tesoro Corp was the top performer in the sector for the quarter, up 40.4 percent.

The S&P technology index <.GSPT>, up 3.1 percent so far for the quarter, was up 1.6 percent on Thursday. The rally on Thursday pushed Micron Tech up more than 43 percent for the quarter, making it the sector's top gainer.

Maybe there are some clients that are taking the opportunity to put some cash to work and put it to work in some areas like technology that have been leadership groups, Orlando said.

After the closing bell, Oracle Corp gained 0.4 percent to $32.27 after posting quarterly results that beat Wall Street's estimates, while U.S.-listed shares of Research in Motion Inc tumbled over 10 percent to $57.40 after giving a weaker-than-expected outlook.

Earnings growth is expected to help the market overcome worries about unrest in the Middle East and North Africa and Japan's crisis this year.

The S&P 500 was forecast to end the year 11 percent higher, according to a Reuters poll released on Thursday.

Volume was light, with about 7.21 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, below the daily average of 8.06 billion.

Advancing stocks outnumbered declining ones on the NYSE by 1,947 to 1,013, while on the Nasdaq, advancers beat decliners 1,674 to 926.

(Reporting by Chuck Mikolajczak; Editing by Jan Paschal)