U.S. stocks closed up about 1 percent on Tuesday as investors shook off early negative news out of Greece on hopes of a resolution.
Art Hogan, chief market strategist at Wunderlich Securities, said markets were breathing a "sigh of relief over Greek drama."
The major indices closed in the black for the year, with the Nasdaq leading gains with a 1.09 percent year-to-date gain.
The Dow Jones Industrial Average recovered to trade by as much as more than 150 points higher after falling to single-digit gains on Tuesday morning reports that said the German Finance Minister would not agree to a new Greek debt program on Wednesday.
Also boosting the Dow, Coca-Cola gained about 3 percent after posting earnings of an adjusted 44 cents per share for the fourth quarter, two cents above estimates, with revenue above forecasts as well. Global case volume was roughly in line with estimates.
"Europe sold off on those headlines and came back" to close higher, said Peter Boockvar, chief market analyst at The Lindsey Group. "People still think there's going to be a Greek deal."
Jens Weidmann, head of Germany's Bundesbank, held to an austerity line and told Reuters on Tuesday that Greece needed to make a credible effort to recover itself with tighter public finances and economic reforms.
"Right now we're a bit hostage to the Greek debate and how other countries might unravel their relationship with the (European Union)," said Mark Luschini, chief investment strategist at Janney Montgomery Scott.
Investors are watching closely for a possible Greek debt deal when the euro group of finance ministers meets in Brussels on Wednesday where Greece's Finance Minister Yanis Varoufakis is expected to detail new reform proposals.
The Greek newspaper Ekathimerini reported late on Monday a preview from government officials for a proposal that would create a bridge program with creditors in September.
"This (discussion) is going to be pushed on and on and on," said Martin Schulz, head of PNC Capital Advisors' International Equity Fund. He said Greece would probably stay in the European Union.
Futures touched session highs on speculation that the European Commission could be ready to table a compromise on Greece's bailout program and propose a six-month extension to the country's bailout which is due to end on February 28. The Athens stock exchange was trading up about 8 percent on Tuesday.
The German Finance Minister Wolfgang Schaeuble later said the speculation was "wrong," Bloomberg reported.
Concerns over the Greek debt negotiations continue to weigh on market sentiment. Speaking from Washington, German Chancellor Angela Merkel said she was looking for a "viable recommendation" from Greece on Monday, after Prime Minister Alexis Tsipras reiterated his pledge to end Greece's current bailout Sunday.
Greek concerns sent U.S. stocks lower to close in the red on Monday, despite oil settling higher. On Tuesday, stocks also broke a strict correlation to crude.