Hewlett-Packard and American International Group helped lead U.S. stocks' rebound from a two-day slump, as investors cheered a strong reading on German business confidence.

The Dow Jones Industrial Average advanced 52 points, or 0.4%, to 13931 in midmorning trading, following a 155-point tumble the past two days.

The Standard & Poor's 500-stock index tacked on five points, or 0.3%, to 1507. The Nasdaq Composite Index rose 10 points, or 0.3%, to 3141.

"Any selloff we get is going to be shallow," said Scott Wren, senior equity strategist at Wells Fargo Advisors, which manages $1.2 trillion in St. Louis. "The mentality is, 'I want to wait for the market to pull back so I can buy stocks at lower levels.' The Fed's on our side, companies are making money and the growth environment is OK."

Hewlett-Packard jumped 10%, leading the Dow higher, after the technology company reported a quarterly profit that topped analysts' expectations and gave a better-than-expected earnings forecast.

Financial shares in the S&P 500 led gains across seven of the index's 10 sectors as American International Group gained 3.9%. The insurer reported a surprise operating profit.

European markets were broadly higher, with the Stoxx Europe 600 up 1% to recover most of the sharp losses suffered in the previous session, after data showed German business confidence increased much more than expected in February. That helped offset a prediction by the European Union's official economists that the euro-zone economy will contract in 2013 for the second-straight year.

The Ifo Institute's business confidence index rose to 107.4, the biggest monthly gain since July 2010, from January's 104.3 and above economist estimates of 104.7. Germany's DAX index climbed 0.8%.

Elsewhere, Italy's FTSE MIB index advanced 1.5%. The index had fallen sharply this week to close Thursday at a two-month low ahead of general elections in Italy this weekend, with investors fearing a new government may not continue the country's reformist path.

April crude-oil futures slid 0.3% to $92.60 a barrel, while February gold futures retreated 0.3% to $1,574.70 an ounce. The dollar slipped against the yen but rose versus the euro. The 10-year Treasury note edged up in price to yield 1.967%.

Texas Instruments advanced 4.3% after raising its quarterly dividend by 33% and increasing its stock repurchase authorization by $5 billion.

Abercrombie & Fitch slipped 8% after giving a current-year earnings forecast that lagged analysts' projections and saying it expects to close 40 to 50 stores in the U.S. in 2013.

Vivus dropped 4.4% after the pharmaceutical company said a European Medicines Agency committee backed an earlier decision, in which the committee recommended against approval of the Vivus's weight-loss drug.