Stocks snap 2-day skid amid Iran, weak dollar; jobs eyed

U.S. stocks snapped a two-day losing streak on Thursday, the last trading day for the week, as investors digested economic data, set up for Friday's jobs report and weighed news of a possible accord between Iran and major world powers.

"This is a very complicated geopolitical situation and this is a step in the right direction," said Art Hogan, chief market strategist at Wunderlich Securities. "The framework has been accepted in a very calm fashion."

The Dow Jones industrial average gained about 80 points following the news that Iran and key global powers have reached solutions on key parameters of the country's nuclear program. U.S. crude also trimmed earlier losses to settle at $49.14 a barrel, down 95 cents or 1.9 percent.

Nevertheless, the Dow had gained about 100 points shortly after the open as a weaker dollar helped stocks move higher.

The U.S. dollar traded about 0.70 percent lower as the euro gained to $1.08. The dollar has stayed within a range after rapid gains in the last few months that weighed on earnings.

"Above all else this market is waiting to hear what companies tell us ... How much the dollar has been hurting corporate profits," said Quincy Krosby, market strategist at Prudential Financial. "The guidance is crucial."

The dollar "first of all will impose a drag on the U.S. economy. I think people have underestimated that. It is hurting growth," said David Kelly, chief global strategist at J.P. Morgan Funds. Still, he expects that GDP growth over 1.5 percent "will push unemployment down and (cause) the Fed to raise rates."

The U.S. 10-year Treasury yield gained to trade near 1.91 percent.

"It seems the expectation after today is that we get another good jobs report," said JJ Kinahan, chief strategist at TD Ameritrade. "The other encouraging thing today is that we're seeing rotation out of fixed income into stocks. That's a very good sign for today's market."

He noted that holding above 2,075 in the S&P 500 would be bullish as a next step to 2,100.

Factory orders showed an increase of 0.2 percent in February, beating expectations for a second month of decline.

Futures were little changed following a decline in weekly jobless claims to 268,000. February's trade deficit also came in much smaller than expected at $35.4 billion.

"Everyone's worried about a potential deterioration in the labor market. Another strong weekly claims number is a good thing," said Randy Frederick, managing director of trading and derivatives at Charles Schwab. "The biggest challenge is even if we knew what was going to happen but we don't know how the market is going to react"

"There's a whole group of mixed opinion out there, whether good (economic data) is good or good is bad," he said.

U.S. stocks trended lower in the last few weeks as investors sought to determine when the Federal Reserve would find enough economic indicators that would support a short-term interest rate hike.

Read MoreNot again! Another reason to cut Q1 growth?

"I think the equity market here is stuck in a range," said David O'Malley, CEO of Penn Mutual Asset Management. "I think we have to get more certainty about what's happening with the Fed."

Investors also continued to eye Greek negotiations with the euro zone while also setting up for the upcoming nonfarm payroll numbers.

Friday's labor market report is expected to show an increase in nonfarm payrolls of around 250,000 in March, to leave the unemployment rate unchanged at a more-than six-and-a-half-year low of 5.5 percent. Investors will also watch for wage growth.

"The market (thinks) employment is pretty good. Really what can happen there is be disappointed. Really we need some more strength in other indicators and continued strength in employment because I think good employment is priced into the market," O'Malley said.

The Challenger job cut report showed U.S. employers announced 36,594 layoffs last month, down 27.6 percent from February, but up 6.4 percent from March 2014.

Nevertheless, Peter Boockvar, chief market analyst at The Lindsey Group, said "there's definitely risk to the number after the ADP report came in weaker than expected." "If it's good, it will be interesting to see [what happens], because it would raise the possibility of a Fed rate hike."

S&P 500

The Dow Jones Industrial Average closed up 64.13 points, or 0.36 percent, at 17,761.98. Home Depot led all blue chip stocks, while Microsoft was the greatest laggard.

The S&P 500 closed up 7.13 points, or 0.35 percent, at 2,066.82, with Consumer Discretionary leading nine advancers with Information Technology the only decliner.

The Nasdaq traded up 6.71 points, or 0.14 percent, at 4,886.94.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, closed near 14.

For every two advancers one declined on the New York Stock Exchange, with an exchange volume of 716.5 million and a composite volume of 3.08 billion at the close.

High-frequency trading accounted for 47.5 percent of March average daily trading volume of about 6.7 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.

Gold futures settled $7.30 lower at $1,200.91 an ounce.

In corporate news, Lumber Liquidators said March sales were hurt by the "60 Minutes" report on alleged safety problems with its flooring, falling 12.8 percent compared to a year ago. However, it also notes that first quarter sales were up 5.6 percent, which puts them above Street estimates.

Kraft Foods, Mondelez—The CFTC sued the two companies for alleged manipulation of wheat futures and cash wheat prices. Some of the incidents mentioned in the complaint occurred before the 2012 transaction which split Kraft and Mondelez into separate companies. Mondelez said it does not expect any payment resulting from this case to be material to investors, and Kraft tells CNBC that Mondelez will predominantly bear any costs related to the case.

Pfizer will shut down its vaccine sales operation in China after regulators did not renew an import license for its anti-bacterial treatment Prevenar, the only vaccine it sells in that country.

Read MoreEarly movers: LL, PG, KMX, KRFT, MAC & more

AIG has been sued by investment firm Pimco, with dozens of Pimco funds saying they suffered sizable losses during the 2008 financial crisis due to AIG's investment in "exotic securities." AIG said it would vigorously defend itself against those charges.

CNBC's Peter Schacknow and Reuters contributed to this report.

On tap this week:


Good Friday holiday

Stock and bond markets closed

Futures markets open holiday schedule

8:30 am: Employment

8:30 am: Minneapolis Fed President Narayana welcoming remarks, community development conference

More From