NEW YORK (MarketWatch) - Stocks ended a wild ride solidly higher Wednesday, with the Dow adding more than 150 points in the final hour as bargain-hunters flocked to an oversold market after a choppy day fueled by discomfort over the shaky housing and credit markets.
"Because the market was over-sold enough, and the sellers had done their dastardly deed, at about 3:35 p.m. New York time, it looks like the sellers said 'hey, that's all I have,' bringing on the bargain hunters," said Al Goldman, chief market strategist at AG Edwards. "Then we had a lemming factor."
The Dow Jones Industrial Average gained 150 points to end at 13,362. AT&T Inc. led the advance, gaining 2.7%, followed by Walt Disney Co. , which rose 2.5% ahead of its earnings report after the closing bell.
Of the Dow's 30 components, 28 finished higher, with Alcoa Inc. and Honeywell Inc. bucking the upward trend.
The S&P 500 gained 10.54 points to 1,465.81, while the Nasdaq Composite was up 7.60 points at 2,553.87.
At the New York Stock Exchange, volume hit 2.4 billion shares, with declining stocks topping advancers 19 to 14. At the Nasdaq, 2.9 billion shares were exchanged, and decliners beat advancing stocks 3 to 2.
The 'V' word
"The market's been faced with fear and panic," said Peter Bookvar, equity strategist at Miller Tabak, of the market volatility, which had the Dow rising from a loss of more than 40 points to close with a 150-point gain.
Stocks turned lower on "the possibility of a credit crunch" after the news of another troubled hedge fund run by Bear Stearns Companies Inc., said Peter Cardillo, chief market economist at Avalon Partners. The concerns could keep the market "trapped in a very volatile situation" in the near-term, he said. .
Beazer Homes USA Inc. also found itself on the defensive, with its stock declining as much as 40%, on unsubstantiated talk the homebuilder could file for bankruptcy. Beazer dismissed the rumors as "unfounded" and its stock recovered somewhat to close nearly 18% lower.
Crude-oil futures closed with a loss of more than 2% as a drop in reformulated gasoline prices to their lowest level in more than three months prompted traders to lock in profits from crude's earlier climb to uncharted territory.
September crude climbed as high as $78.70 a barrel on the New York Mercantile Exchange before falling back to close at $76.53 a barrel, losing $1.68, or 2.2%, for the session.
The market gained steam after the National Association of Realtors reported contract signings on existing homes climbed 5% in June, the largest advance in three years.
Less bullish was an Institute for Supply Management report that a key gauge of the strength of the U.S. factory sector moderated in July, for its first decline after three consecutive monthly gains.
On Tuesday U.S. stocks rallied in the morning, but took heavy afternoon losses, with the Dow Jones industrials tumbling 146 points, the Nasdaq Composite losing 37 points and the S&P 500 falling 18 points.
Late in Tuesday's session the market was unnerved by news that American Home Mortgage , which does not specialize in subprime lending, is unable to pay its creditors. The stock lost more than 90% of it worth in Tuesday's session.
Market sentiment did not improve overnight.
"When the market focuses on credit and energy, it goes down," said Art Hogan, chief market strategist at Jefferies & Co. "That was the case late yesterday and that seems to be the case today."
"We've got a real dichotomy here," he said. "When the market focuses on fundamentals, like economic data and strong earnings, as it did Monday and early yesterday, it goes higher. But when it focuses on energy and credit, it goes down. That's why we have so much volatility here."
Bad News Bears
The latest worry for the credit market was the news from Bear Steans that its asset-backed securities fund, which does not carry many subprime loans, suspended investor redemptions and will report a loss for July.
The Bear Stearns Asset-Backed Securities Fund isn't leveraged, which means there's little pressure for the fund to sell positions. The fund also has less than 0.5% of its assets in subprime securities. The asset-backed fund isn't related to two other funds from Bear Stearns that have nearly collapsed.
Bear Stearns stock was off 2.4%.
In more evidence that the credit market's woes are international, Australia's Macquarie Bank said that one of its funds is nursing a monthly loss of 25%. That fund also didn't have direct exposure to the U.S. subprime market.
In some hopeful news, Deutsche Bank Ag. Chief Financial Officer Anthony Di Lorio said virtually all the bank's exposure to collateralized debt obligations -- packages of debt that include subprime mortgages -- is as a market maker in its trading books, rather than a direct holder of debt.
Those exposures are revalued on a daily basis and are reflected in the bank's trading performance, he said.
The ADP employment report showed 48,000 new private-sector jobs were created in July, suggesting that overall non-farm payroll growth last month may be below the 133,000 positions projected in a MarketWatch poll of economists.
Stocks in action
Time Warner Inc. reported a 5.2% profit rise in the latest quarter. Both earnings and revenue beat Wall Street expectations. Its stock ended 3.22% lower.
Kraft Foods Inc. had a 3.7% gain in earnings. The result exceeded analysts' expectations. Its stock closed nearly 1% off.
Citigroup upgraded Apple Inc. to buy from hold, citing Tuesday's 7% pullback in the shares. The broker left its price target unchanged at $160. It said that iPhone and iPod production cuts rumored in Asia should not be a surprise to investors.
Morgan Stanley downgraded Lyondell Chemical Co. to equal-weight from overweight, saying it believes a higher takeout bid for the company is less likely.
The dollar hit an almost four-month low against the yen before bouncing back Wednesday as fears of spreading subprime mortgage market woes led investors to unwind carry trades.
In New York trading, the dollar was quoted at 118.65 yen, vs. 118.55 yen late Tuesday. The euro stood at $1.3707, compared with $1.3683.
Treasurys came under pressure, with the benchmark 10-year Treasury note closing down 3/32 at 98 1/32 with a yield of 4.753%.
Gold futures fell, with gold for December delivery shedding $3.40 to close at $675.90 an ounce on the New York Mercantile Exchange.
By Kate Gibson