Stocks End Higher, Nasdaq Hits 11-Year High

Stocks closed higher Tuesday, reversing their earlier losses, amid optimism that Greece may be nearing a rescue deal.

The Dow Jones Industrial Average rose 33.07 points, or 0.26 percent, to close at 12,878.20, led by McDonald's and Disney .

The S&P 500 added 2.72 points, or 0.20 percent, to finish at 1,347.05. The Nasdaq gained 2.09 points, or 0.07 percent, to end at 2,904.08, reaching a fresh 11-year high.

The CBOE Volatility Index, widely considered the best gauge of fear in the market, finished below 18.

Among the 10 S&P sectors, utilities posted the biggest gain, while materials lagged.

"Any selloff, no matter how short and shallow is being used as a buying opportunity," wrote Elliot Spar, chief market strategist at Stifel Nicolaus, in his daily note. "It feels like some money managers are still under-invested while those shorting have to take them back when it doesn’t work. Thus, the march higher."

Stocks reversed their losses following reports Greek Prime Minister Lucas Papademos was going to meet with party leaders to discuss a draft bailout agreement. However, a subsequent report said the meeting had been postponed to Wednesday.

The euro rallied against the U.S. greenback, climbing to its highest in about eight weeks.

Meanwhile, protestors took to the streets in Athens to oppose austerity measures as leaders started another round of talks to secure a bailout and avert default. A messy default in Greece could lead to problems for other euro zone countries and hinder the U.S. recovery.

“I’ve been impressed with the markets in the last few weeks—we seem to be desensitized to news in Europe and it’s not having as big of an impact as in the past,” said Mickey Cargile, founder and managing partner of Cargile Investment Management. “It’s a realization that [Europe] doesn’t have as big of an impact on the economy as it once did and we’re making the assumption that some solution will be reached.”

Coca-Cola climbed after the beverage giant reported better-than-expected resultsand announced a new cost-savings program.

Yum Brands rallied to hit an all-time high after the parent company of KFC reported earnings that beat estimates thanks to accelerating sales in China. Rival McDonald's also traded higher.

BP posted earnings slightly above forecastsand a better-than-expected dividend increase. Meanwhile, CEO Bob Dudley told CNBC that the firm's multi-million dollar disposal program—its effort to raise funds which will also help to cover the costs of the Gulf of Mexico oil spill—was on track.

And Toyota Motor climbed after the Japanese automaker reported stronger-than-expected earningsand raised its annual forecast on cost cuts and Japanese government subsidies.

UBS slipped after the Swiss bank predicted further weaknessin investment banking and reported fourth-quarter profit that fell by more than 40 percent.

Disney and Hartford Financial are among companies slated to report after the closing bell. Meanwhile, Wunderlich securities raised its price target on Disney to $43 from $39.

Apple advanced following reports the iPhone maker is in talks to partner with two Canadian telecom firms to launch the iTV, a gadget combining features of the iPad and a television.

Supervalu announced plans to cut almost 800 jobs by mid-February as the supermarket chain continues to reduce overall operating costs.

Mastercard gained after the credit-card provider doubled its quarterly dividend to 30 cents per share.

Meanwhile, Fed Chairman Ben Bernanke renewed his pledge to prevent Europe's financial crisis from damaging the U.S. economy in prepared testimony before Congress that reiterated his remarks from last week. Bernanke maintained a cautious tone on the U.S. outlook.

On the economic front, consumer credit climbed for a second month in a rowin December, rising by $19.31 billion after a $20.4 billion gain in November.

Treasury prices held their lossesafter the government auctioned $32 billion in 3-year notes at a high yield of 0.347 percent and a bit-to-cover of 3.30.

—Follow JeeYeon Park on Twitter: @JeeYeonParkCNBC

Coming Up This Week:

WEDNESDAY: Mortgage applications, oil inventories, Fed's Williams speaks, 10-yr note auction; Earnings from Sanofi, CVS Caremark, Sprint Nextel, Time Warner, Cisco, Groupon, Visa, WholeFoods
THURSDAY: BoE announcement, ECB announcement, jobless claims, wholesale trade, 30-yr bond auction; Earnings from PepsiCo, Rio Tinto, Vodafone, Credit Suisse, Sirius XM Radio, Dunkin' Brands, Petrobras, Activision Blizzard, Expedia, LinkedIn
FRIDAY: International trade, consumer sentiment; Earnings from Barclays

More From