The Dow Jones Industrial Average rose 62.51 points, or 0.5%, to 13712.21, recovering from a morning slide of as much as 27 points to rise for the eighth session in nine. The benchmark closed at its highest level since Dec. 10, 2007.
The Standard & Poor's 500-stock index added 6.58 points, or 0.4%, to 1492.56. The Nasdaq Composite Index advanced 8.47 points, or 0.3%, to 3143.18.
"Earnings season is basically in full swing now, and I think that's really what's moving markets," said Richard Sichel, chief investment officer at Philadelphia Trust Co., which oversees $1.8 billion.
DuPont's fourth-quarter profit fell less than analysts had expected. The manufacturer said it expects earnings to rebound in the second half. Its shares gained 83 cents, or 1.8%, to $47.82.
Travelers added 1.64, or 2.1%, to 77.95, one of the biggest gains among Dow components, after the insurer's earnings topped analysts' muted expectations in the wake of superstorm Sandy.
Materials and financial shares led gains across nine of the S&P 500's 10 sectors as Freeport-McMoRan Copper & Gold (FCX),
Asian markets closed mostly lower amid new stimulus measures announced by the Bank of Japan. The Nikkei Stock Average fell 0.4%, erasing earlier gains, after the central bank introduced an open-ended asset-purchase program, but not until 2014, and adopted a 2% inflation target. China's Shanghai Composite Index shed 0.6%.
European markets were little changed. The Stoxx Europe 600 shed less than 0.1%, paring earlier losses after better-than-expected German business-confidence data.
The dollar fell against the yen after the Bank of Japan's moves, and eased versus the euro. Crude-oil prices rose 0.7%, to settle at $96.24 a barrel, while gold added 0.4%, to settle at $1,692.80 a troy ounce. The 10-year Treasury note rose in price to yield 1.835%.
Write to Matt Jarzemsky at email@example.com