However, a few disappointments: BB&T, widely considered to be one of the best survivors of the financial crisis, delivered decent net income but reported an increase in troubled loans, and Dow component Travelersfell far short of expectations. The insurance giant attributed its earnings miss to several severe wind and hail storms as well as flooding during the quarter that led to more claims.
Microsoft and Amazon rose ahead of earnings from the tech giants, due out after the bell.
Earnings releases after the bell Wednesday included better-than-expected numbers from Qualcomm, Netflix, and eBay, while Starbucks disappointed with its latest results.
Some heavy-hitters report tomorrow before the bell, including Ford, McDonald's, Verizon and Honeywell.
Existing-home sales gave the market an extra boost: Sales fell 5.1 percentin June after a 2.2-percent drop in May but that was much less than the 8.1-percent decline expected. And the US 30- and 15-year mortgage rates fell to fresh lows in the past weekamid concerns about the economic recovery, according to a survey released by Freddie Mac.
Most stocks in the homebuilding sector, including Beazer Homes and Lennar , rose 2 to 4 percent following the news.
In the day's other economic news, jobless claims climbed 37,000 last week, though continuing claims fell 223,000. And Leading indicators fell 0.2 percent last month, also less than expected, following a 0.4-percent increase in May.
ExxonMobil and Chevron both rose as the oil giants, along with a few other competitors, agreed to pool $1 billionfor a rapid-response joint venture that would be able to deploy equipment to a future oil spill within days and have it operational within weeks.
Oil prices rose more than $2to $79.30 a barrel amid the prospect of bad weather disrupting production in the Gulf of Mexico. Gold prices briefly broke the $1,200 level, before sliding to $1,195.50 an ounceand the dollar tumbled against the euro.
Ford gained nearly 5 percent after the company yanked an asset-backed bond saledue to a wrinkle that came out of financial reform.
Americredit soared more than 20 percent after General Motors announced plans to buy the subprime lender.
AutoNation shares rose more than 5 percent after the nation's largest dealership chain said netincome rose 29 percent, driven by a recovery in sales of new and used cars and trucks.
Mike Jackson, CEO of AutoNation, provided a glimmer of hope in the auto sector, saying he sees a "real, genuine recovery" in the industry. He expects sales to continue climbing, despite the absence of the highly successful Cash for Clunkers program that sent sales soaring a year ago.
In IPO news, shares of prepaid debit-card firm Green Dot and energy efficiency consulting company Ameresco both rose in their market debuts this morning.
Volume was average, with nearly 1.2 billion shares changing hands on the New York Stock Exchange. Advancers outpaced decliners, nearly 7 to 1.
Still to Come:
THURSDAY: Earnings from Amazon, American Express, Microsoft and Capital One after the bell
FRIDAY: EU bank stress-test results; earnings from Ford, McDonald's and Verizon
More From CNBC.com: