Wall Street ended a volatile week with a moderate gain Friday after better-than-expected economic data placated a market pummeled a day earlier by concerns about housing and the financial sector.
Financials fell on continued worries about souring loans, while a surge in profits at Juniper Networks Inc. lifted technology stocks.
The Commerce Department's report on June home sales helped investors shake off some early uncertainty. The government said sales of new single-family homes fell by 0.6 percent to a seasonally adjusted annual rate of 530,000 units; the market expected sales to total 505,000. That report helped offset concerns raised by a weak reading on existing home sales on Thursday.
And there was good news about consumers, whose shyness about spending has troubled Wall Street. The Reuters/University of Michigan index of consumer sentiment for the first part of July came in at 61.2, while economists forecast a reading of 56.4, which was the level hit in June — a 28-year-low.
The Commerce Department also said orders for durable goods rose 0.8 percent last month, far better than the 0.4 percent decline economists expected. It was the best showing since a 1.1 percent rise in February and reflected strength in demand for heavy machinery, primary metals such as steel and even a slight rebound in the beleaguered auto industry.
Linda Duessel, equity market strategist at Federated Investors, said economic figures such as the durable goods numbers are important because they reveal continued demand from abroad, which could help U.S. companies continue to rake in profits even if the U.S. economy isn't running at full steam.
"That's good news for market participants as we try to find a footing in the market because we really don't want to see our weakness leak outside the U.S.," she said.
The Dow Jones industrial average rose 21.41, or 0.19 percent, to 11,370.69. The Dow, which fluctuated at times Friday, fell more than 280 points Thursday.
Broader stock indicators also rose. The Standard & Poor's 500 index advanced 5.22, or 0.42 percent, to 1,257.76, and the technology-heavy Nasdaq composite index jumped 30.42, or 1.33 percent, to 2,310.53.
Bond prices moved lower as investors shifted back into stocks. The yield on the benchmark 10-year Treasury note, which moves opposite its price, rose to 4.09 percent from 4.00 percent from late Thursday.
The dollar was mixed against other major currencies, while gold prices rose.
A barrel of light sweet crude fell $2.23 to settle at $123.26 on the New York Mercantile Exchange. Oil prices have fallen more than $20 in recent weeks, alleviating some of Wall Street's concerns about the impact of inflation consumers' ability to spend.
The stock market's volatility during the week — rallying Tuesday and Wednesday only to erase those gains Thursday — illustrates tentativeness behind some of the bets investors are laying, said Hugh Johnson, chairman and chief investment officer of Johnson Illington Advisors. He said the market tends to react to whatever the latest headlines are.
"It's just news sensitive and the real question is 'What's the next news going to be? Good or bad?' That means that the market doesn't have a trend or a direction. It depends entirely on whether the news is going to be good or bad on any given day and that doesn't give you, as an investor, a lot of confidence," he said.
Johnson said the ride for investors will likely remain uneven as Wall Street awaits next Friday's government employment report for July.
"If the consensus is correct they'll have little choice but to leave interest rates unchanged," he said referring to the difficulties Federal Reserve policymakers would have in hiking rates to battle inflation without damaging the economy.
Financial stocks fell as investors worried about the health of their balance sheets given the weakness in the housing sector. Bank of America Corp. fell $1.06, or 3.5 percent, to $29.58, while Wachovia Corp. fell $1.19, or 7.6 percent, to $14.50.
In corporate news, Juniper Networks, the maker of networking equipment, reported a 40 percent increase in earnings for the second quarter, helped by a new product line. Results narrowly surpassed Wall Street projections. The stock surged $4, or 18 percent, to $26.57.
Chemicals maker Huntsman Corp. said it was approached by investors offering funding to help complete its $6.5 billion takeover by Apollo Management. Huntsman rose 75 cents, or 5.7 percent, to $14.02.
Fannie Mae and Freddie Mac declined as investors worried about the government-chartered mortgage finance companies' financial stability. Fannie Mae fell 47 cents, or 3.9 percent, to $11.55, while Freddie Mac fell 54 cents, or 6.1 percent, to $8.27.
Advancing issues outnumbered decliners by about 3 to 2 on the New York Stock Exchange, where volume came to 1.29 billion shares compared with 1.65 billion shares traded Thurday.
The Russell 2000 index of smaller companies rose 7.95, or 1.13 percent, to 710.34.