NEW YORK (CNNMoney) -- Stocks rallied Friday as a stronger-than-expected July jobs report helped lift markets for the week.
The Dow Jones industrial average surged 217 points, or 1.7%. The S&P 500 and the Nasdaq both rose about 2%.
All three indexes had been headed for a losing week before Friday's jobs report.
The U.S. economy added 163,000 jobs in July, an improvement from an increase of just 64,000 in June, according to a government report. Economists surveyed by CNNMoney were predicting 95,000 jobs were added last month.
"It was the perfect number for the market," said Mark Luschini, chief investment strategist at Janney Montgomery Scott.
The improvement in hiring was enough to "demonstrate the positive, albeit lackluster, underpinnings of the economy," said Luschini. At the same time, he added, it was not strong enough "for the Fed to put its gun back in its holster."
The Federal Reserve disappointed some investors Wednesday, when it left its economic policies unchanged. However, the Fed indicated the U.S. economy is slowing and that more action could be in the cards soon.
Many investors expect Fed chairman Ben Bernanke to hint at the possibility of more stimulus at the central bank's annual symposium later this month in Jackson Hole, Wyo. The Fed could then follow up by announcing a third round of asset purchases in September.
The European Central Bank also failed to take any simulative action, further adding to worries about the global economy.
"This is clearly a short-term ricochet based on the jobs news," said Frank Davis, director of deals and trading at LEK Securities. "The concern is what happens in Europe over the weekend."