By Ryan Vlastelica
NEW YORK (Reuters) - U.S. stocks ended higher on Friday, with the S&P 500 rallying back above a key technical level, but the advance was not enough to offset recent declines and major indexes closed out their worst week of the past eight.
The day's gains were broad. While all ten primary S&P 500 sectors ended higher on the day, energy <.SPNY> was the top advancer, up 1.3 percent alongside a 1 percent rise in the price of crude oil
Much of the advance came after a read on second-quarter GDP showed that the economy grew at its fastest pace in 2-1/2 years.
Equity markets have seen bigger moves of late, including a selloff on Thursday that was the S&P's biggest one-day decline since July. In four of the past five sessions, the S&P posted a point move that was larger than its 14.6 point average over the past 250 sessions.
"It's interesting to see this kind of rebound so quickly, but it shows you how skittish the market is, with volatility higher in both directions," said Michael Mullaney, chief investment officer at Fiduciary Trust Co in Boston.
The S&P closed back above its 50-day moving average, which it had closed below on Thursday for the first time in more than a month. A protracted period under that level could have portended deeper losses ahead, but traders extended their recent trend of using market declines as buying opportunities. The S&P is about 1.4 percent below a record close hit earlier this month.
"Buyers are showing back up at the party," said Mullaney, who helps oversee about $11.7 billion in assets. "The bottom line is that the outlook is still very solid, so it isn't unusual to see traders come back in."
The Dow Jones industrial average (DJI) rose 167.35 points, or 0.99 percent, to 17,113.15, the S&P 500 (SPX) gained 16.86 points, or 0.86 percent, to 1,982.85, and the Nasdaq Composite (IXIC) added 45.45 points, or 1.02 percent, to 4,512.19.
For the week, the Dow fell 1 percent, the S&P lost 1.4 percent and the Nasdaq shed 1.5 percent. It is the worst week for all three since the week ended Aug 1.
Nike Inc (N:NKE) jumped 12 percent to $89.50 in its biggest one-day advance since October 2008. The Dow component hit a record high a day after earnings topped expectations, prompting more than a dozen brokers to raise their targets on the stock.
Micron Tech (O:MU) jumped 6.7 percent to $33.83. It also reported better-than-expected results late Thursday.
On the downside, Universal Health Services Inc (N:UHS) fell 2.4 percent to $109.03 after it agreed to buy Cygnet Health Care Ltd in a deal valued at about $335 million.
About 70 percent of stocks traded on the New York Stock Exchange closed higher on Friday, while 65 percent of Nasdaq-listed names ended in positive territory.
About 5.18 billion shares traded on all U.S. platforms, according to BATS exchange data, below the month-to-date average of 6.05 billion.
(Editing by Nick Zieminski)