By Kate Gibson, MarketWatch

NEW YORK (MarketWatch) -- U.S. stocks posted tepid gains Wednesday, with the S&P 500 up for a ninth session in ten after Federal Reserve Chairman Ben Bernanke said the rate of bond purchases is flexible.

The S&P 500 (SPX) rose 4.65 points, or 0.3%, to 1,680.91, with materials pacing sector gains and utilities the only laggard. The Nasdaq Composite (RIXF) gained 11.50 points, or 0.3%, to 3,610.

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.

Bernanke's comments reinforce "what we already know: that the Fed is looking at the broad economy, which is showing signs of improvement," said Terry Sandven, chief equities strategist at U.S. Bank Wealth Management.

U.S. equities are in a holding pattern as the market digests recent gains, with the pattern likely to persist for another couple of weeks as "we await further guidance from companies and from the Fed," said Sandven, who added that investors will likely learn more about the "timing of the tapering," or reduced Fed asset purchases, at the next Federal Open Market Committee meeting at the end of the month.

The S&P 500 and the Dow Jones Industrial Average (DJI) rose to record closing highs on Monday, but ended lower on Tuesday.

On Wednesday, the blue-chip Dow industrials gained 18.67 points, or 0.1%, to 15,470.52, with DuPont (DD) leading gains.

DuPont's shares rallied 5.3% after CNBC's Andrew Ross Sorkin reported that Nelson Peltz's Trian Fund Management LP has acquired a large stake in the chemicals firm. Asked by Sorkin about the stake at the Delivering Alpha conference on Wednesday, Peltz declined to comment.

Also in the Dow, shares of Bank of America Corp. (BAC) climbed 2.8% after the bank said second-quarter profit jumped 63%, beating analyst estimates.

American Express Co. (AXP) was the top decliner in the Dow, falling 1.9% 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.

Dow component Caterpillar Inc. (CAT) dropped 1.7% after Jim Chanos of Kynikos Associates said he is shorting the stock. Chanos, speaking at the Delivering Alpha conference, said that even though Caterpillar is a major U.S. company, it is facing "super commodity headwinds." Check out MarketWatch's live blog of the Delivering Alpha conference.

On the New York Stock Exchange, more than 676 million shares traded. Composite volume topped 3.1 billion.

"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.

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 continued to grow at a "modest to moderate" pace.

Separately, construction on new homes fell in June, the government said.

"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.

Shares of Dell Inc. (DELL) fell 1.1% 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.4% ahead of the chip maker's quarterly results, due to be released after Wednesday's close.

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

Yahoo Inc. (YHOO) gained 10.3% after the technology company reported earnings that exceeded estimates.

Mattel Inc. (MAT) fell 6.8% after the toy maker reported much weaker-than-expected quarterly results.

Crude futures (CLQ3) added 48 cents, or 0.5%, to $106.48 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%.

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.