NEW YORK (CNNMoney) -- Stocks rallied Friday as a stronger-than-expected July jobs report helped lift markets for the week.
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 stimulative 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."
In the corporate world, shares of Knight Capital Group (rebounded 57%, after plummeting to near $2 a day earlier.)
After a costly high-frequency trading mishap Wednesday, Knight is now the subject of takeover talks. The Wall Street Journal reported that Knight told its clients it had secured a line of credit to keep operating through Friday.
U.S. stocks ended in the red Thursday, after European Central Bank president Mario Draghi stopped short of announcing immediate action to contain Europe's debt crisis at the conclusion of an ECB meeting.
Economy: The Institute for Supply Management said its index of activity in the services sector increased to 52.6 in July from 52.1 in June.
The index was expected to come in at 52.3, according to a survey of analysts by Briefing.com.
Companies: Shares of AIG were halted in midday trading before the insurance company announced that it would buy $3 billion worth of its own stock from the U.S. Treasury Department. The Treasury said it will offer a total of $4.5 billion worth of AIG common stock.
AIG (Fortune 500), once the world's largest insurance company, was bailed out by the government during the 2008-2009 credit crisis. Shares closed 1.6% higher on Friday.,
LinkedIn (nearly doubled from a year ago, led by a huge increase in revenue for its job posting services.) shares jumped after the business networking site reported sales that
Facebook () jumped on the tech bandwagon, ending 5% higher after six straight days of losses.
Shares of Procter & Gamble (Fortune 500) finished 3% higher after the consumer products company topped earnings expectations. Revenues were in line with expectations.,
Kraft (Fortune 500) said late Thursday that profits rose in the second quarter, adding that it expects continued growth in the remainder of the year.,
NYSE Euronext ()'s quarterly results beat Wall Street's earnings and revenue forecasts.
Oil for September delivery rose $4.12 to $91.25 a barrel.
Gold futures for August delivery rose $15.10 to $1,605.80 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury fell, pushing the yield up to 1.57% from 1.48% late Thursday.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.64%||3.69%|
|15 yr fixed||2.76%||2.82%|
|30 yr refi||3.62%||3.72%|
|15 yr refi||2.78%||2.84%|
Today's featured rates: