Getting your Trinity Audio player ready...

Stocks climbed out of a hole Wednesday, closing higher despite conflicting worries about inflation and economic growth.

Advances by technology stocks, led by an 8 percent rally in the shares of Hewlett-Packard, and energy stocks, reflected in a nearly 2 percent gain by Chevron, helped push stocks higher.

Crude oil continued its assault on triple-digit prices. Oil for March delivery rose 73 cents a barrel, to $100.74, its second straight record-high close, after trading as high as $101.30 during the session.

The Dow Jones industrial average rose 90.04 points, to 12,427.26. Earlier in the session, the Dow was off 109 points, reflecting declines in European and Asian stock markets.

At the close, Hewlett-Packard, International Business Machines and Chevron were the biggest contributors to the Dow’s gain.

AT&T, Boeing and General Motors lost ground. AT&T, Sprint Nextel and Verizon Communications dropped amid what appeared to be a price war for wireless phone services.

The broader Standard & Poor’s 500 index rose 11.25, to 1360.03, led higher by gains in the same energy and technology stocks that powered the Dow’s advance. The Nasdaq composite index added 20.90, to 2327.10, thanks to gains by Research in Motion, Qualcomm, Apple and Oracle.

The Russell 2000 index of small-company stocks closed up 7.68, at 710.02.

New York Stock Exchange trading volume reached 1.47 billion shares, up from 1.42 billion shares Tuesday. Winners outnumbered losers by a 5-3 ratio among NYSE-listed stocks. Nasdaq trading volume totaled 2.26 billion shares, up from 1.94 billion shares Tuesday, as winners topped losers by a 4-3 ratio.

Treasury securities were mixed after the government reported a larger-than-expected increase in January consumer prices.