The Dow Jones industrial average was up 103.84 points, or 1.01 per cent, at 10,405.85. The Standard & Poor’s 500 Index was up 13.16 points, or 1.22 per cent, at 1,092.54. The Nasdaq Composite Index was up 27.57 points, or 1.26 per cent, at 2,209.44.
Volume continued to be low with 6.99bn shares traded on the combined NYSE Arca, Nasdaq and American Stock Exchanges, significantly lower than last year's daily average of 9.65bn.
Wal-Mart Stores was up 1.9 per cent at $51.38 and Home Depot gained 4.8 per cent to $28.69 on better than expected results.
“There has been a tug of war between weak economic data and strong corporate results. Today, the earnings finally won,” said John Praveen, chief investment strategist at Prudential International Investments Advisers.
With 93 per cent of S&P 500 companies now having reported, earnings grew 38 per cent in the second quarter. Around 75 percent of companies in the S&P 500 exceeded expectations.
Economic data was mixed, however. Industrial production rose and wholesale prices rose, allaying some fears of deflation, but housing starts suggested that sector remains weak. Most economic data in recent weeks have portrayed a slowing recovery, driving investors away from equities.
The materials sector handily outperformed the broad market after BHP Billiton made an unsolicited $39bn takeover bid for Potash. The world's largest fertilizer maker rejected the offer as inadequate.
Potash’s US-traded stock surged 27.7 per cent to $143.17. Fertilizer producer CF Industries jumped 4.7 per cent to $88.53 after Goldman Sachs upgraded the stock, while the materials sector gained 2.3 per cent.
“The increase in M&A shows CEOs and CFOs have more confidence in the outlook for the economy and are willing to start to deploy some of the high cash balances, which have built up in recent months,” said Michael Sheldon, chief market strategist at RDM Financial.