Hewlett-Packard had the biggest gain in the Dow and the Standard & Poor’s 500 index. It posted fiscal first-quarter earnings late Thursday that beat all forecasts, a relief after months of bad news for the computer maker. H-P rose $2.10, or 12.3 percent, to $19.20.
Cabot Oil & Gas Corp. was the S&P 500’s second-best performer, jumping a day after reporting earnings that beat analysts’ expectations. It rose $5.95, or 11.1 percent, to $59.81.
American International Group Inc. rose after its fourth-quarter operating results exceeded analysts’ forecasts. The company’s net loss was $4 billion, mainly because of claims related to Superstorm Sandy, in the first full quarter after it finished repaying its $182 billion government bailout. AIG rose $1.17, or 3.1 percent, to $38.45.
The Dow closed up 119.95 points, or 0.9 percent, at 14,000.57 — its third-biggest gain this year. The S&P 500 rose 13.18 points, also 0.9 percent, to 1,515.60. The Nasdaq composite index rose 30.33, or 1 percent, to 3,161.82.
The S&P 500 and Nasdaq closed slightly lower for the week, while the Dow edged higher.
Bill Stone, chief investment strategist with PNC Wealth Management, said he expects stocks to hold up despite this week’s volatility.
“You’re going to get bumps and bruises along the way, but we do believe things are actually getting better, so I think there’s underlying demand” for stocks, Stone said.
Spooked investors sent stocks plunging Wednesday after minutes from the Federal Reserve’s latest policy meeting revealed disagreement over how long to keep buying bonds in an effort to boost the economy. The slide continued Thursday. The Dow lost 155 points over those two days.
Many analysts say the Fed’s bond-buying and resulting low interest rates have driven this year’s stock rally, which lifted indexes to their highest levels since before the 2008 financial crisis. The Dow is now just 164 points below its record close of 14,164 reached in October 2007.
U.S. stocks followed European stocks higher after a survey of German business optimism rose sharply, adding to evidence that the country will avoid a recession. Germany’s economic vitality is crucial for the beleaguered region, offsetting economic contraction in surrounding countries.
“Germany is really the bedrock,” Stone said. “If it gives way, then you have real problems.”
France’s CAC-40 closed up 2.2 percent, Germany’s DAX 1 percent.
Among other stocks moving on corporate news:
— Abercrombie & Fitch sank after a key sales metric declined in the all-important holiday quarter. The stock fell $2.19, or 4.5 percent, to $46.86.
— WebMD Health Corp. soared after the health website operator reported better-than-expected revenue and an optimistic outlook for 2013. The stock rose $4.14, or 25.4 percent, to $20.44.
— Texas Instruments Inc. rose strongly after saying it will increase its dividend by one-third and buy back up to $5 billion more of its own stock. TI gained $1.70, or 5.2 percent, to $34.18.