Stocks rose in a volatile session Wednesday, as investors welcomed falling oil prices, Cisco Systems' improved profits, and talk of a big share-buyback plan at Microsoft. Stocks fell in the morning as troubled mortgage-finance giant Freddie Mac's big quarterly loss worried investors, but the tone of the market began to improve near midday as oil prices retreated. Stocks rallied in the afternoon. Light sweet crude oil for September delivery fell 59 cents to $118.58 a barrel—a three-month low—on the New York Mercantile Exchange. Prices had been even lower after the weekly U.S. petroleum inventory report showed gasoline supplies fell more than expected and crude supplies grew more than expected. Crude futures have fallen almost 20 percent since peaking above $147 a barrel in mid-July. The U.S. dollar gained versus both the euro and the yen. The Dow Jones industrial average rose 40.30, or 0.35 percent, to 11,656.07. AIG fell ahead of its quarterly earnings report, due after the market's close. Microsoft could buy back up to $20 billion of its stock as a means of boosting its lagging share price. Its shares gained 3 percent. The broader Standard & Poor's 500 index rose 4.31, or 0.3 percent, to 1,289.19. The technology-heavy Nasdaq composite index rose 28.54, or 1.2 percent, to 2,378.37. Cisco reported better-than-expected quarterly sales and profits late Tuesday but also lowered its growth forecast. Still, its shares rose 7 percent. The New York Stock Exchange composite index rose 29.59 to 8,501.44. The American Stock Exchange composite index rose 9.62 to 2,137.75. And the Russell 2000 index rose 4.86 to 725.90.