By msnbc.com news services
Stocks were struggling Tuesday, following a report that U.S. consumer confidence unexpectedly fell in January as more Americans worried about the country's weak job market.
Key earnings also drove trading, with shares of Exxon falling and Eli Lilly and U.S. Steel advancing. The results reflected a mixed picture of corporate strength, continuing a trend this earning season.
Hopes built that Greece was nearing a debt swap deal, just a day after talks had stalled, lessening the odds of a messy default and possibly creating other shocks to the region's financial system.
Also, European Union leaders agreed on a stricter budget discipline plan to prevent further debt build-up in the region.
Since December, Wall Street has largely decoupled from European equities, trading less in tandem with the region than in the months before. Investors still looked to developments from the region for any setbacks or signs of progress.
"Europe seems to be closer to a resolution, and while they're not done with their issues, any good news will be taken positively," said Rick Bensigor, chief market strategist at Merlin Securities in New York. "Any sellers at this stage will be tactical, and they're likely to get squeezed here."
The S&P is up 4.4 percent in January, its best month since October, heading into the last trading day of the month. The Dow is up 3.6 percent and has had three straight months of gains. The Nasdaq is up almost 8 percent on strong results from technology companies.
Quarterly profits from drugmakers Pfizer Inc and Eli Lilly & Co both topped expectations. But Pfizer trimmed its 2012 view and Lilly repeated an outlook calling for a drop in 2012 earnings.
RadioShack Corp's stock price plunged one day after warning of a drop in fourth-quarter profit.
A number of other major companies reported results, including Exxon Mobil Corp, U.S. Steel Corp and United Parcel Service Inc.
U.S. single-family home prices fell more than expected in November, according to the S&P/Case-Shiller composite index, highlighting a sector that continues to struggle to make a meaningful recovery. Futures moved little after the data.
U.S. stocks fell for much of Monday's session, but an afternoon rally cut losses in a sign of the underlying resilience the market has shown early in the year. The S&P held above the psychologically important 1,300 level after crossing it for the first time in six months earlier in January.
Reuters contributed to this report.