Stocks rose for a second day on Wednesday after JP Morgan Chase's chief executive said his bank was profitable in January and February, echoing comments by Citigroup's CEO a day earlier.

But the Dow industrials eked out a slim gain as a 7 percent drop in oil prices pushed energy shares like Exxon Mobil Corp lower and limited a broad-market advance.

Jamie Dimon's comments to CNBC television, which reversed a broad decline, came after a speech where he said the bank's bond department had just had its two busiest months ever.

His comments followed similar remarks on profits from Citigroup's Vikram Pandit that on Tuesday spurred Wall Street's biggest rally in nearly four months.

JPMorgan shares rose 4.6 percent to $20.40, while an index of bank stocks <.BKX> climbed 3.1 percent.

Dimon calmed the markets down. He was the voice of reason, said Angel Mata, managing director of listed equity trading at Stifel Nicolaus Capital Markets in Baltimore.

The Dow Jones industrial average <.DJI> gained 3.91 points, or 0.06 percent, to 6,930.40. The Standard & Poor's 500 Index <.SPX> added 1.76 points, or 0.24 percent, to 721.36. The Nasdaq Composite Index <.IXIC> rose 13.36 points, or 0.98 percent, to 1,371.64.

A broker's recommendation that investors buy shares of Hewlett-Packard pushed stocks of computer makers higher and the Nasdaq ended up nearly 1 percent.

HP shares rose 5.8 percent to $28.61, making it the Dow's top advancer.

On Nasdaq, Apple , the maker of MacBook computers and the iPod, jumped 4.6 percent to $92.68. Dell rose 2.5 percent to $8.98.

Apple introduced a smaller version of its popular iPod Shuffle music player on Wednesday with a new feature that enables the user to see what song is playing.

But a drop of 7.4 percent in the price of U.S. front-month crude oil futures drove energy shares lower, limiting a broad-market advance a day after stocks had their best performance since late November. The April crude contract settled at $42.33 a barrel, down $3.38, or 7.4 percent.

Exxon Mobil was among the heaviest weights on the Dow, down 2.4 percent at $65.77. An S&P index of energy shares <.GSPE> slid 1.2 percent.

Trading was active on the New York Stock Exchange, with about 1.74 billion shares changing hands, above last year's estimated daily average of 1.49 billion, while on Nasdaq, about 2.23 billion shares traded, below last year's daily average of 2.28 billion..

Advancing stocks outnumbered declining ones on the NYSE by 3 to 2, while on the Nasdaq, the ratio was even.

(Editing by Jan Paschal)