Stocks rose Wednesday at the end of a volatile session, after the declining U.S. dollar boosted commodity stocks and a rise in U.S. wholesale inventories and an upgrade of 3M provided some optimism to investors. The $700 billion U.S. financial rescue program will be extended until October 2010, Treasury Secretary Timothy Geithner said Wednesday. But the Troubled Asset Relief Program (TARP), originally enacted in October 2008 at the height of the credit crisis, will be scaled back and refocused on newer programs designed to prevent foreclosures and make loans to small businesses. In economic news, wholesale inventories unexpectedly rose 0.3 percent in October, increasing for the first time in 13 months and providing hope that businesses will restock supplies and factories will increase production, aiding the broader economic recovery. The U.S. dollar fell versus the euro and the yen, but its decline did not help commodity prices. Light sweet crude oil for January delivery fell $1.95 to $70.67 a barrel on the New York Mercantile Exchange. Gold for February delivery fell $22.50 to $1,120.90 an ounce, nearly $100 below record highs hit last week. The Dow Jones industrial average rose 51.08, or 0.5 percent, to 10,337.05. Shares of 3M rose 3 percent after its stock was upgraded by a brokerage. Pharmaceutical stocks Pfizer and Merck also gained. Bank of America said it has fully repaid the U.S. government the $45 billion it accepted in rescue money. Its shares were little changed. The broader Standard & Poor's 500 index rose 4.00, or 0.4 percent, to 1,095.94. The technology-heavy Nasdaq composite index rose 10.74, or 0.5 percent, to 2,183.73. The New York Stock Exchange composite index rose 11.36 to 7,067.62. The American Stock Exchange composite index rose 8.56 to 1,767.88. And the Russell 2000 index rose 0.33 to 598.03. --SPA