US Markets

Stocks post worst week since February

US oil rig count down 406 versus one year ago
US oil rig count down 406 versus one year ago
Cashin: Crude is today's big story
Cashin: Crude is today's big story
Pisani: Energy is dominating
Pisani: Energy is dominating
Nikkei briefly tops 16,000 as yen weakens
Nikkei briefly tops 16,000 as yen weakens

U.S. stocks closed well off session highs Friday, despite a rally in oil, as the yen strengthened against the U.S. dollar.

The major averages declined more than 1 percent for the week, the worst since Feb. 5 for S&P 500 and Nasdaq composite and the worst since Feb. 12 for the Dow Jones industrial average. (Tweet This)

The S&P 500 clung to year-to-date gains in the close after briefly erasing them as the major averages temporarily turned lower in afternoon trade. The Dow Jones industrial average closed 35 points higher after earlier adding 152 points.

"Certainly yesterday we traded with the yen strengthening and today we're doing it again," said Peter Boockvar, chief market analyst at The Lindsey Group.

The yen is "very symbolic. It's a sign a central bank is losing control. They're losing control of markets. Markets are losing faith in their abilities," he said.

A full moon helps illuminate the Alaskan pipeline under the faint glow of the Aurora Borealis near Milne Point, Alaska.
US oil surges to $39.72, up about 8 pct for week
Traders in the 10-year bond options pit at the Chicago Board of Trade signal orders.
US Treasurys lower amid Dudley remarks
The U.S. dollar notes
Yen falls as Japan's finance minister warns on intervention
Gold Coins and Credit Suisse gold bar
Gold struggles to hold gains

The Japanese yen reversed an attempt to come off recent highs against the U.S. dollar, last trading near 108.15 yen. In the last few days, the yen hit fresh highs against the greenback going back to October 2014, putting pressure on stocks.

"We were on an epic run higher and this is the pullback we get?" said John Caruso, senior market strategist at RJO Futures.

The U.S. dollar lost more than 3 percent for the week against the yen, its worst week since the one ended Feb. 12.

U.S. dollar index was slightly lower with the euro near $1.14, and the index ended the week 0.4 lower for its fifth negative week in six.

"Generally speaking it's still an environment where the market is somewhat still fragile," said Stephen Freedman, senior investment strategist at UBS Wealth Management Americas.

"The Japanese currency really shouldn't be a big driver of U.S. stocks," he said, noting the currency move likely had greater impact due to lack of major U.S. news.

Traders also noted some pressure on stocks after several downward revisions to first-quarter GDP estimates following wholesale inventories' 0.5 percent decline in February, the sharpest decline since May 2013, Reuters reported.

The Atlanta Fed's GDPNow model said the U.S. economy was on track to grow 0.1 percent in the first quarter, down from the previous 0.4 percent estimate.

Read More First-quarter economy looks bleaker by the day

"What it comes down to is I think there's a lot of mixed signals coming into the market, (including) nervousness about earnings and the Fed," said Jeff Kravetz of the Private Client Reserve at U.S. Bank in Phoenix.

While expectations for the coming earnings season are low, Kravetz said "our sense is earnings to surprise to the upside."

Energy closed up 2.02 percent as the top S&P 500 advancer and consumer discretionary and health care the only decliners. The SPDR Retail (XRT) fell nearly 5 percent for the week in its worst week since the one ended Jan. 8.

WTI settled near session highs, up $2.46, or 6.6 percent, at $39.72 a barrel, in its biggest daily gain since Feb. 12. U.S. crude oil futures gained 7.96 percent for the week. The oil rig count fell by eight to its lowest since 2009.

"The fact oil's up more than 5 percent today and it's being defended for the week helps the risk-on crowd pile into stocks," said Adam Sarhan, CEO of Sarhan Capital.

The Dow transports closed up 1.09 percent after earlier jumping more than 2 percent, snapping a six-day losing streak but still posting a 1.92 percent decline for the week.

The Russell 2000 also closed higher, although also off session highs and down 1.8 percent for the week.

The Nasdaq composite underperformed the major averages but recovered losses to close up about 2 points as gained, closing about half a percent higher, while Facebook lost 2.65 percent.

The iShares Nasdaq Biotechnology ETF (IBB) declined 1.19 percent but gained nearly 3.4 percent for the week for its first three-week win streak since November.

In a panel discussion with three former Fed chairs late Thursday, Fed Chair Janet Yellen said she "certainly wouldn't describe this as a bubble economy."

"I think the Fed (speakers) are basically just comforting to the market," said Peter Cardillo, chief market economist at First Standard Financial.

"That's basically flashing a green light for investors," he said, noting the comments could be interpreted as indicating fair valuation in stocks and no potential recession in the U.S. economy.

Read More This is what could create some turbulence Friday

Early Friday morning New York Fed President William Dudley said a cautious, gradual approach to rate hikes is appropriate. He noted lingering external risks to the U.S. economy, despite some strength and signs of inflation domestically.

The Fed comments helped support a risk-on tone in markets in morning trade.

Gold futures for June delivery traded mildly lower before turning to settle up $6.30 at $1,243.80 an ounce. Gold rose 1.66 percent on the week for its second-straight week of gains.

Treasury yields held above lows touched earlier this week, with the near 0.70 percent and the 10-year yield around 1.72 percent.

Read MoreHank Paulson: Troubled by new anti-inversion rules

U.S. stocks closed lower Thursday, with the Dow losing 174 points. Stocks gained Wednesday, following the first triple-digit decline in the Dow since March 8 on Tuesday.

"The vehemence of the bounce after very, very small pullbacks in the price that shows ... buyers remain under the market for now," Sarhan said.

European stocks closed up about 1 percent or more, with bank stocks outperforming.

Asian stocks were mixed, with the Nikkei 225 and Hang Seng closing about half a percent higher while the Shanghai composite declined about 0.8 percent.

Read MoreEarly movers: YHOO, ULTA, CBS, LNKD, MET, AZN, LLY & more

The Dow Jones industrial average closed up 35 points, or 0.20 percent, at 17,576.96, with Chevron leading advancers and Nike the greatest laggard.

The index declined 1.2 percent for the week, with Goldman Sachs the worst performer and Pfizer the top.

The closed up 5.69 points, or 0.28 percent, at 2,047.60, with energy leading eight sectors higher and health care and consumer discretionary declining.

The S&P 500 lost 1.2 percent for the week, with financials the worst performer and only energy and health care posting gains.

The Nasdaq composite closed up 2.32 points, or 0.05 percent, at 4,850.69.

The Nasdaq closed 1.3 percent lower for the week. Apple declined 1.2 percent for the week.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, declined to near 15.4.

About three stocks advanced for every decliner on the New York Stock Exchange, with an exchange volume of 824 million and a composite volume of nearly 3.3 billion in the close.

High-frequency trading accounted for 49 percent of April's daily trading volume of about 7.00 billion shares, according to TABB Group. During the peak levels of high-frequency trading in 2009, about 61 percent of 9.8 billion of average daily shares traded were executed by high-frequency traders.

CNBC's Gina Francolla and Reuters contributed to this report