By Kate Gibson, MarketWatch

NEW YORK (MarketWatch) -- U.S. stocks gained on Wednesday, rebounding after the S&P 500 halted an eight-session climb, as Federal Reserve Chairman Ben Bernanke said the rate of bond purchases is flexible.

Stocks mostly stayed in positive terrain as Bernanke answered questions from members of the House Financial Services Committee, and then as the Fed's so-called Beige Book found the economy continuing to grow at a "modest to moderate" pace.

The Dow Jones Industrial Average (DJI) added 16.44 points, or 0.1%, to 15, 468.29, with Bank of America Corp. (BAC) leading blue-chip gains, its shares up 3.2% after the bank said second-quarter profit jumped 63%, beating analyst estimates.

Dow component American Express Co. (AXP) fell 1.3% after the Financial Times cited a draft plan in reporting the European Commission had proposed the introduction of a 0.2% cap on debit-and-credit-card transaction fees.

"The stock market has had a bit of a run here, so we may need to do some trading in a range given the strong gains we had in the spring," said Bruce McCain, chief investment strategist at Key Private Bank.

"A lot of investors are focusing money on the United States, but if we don't get some help from overseas markets, it'll be hard to meet or beat growth estimates for U.S. firms as well," said McCain.

"A lot of what is going on in emerging markets over the course of the second quarter is reflected in a general slowdown," said McCain, who adds some have the mistaken notion that the United States is going to diverge from the path that other global economies are on. "It doesn't seem like we're taking a different boat, if they sink so do we."

Shares of Dell Inc. (DELL) fell 0.8% ahead of a Thursday shareholder vote on a bid by founder and CEO Michael Dell to take the PC maker private.

Intel Corp. (INTC) lost 0.2% ahead of the chip maker's quarterly results, due to be released after Wednesday's close.

Yahoo Inc. (YHOO) gained 10% after the technology company reporting earnings that exceeded estimates. Mattel Inc. (MAT) fell 6.9% after the toy maker reported much weaker-than-expected quarterly results.

Also due to report quarterly results after the market close on Wednesday are EBay Inc. (EBAY), American Express and International Business Machines Corp (IBM).

The S&P 500 index (SPX) rose 5.83 points, or 0.4%, to 1,682.09, with telecommunications and materials pacing sector gains and utilities the sole laggard. The Nasdaq Composite (RIXF) gained 10.83 points, or 0.3%, to 3,609.32.

For every stock falling, more than two gained on the New York Stock Exchange, where 363 million shares traded as of 2:25 p.m. Eastern. Composite volume cleared 2.1 billion.

In testimony on Capitol Hill, Bernanke said the Fed's $85 billion in monthly bond buys are "by no means on a preset course" and can be curbed further or extended, depending on the economic climate. The central bank's stimulus program is meant to keep interest rates down and encourage borrowing.

"The short-term market participants are reading Bernanke's comments dovishly," emailed Marc Chandler, global head of currency strategy at Brown Brothers Harriman.

"Most are resigned to the fact that quantitative easing is going away, so we need to see a transition to enthusiasm about the economy and earnings growth," said McCain at Key Private Bank.

Construction on new homes fell in June, the government said.

Crude futures (CLQ3) added 29 cents to $106.29 a barrel and gold prices (GCQ3) fell 12.90, or 1%, to end at $1,277.50 an ounce in New York.

The dollar (DXY) gained against the currencies of major U.S. trading partners, including the yen (USDJPY).

Treasury yields declined, with the 10-year note (10_YEAR) lately at 2.491%.

On Tuesday, U.S. stocks fell, bringing a halt to an eight-session winning streak for the S&P 500, after a Federal Reserve member urged reduced stimulus and Coca-Cola Co.'s (KO) profit fell.

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

Dell (NASDAQ:DELL)
Historical Stock Chart
Von Jun 2024 bis Jul 2024 Click Here for more Dell Charts.
Dell (NASDAQ:DELL)
Historical Stock Chart
Von Jul 2023 bis Jul 2024 Click Here for more Dell Charts.