Stocks rose on Friday as technology and pharmaceutical shares advanced, more than offseting bleak corporate outlooks and fears of inflation.

The Nasdaq briefly added more than 1 percent, but the S&P 500 was near break even as bank shares extended losses.

IBM leads the Dow, Apple boosts Nasdaq.

The Dow Jones industrial average <.DJI> gained 20.23 points, or 0.27 percent, to 7,421.03. The Standard & Poor's 500 Index <.SPX> dropped 0.62 points, or 0.08 percent, to 783.42. The Nasdaq Composite Index <.IXIC> rose 9.95 points, or 0.67 percent, to 1,493.43.

(Reporting by Rodrigo Campos)