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.