NEW YORK — Stocks ended with a surge Friday after traders decided that a healthy job market mattered more than the Federal Reserve scaling back its economic stimulus.
After the government reported strong hiring for June, traders and investors struggled over how to react. At first, they pushed stocks higher because the report was better than expected. Then they pushed stocks lower because improved hiring last month made it more likely the Federal Reserve could ease back on its bond buying.
After waffling early, investors and traders finally settled on an optimistic outlook. The Standard & Poor's 500 had its strongest performance in three weeks.
"In general, I think our economy is standing on its own two feet right now," said David Brown, chief market strategist at Sabrient, a Santa Barbara, Calif., research firm for institutional investors.
U.S. stock indexes shot higher when the market opened, fueled by the Labor Department's report that the U.S. economy added a stronger-than-expected 195,000 jobs last month. But the gains tapered off within the hour, and all the major indexes dipped briefly into the red.
By the end of the day, the three main U.S. indexes had more than recovered, each ending about 1 percent higher.
The Dow Jones industrial average rose 147.29 points to 15,135.84. The S&P 500 rose 16.48 points to 1,631.89. The Nasdaq composite climbed 35.71 to 3,479.38.
"I think the initial reaction was, 'Yay, all these people are employed, and then, 'whoops,'" Brown said, during late-morning trading.
The whiplash day illustrated the complex and outsized role that the Fed has played in the stock market in recent weeks.
The Federal Reserve, led by Chairman Ben Bernanke, has been propping up the economy by buying bonds and keeping interest rates low. Investors know that the Fed isn't going to continue the stimulus forever, but they worry that developments like Friday's positive jobs report could make the Fed yank away the stimulus too soon.
The jobs picture "gives Bernanke more of a mandate" to rein in Fed stimulus programs, Brown said.
Investors will get other clues about the economy next week, when earnings season starts. Aluminum giant Alcoa reports second-quarter results after the market closes Monday
As investors bought stocks, they sold bonds Friday, another sign that they think the Fed will tamp down its bond buying. The yield on the 10-year Treasury note jumped dramatically to 2.73 percent from late Wednesday's level of 2.51 percent. That was the highest yield for the 10-year note since August 2011.
Relatively few shares changed hands Friday because many traders were still on vacation after the Fourth of July holiday Thursday. Light volume may have contributed to the market's early volatility. The market can be moved by changes in even a relatively small numbers of shares.
Traders also noted that U.S. stock indexes were playing catch-up after missing out on Europe's big gains Thursday.
Stocks in Europe had jumped Thursday, including a 3 percent gain in Britain's main index, after the European Central Bank and the Bank of England sought to soothe markets by saying they'd keep interest rates low for the foreseeable future. Investors there have been scared that their own central banks may follow the Fed's lead and rein in their economic stimulus measures soon.
The calming effect didn't last long. Markets were down throughout Europe on Friday, as investors there fretted over whether the Fed would pull back.
As for U.S. government bond trading, investors have been selling 10-year Treasurys for weeks in anticipation of a Fed pullback. As recently as May 3, the yield on the 10-year note was 1.6 percent. The current yield, while still low by historical standards, has created a sea change in the way investors view bonds.