Dow, S&P Log Worst Weekly Decline in 2012

Stocks closed modestly higher Friday, but the Dow and S&P posted their worst weekly loss for the year after investors were rattled over slowdown fears in China and weak economic news from the euro zone.

The Dow Jones Industrial Average gained 34.59 points, or 0.27 percent, to close at 13,080.73, snapping a three-day losing streak, led by H-P and BofA .

The S&P 500 climbed 4.33 points, or 0.31 percent, to finish at 1,397.11. The Nasdaq rose 4.60 points, or 0.15 percent, to end at 3,067.92.

The CBOE Volatility Index, widely considered the best gauge of fear in the market, ended below 15.

For the week, the Dow declined 1.15 percent, the S&P erased 0.50 percent, while the Nasdaq rose 0.41 percent, logging its sixth-straight winning week. Caterpillar was the overall biggest laggard on the Dow this week, while Cisco gained.

Six out of the 10 key S&P sectors were negative for the week, led by energy. Consumer discretionaries were the biggest winner.

“There’s a lot of skepticism and a tremendous amount of cash on the sidelines and I think the market can move higher from here,” said Russ Koesterich, global chief investment strategist at BlackRock’s iShares Group. “What I do worry about is that investors need to have modest expectations for how much the rally is going to be driven by multiple expansion.”

Koesterich said while he believes the U.S. economy will continue to see a growth, his expectations remain modest.

Apple shares ended slightly lower after flirting with the $600 level for most of the week. Earlier today, the tech giant's stock was briefly halted on a single-stock circuit breaker.

Orders placed for Apple through the BATS Global Markets came in as low as $542.80 before the stock was halted. The Nasdaq is canceling the erroneous trades made on the BATS exchange.

Meanwhile, BATS Global made its Wall Street debut Friday, after pricing its IPO at $16 per share. However, shares of the exchange operator were halted following multiple issues as alerted on its website. Eventually, the exchange operator said the stock will not reopen today all the trades executed from this morning will be canceled.

Stocks had been under pressure for most of the week amid worries of a global slowdown and on the heels of some tepid economic news in the U.S.

“There’s been a great degree of uncertainty surrounding chatter about Europe and China and the market doesn’t seem to know where to go on that,” said Jeffrey Cleveland, senior economist with Payden & Rygel.

“[Meanwhile,] we’re expecting to see a modest economic pickup in the second half,” he said of the U.S. economy. “It won’t be stellar, but the double dippers will be proven wrong.”

Banks were one of the day's better performing sectors following a handful of analyst upgrades. Evercore raised its price target on BofA in addition to a handful of regional banks. Meanwhile, BofA launched a pilot program that will allow some homeowners at risk of foreclosure to become renters and stay in their homes.

Meanwhile, RBC boosted its rating on Goldman Sachs and Morgan Stanley to "sector perform" from "underperform." And Atlantic Equities raised its price target on Wells Fargo to $40 from $38.

Among earnings, KB Home tumbled after the homebuilder posted an unexpected decline in orders, hurt by rising cancellations in the first quarter. Rivals Pulte and Toll Brothers also slipped. Lennar is scheduled to post earnings next Tuesday.

Micron Technology slumped after the chipmaker posted a quarterly loss and said low prices for its products has yet to recover. Rivals SanDisk and Texas Instruments also slipped.

Nike fell even after the sports apparel maker posted earnings that beat expectations and announced a stock buyback. Canaccord Genuity boosted its price target on the firm to $104 from $96.

Accenture rose after the tech outsourcing and consulting firm topped earnings estimates for the eighth-consecutive quarter. In addition, at least six brokerages raised their price targets on the company.

On the economic front, new home sales posted an unexpected loss of 1.6 percentto a seasonally adjusted 313,000-unit annual rate in February, according to the Commerce Department. Economists had expected sales at a 325,000-unit rate, according to a Reuters poll. Still, the median price rose 8.3 percent to $233,700, the highest level since June.

—Follow JeeYeon Park on Twitter: @JeeYeonParkCNBC

On Tap Next Week:

MONDAY: Fed's Plosser speaks, Bernanke speaks, Chicago Fed national activity, pending home sales index, Dallas Fed mfg survey
TUESDAY: S&P Case-Shiller home price index, consumer confidence, 2-yr note auction, Fed's Rosengren speaks; Earnings from Lennar, Walgreen
WEDNESDAY: Weekly mortgage apps, durable goods orders, oil inventories, 5-yr note auction, Fed's Bullard speaks, FDA discusses obesity drugs
THURSDAY: GDP, jobless claims, corporate profits, Fed's Plosser speaks, 7-yr note auction, farm prices, Fed's Lacker speaks; Earnings from Best Buy, Research In Motion
FRIDAY: Personal income & outlays, Chicago PMI, consumer sentiment, Stringer's last day as Sony CEO

More From