NEW YORK — Stocks are closing with slight gains after earnings gains from major U.S. companies and reassurance from Fed Chairman Ben Bernanke that there was no "preset course" for ending the bank's massive bond-purchasing program.

The Dow Jones industrial average rose 18 points, or 0.1 percent, to 15,470 Wednesday. American Express and Caterpillar held the Dow back.

The Standard & Poor's 500 rose four points, or 0.3 percent, to 1,680. The Nasdaq composite rose 11 points, 0.3 percent, to 3,610.

The yield on the benchmark 10-year Treasury note fell to 2.49 percent from 2.53 percent.

Toy maker Mattel sank 7 percent to $43.16 after its second-quarter income plunged.

Two stocks rose for every one that fell on the New York Stock Exchange. Trading volume was thin at 3.1 billion shares.