Traders decided that the stock market has suffered enough, at least for now.
After a two-day plunge, stocks ended the week with an advance on Friday, suggesting that Wall Street may be successfully weaned from the Federal Reserve's easy money after all.
"Saner heads are prevailing," said Jim Dunigan, chief investment officer at PNC Wealth Management. "People are looking a little deeper into the message from the Fed — the economy is getting better," he said. "At the end of the day that's a positive."
Investors had known that sooner or later the Fed would quit spending $85 billion per month pumping money into the U.S. economy.
That money has been a big driver behind the stock market's bull run the last four years. It led to low interest rates that encouraged borrowing for everything from factory machinery to commercial airplanes to home renovations. Has the economy been great? No. Unemployment is still high and U.S. growth has been anemic. But it could have been worse. Investors were confident enough in a growing economy that the Standard & Poor's 500 index hit an all-time high of 1,669 on May 21.
Then on Wednesday, the Fed said it would aim to turn off that spigot by the middle of next year as long as the economy is strong enough.
Just because investors knew it was coming didn't mean they liked it. The Dow dropped 560 points on Wednesday and Thursday.
Investors recovered their mojo on Friday. The Dow Jones industrial average rose 41.08 points, or 0.3 percent, to close at 14,799.40. The Standard & Poor's 500 index rose 4.24 points, or 0.3 percent to close at 1,592.43.
The gains were led by the kinds of stocks that investors favor when they want to play it safe. Makers of consumer staples, utilities, and health care companies rose the most of the 10 industries in the S&P 500 index. The only two categories that fell were technology stocks and companies that make basic materials.
Friday's gain wasn't enough to erase the market's loss for the week. The S&P 500 fell 2.1 percent for the week, and the Dow was down 1.8 percent. Stocks have now fallen two weeks in a row, and four of the past five.
The real question will be whether the sell-off continues next week, said Frank Fantozzi, CEO of Planned Financial Services. So far, the market's swoon this week appears to be more of an adjustment than the beginning of a long-term rout. "If the flow out of equities starts to increase, this might be the pullback we've been waiting for," he said.
Many investors have been predicting some kind of pullback in the market following its nearly unbroken advance since last fall. The S&P 500 index rose for seven straight months through May. So far in June it's down 2.1 percent.
The yield on the 10-year Treasury note hit 2.54 percent, up from 2.42 percent late Thursday. It has risen sharply since Wednesday as investors sold bonds in anticipation that the Fed would slow, and eventually end, its bond purchases, if the U.S. recovery continues.
The yield, which is a benchmark for interest rates on many kinds of loans including home mortgages, was as low as 1.63 percent as recently as May 3.
Technology shares lagged the market after business software maker Oracle reported flat revenue late Thursday, even though analysts expected an increase. Oracle plunged $3.07, or 9 percent, to $30.14, the biggest drop in the S&P 500 index. Oracle is struggling to adapt as customers shift away from software installed on their own computers toward software that runs remotely.
The Nasdaq composite index, which is heavily weighted with technology stocks, fell 7.39 points, or 0.2 percent, to 3,357.25. Apple, the biggest stock in the index, fell $3.34, or 0.8 percent, to $413.50. Microsoft fell 23 cents, or 0.7 percent, to $33.27.
The price of gold recovered after plunging the day before. Gold rose $5.80, or 0.5 percent, to $1,292 an ounce. Crude oil fell $1.45, or 1.5 percent, to $93.69 a barrel in New York.
The dollar rose against other currencies as traders anticipated that U.S. interest rates would rise as the Fed winds down its bond purchases.
Among other stocks making big moves:
—Darden Restaurants, which runs Olive Garden and Red Lobster, fell $1.11, or 2 percent, to $50.12 after rising expenses hurt its fourth-quarter earnings.
— Spreadtrum Communications jumped $3.62, or 16 percent, to $25.91 after the Chinese smartphone chip maker said its board is considering a buyout offer valued at about $1.39 billion from Tsinghua Holdings.
— Facebook rose 63 cents, or 2.6 percent, to $24.53 after saying it will add video to its popular photo-sharing app Instagram, following on the heels of Twitter's growing video-sharing app, Vine.
A Fed policy statement and comments from Fed Chairman Ben Bernanke started the selling in stocks, bonds and commodities Wednesday. Bernanke said the Fed expects to scale back its bond-buying program later this year and end it by mid-2014 if the economy continues to improve. The bank has been buying Treasury and mortgage bonds, which has made borrowing cheap for consumers and businesses. The program has also encouraged investors to buy stocks instead of bonds.
The S&P 500 is still up 11.7 percent, for the year, not far from its full-year increase of 13.4 percent last year.
AP Business Writer Bernard Condon contributed.