Stocks rallied on Wednesday, ending a five-day losing streak, as another Chinese stimulus package boosted commodity prices and encouraged investors to jump into energy and natural resource shares.

News that China will increase spending on infrastructure and manufacturing drove oil and metals prices higher, helping to underpin the market after it hit a 12-year low a day earlier. Data also suggested China's economy is recovering.

General Electric was among the few big names to end the day lower. The economic bellwether fell 4.6 percent to $6.69 for its fourth day of losses as investors worried its ailing financial arm could threaten the whole company. GE has fallen 21 percent this week.

Dow component Caterpillar Inc , a big exporter to China and a major seller of equipment to the miners, jumped 13.2 percent to $25.44.

The market has been down so long and gone to levels that a lot of investors thought were cheap or undervalued, said Hugh Johnson, chief investment officer of Johnson Illington Advisors in Albany, New York.

All of the economies are interlinked, so if you can get the first-biggest economy going, the U.S., and the third-biggest economy going, China, then that alone will start bank lending and an increase in the securitization.

The Dow Jones industrial average <.DJI> rose 149.82 points, or 2.23 percent, to 6,875.84. The Standard & Poor's 500 Index <.SPX> gained 16.54 points, or 2.38 percent, to 712.87. The Nasdaq Composite Index <.IXIC> jumped 32.73 points, or 2.48 percent, to 1,353.74.

FEAR BAROMETER DROPS

The day's rally is a modest one, however, compared with declines of more than 21 percent since the beginning of the year for the Dow and S&P. Analysts have said that without stabilization in the financial and housing sectors -- the heart of the economic crisis -- the economy will not be able to improve.

The market is extremely oversold, but with this dire news hanging over everyone's head, it's tough to get anything going, said Stephen Massocca, managing director at Wedbush Morgan in San Francisco.

It's hard to see how we can get going until this bank mess gets cleaned up in any real way.

Wall Street's fear gauge, the CBOE Volatility Index, or VIX,<.VIX>, fell 6.6 percent to 47.56, but it remained up more than 6 percent through the past five days.

In a further effort to shore up the economy, the Obama administration launched a $75 billion foreclosure relief plan that enables struggling homeowners to modify loans even if they are under water. Even so, new data showed one in five homeowners with mortgages owe more than their house is worth.

It was the latest in a slew of efforts to improve credit markets, including Tuesday's program from the Federal Reserve to spur consumer lending.

FINANCIALS STILL A WORRY

The financial group was the only one of the S&P's 10 sectors to finish lower, although it was off the day's lows with the S&P financials index <.GSPF> down 0.8 percent.

Analysts said concerns over the fate of the struggling financial sector remained. Besides GE, the Dow's other four major decliners were all financials, with JPMorgan Chase the biggest drag, down 8.1 percent at $19.30.

Oil prices in New York surged nearly 9 percent to settle at $45.38 a barrel, while the Reuters-Jefferies CRB <.CRB> index of 19 commodity futures jumped 3.8 percent.

Shares of Chevron rose 2.7 percent to $59.28, while miner Freeport-McMoRan Copper & Gold Inc surged 13.4 percent to $32.21.

On Nasdaq, Apple gave the top boost, with a gain of 3.2 percent to $91.17, while Intel Corp rose 3.9 percent to $12.76.

Trading was active on the New York Stock Exchange, with about 1.80 billion shares changing hands, above last year's estimated daily average of 1.49 billion, while on Nasdaq, about 2.36 billion shares traded, above last year's daily average of 2.28 billion.

Advancing stocks outnumbered declining ones on the NYSE by about 4 to 1, while on the Nasdaq, more than two stocks rose for every one that fell.

(Additional reporting by Charlie Mikolajczak; Editing by Jan Paschal)