Stocks rose 3 percent on Wednesday as major central banks jointly added liquidity to the world's financial system, easing worries about a global downturn.

The U.S. Federal Reserve and the European Central Bank as well as the central banks of Canada, Britain, Japan and Switzerland agreed to lower the cost of existing dollar swap lines -- reducing the cost of temporary dollar loans to banks -- by half a percentage point.

Financial, energy, materials and industrial stocks, among those seen most economically sensitive, led gains, though all S&P 500 sectors rose. Bank of America Corp rose 3 percent to $5.22 after hitting a near 3-year low, while JPMorgan Chase & Co added 6.3 percent to $30.36.

I don't see the global economy going into recession. In fact, today's movement by the central banks to inject massive liquidity I think cushions the global economy, said Peter Cardillo, chief market economist at Rockwell Global Capital in New York.

The Dow Jones industrial average <.DJI> was up 393.14 points, or 3.40 percent, at 11,948.77. The Standard & Poor's 500 Index <.SPX> was up 38.68 points, or 3.24 percent, at 1,233.87. The Nasdaq Composite Index <.IXIC> was up 78.57 points, or 3.12 percent, at 2,594.08.

Copper and oil futures also rose sharply.

The S&P materials sector index <.GSPM> gained 4.5 percent.

The central banks' actions were intended to ensure that European banks, facing a credit crunch, have enough funding amid the euro zone's worsening sovereign debt crisis.

The moves followed an unexpected cut in bank reserve requirements in China, intended to boost an economy running at its weakest pace since 2009.

Further encouraging investors, the latest U.S. data suggested the U.S. economy was moving more solidly toward recovery. The U.S. private sector added the most jobs in nearly a year in November, while business activity in the U.S. Midwest grew faster than expected in November.

(Reporting by Caroline Valetkevitch; Additional reporting by Edward Krudy; Editing by Jan Paschal)