Stocks gained on Wednesday, boosted by optimism about renewed deal activity and ongoing speculation the Federal Reserve might cut its benchmark interest rate to calm turbulent financial markets.

Investors are increasingly convinced the Fed, the U.S. central bank, will act again sooner rather than later after it surprised markets on Friday by cutting the rate it charges banks to borrow from it. Problems in the risky U.S. subprime mortgage sector spurred sharp declines in world stocks over the past month.

Shares of financial companies such as Merrill Lynch, which have been beaten down by recent market turmoil, rose to a 2-week high. Merrill gained 1.2 percent to $77.04.

E*Trade Financial rose 1.4 percent on a Wall Street Journal report that the online brokerage is in merger talks with peer TD Ameritrade Holding Corp. Investors had feared tightening credit would crimp deal activity.

Lots of people are speculating that the Fed will cut rates, but right now that's very much a controversial discussion, said Linda Duessel, market strategist at Federated Investors in Pittsburgh.

We're having a bounce-back today from very oversold conditions. It has been several days since we've heard any really bad news coming out of the financial sector -- though we shouldn't talk ourselves into the idea that it is over.

The Dow Jones industrial average was up 119.58 points, or 0.91 percent, at 13,210.44. The Standard & Poor's 500 Index was up 14.11 points, or 0.98 percent, at 1,461.23. The Nasdaq Composite Index was up 27.11 points, or 1.08 percent, at 2,548.41.

Material companies' stocks' soared on confidence about the sector after miner BHP Billiton reported solid earnings. The S&P materials index rose 3.1 percent, while shares of Alcoa Inc. rose 4 percent to $36.

In other deal news, Dubai agreed to pay up to $5.1 billion for a 9.5 percent stake in MGM Mirage Inc and half the casino company's CitiCenter hotels and apartments project in Las Vegas. MGM shares gained 7.8 percent to $80.13.

NYMEX Holdings Inc's shares rose 7.6 percent to $127.80 after the parent of the New York Mercantile Exchange said late Tuesday it has held preliminary discussions about a potential merger.

E*Trade rose to $15.78, while TD Ameritrade climbed 3.7 percent to $16.95.

U.S. luxury home builder Toll Brothers said its quarterly profit fell sharply and that tightening credit terms looked likely to shrink the number of potential home buyers.

Toll gave no quarterly outlook given the uncertainty in the mortgage market. Its results beat analysts' average estimate, however, sending the stock up 5.2 percent to $22.17.

On Tuesday, the S&P 500 and Nasdaq rose after a signal that the Fed might be ready to cut its benchmark interest rate muted persistent concerns about withering credit markets.