The Dow Jones industrial average rose 103 points to 12,909 in early afternoon trading Wednesday, overcoming an early deficit of 50 points. The Dow has had a miserable July so far, marking only its third gain for the month on Tuesday.
"Many of the risks — an anemic European economy, a slowdown in Asia — have been factored into earnings expectations," said Talley Leger, investment strategist at Macro Vision Research, an investment consulting firm. "That's why we're seeing positive surprises."
Stocks of homebuilders rose after the government reported that builders broke ground last month on the most new homes and apartments in nearly four years. The 6.9 percent jump brought the number of housing starts to the highest since October 2008. Hovnanian Enterprises was up nearly 1 percent. The news came a day after a gauge of confidence among U.S. homebuilders jumped to the highest level in five years.
In other trading, the Standard & Poor's 500 index rose ten points to 1,374. Amphenol jumped 14 percent, the most in the index, after the maker of electronic cables and connectors reported second-quarter earnings that were higher than analysts were expecting. Amphenol's stock was up $7.40 at $58.76.
A big gain by Intel following its earnings report drove up technology stocks, especially other chip makers. That sector, plus industrials, were responsible for much of the market's gains. The Nasdaq composite climbed 37 points to 2,947.
Other earnings reports weren't as strong. Bank of America reported income that beat most analysts' expectations for the second quarter, but its revenue fell short. Profit declined for both PNC Financial Services Group and the investment manager BlackRock. PNC fell 1.5 percent and BlackRock 0.5 percent.
After the market closed Tuesday, Intel said a slowing global economy cut into its second quarter results. Still, earnings came in ahead of analysts' estimates. Intel's stock was up 78 cents, or 3 percent, at $26.16. Other chip makers followed Intel higher. Qualcomm, which reports earnings after the closing bell Wednesday, rose $1.71 to $56.17 and Texas Instruments rose $1.02to $27.61.
At the start of the earnings season last week, Wall Street analysts expected earnings for S&P 500 companies to fall 1 percent, according to S&P Capital IQ. That would be the first drop in nearly three years. Later in the day, IBM, eBay, American Express and Yum Brands, owner of Taco Bell, KFC and Pizza Hut, report earnings.
So far, several large companies have delivered pleasant surprises in their earnings reports. Honeywell International, a big technology and manufacturing company, reported an 11 percent increase in second-quarter income Wednesday, more than Wall Street was expecting, thanks to higher demand for its products. Honeywell also raised its forecast for full-year profits. Honeywell's stock jumped $3.54 to $58.08.
Another big stock winner Wednesday was Vivus Inc., a drug maker. It rose 16 percent after announcing it got approval from regulators to sell a new weight-loss pill. Doctors consider the pill, Qsymia, the most effective of a new generation of anti-obesity drugs. The company plans to start selling it by the end of the year.
Madison Square Garden's stock lost nearly 1 percent after the owner of the New York Knicks NBA team confirmed that it was losing star player Jeremy Lin to the Houston Rockets. The Knicks said they wouldn't match a three-year, $25 million offer for the player. MSG's stock fell 29 cents to $35.52.
Treasurys prices rose slightly as demand for low-risk assets remained strong. The yield on the benchmark 10-year Treasury note fell to 1.49 percent from 1.50 percent late Tuesday. Germany auctioned $6.14 billion in two-year treasury notes Wednesday with an average interest rate, or yield, of minus 0.06 percent.
Investors are watching Federal Reserve Chairman Ben Bernanke's comments to Congress see if the central bank may be close to launching another round of bond purchases. He has not signaled any new stimulus is imminent, though he did say the Fed was looking at "ways to address the weakness in the economy should more action be needed to promote a sustained recovery in the labor market."
Bernanke is speaking to Congress on his second day of testimony on the state of the economy.