Stocks Eke Out a Gain Amid Greek Debt Talks

Stocks squeezed out small gains in a thin, choppy session Wednesday, with the Nasdaq hitting multi-year highs, but gains were limited as Greek debt negotiations came to another halt.

The Dow Jones Industrial Average rose 5.75 points, or 0.04 percent, to close at 12,883.95. BofA was the biggest gainer on the blue-chip index, nudging above the $8 level for the first time since early September. Meanwhile, AmEx dragged on the Dow.

The S&P 500 edged up 2.91 points, or 0.22 percent, to end at 1,349.96. The Nasdaq climbed 11.78 points, or 0.41 percent, to finish at 2,915.86.

Despite the day's lackluster session, all three major indexes have soared more than 20 percent from their early October lows. The blue-chip index is now about 10 percent away from the all-time high it hit in October 2007, while the S&P and Nasdaq are both on track for a sixth week of gains.

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

Among the 10 S&P sectors, banks gained, while energy sagged.

Greek parties are trying yet again to strike a reform dealin return for a new international rescue package to avoid a chaotic default, after a string of delays which have prompted some EU leaders to warn that the euro zone can live without Athens. (Read More: 'Greece Should Default Instantly')

In the latest over the Greek talks, German Deputy Finance Minister Steffen Kampeter criticized Greece, saying the debt-ridden nation has made little progress since 2010 and that there will be no "plan B" for the country.

“Once again, Greece continues to hold the keys on at least the short-term trend,” said Kenny Polcari, managing director of ICAP Equities. “[Stocks] are stuck in purgatory—the market has acted very well since December and for the whole month of January with no real pullbacks and I think we may have gotten ahead of ourselves even though there’s talk about improving macro-economic data.”

Polcari said traders are waiting for further news on the Greek debt deal negotiations.

Caesars Entertainment skyrocketed more than 71 percent on its first day of trading after the casino operator priced its IPO of 1.8 million shares at $9 a share. The company is trading under the "CZR" ticker symbol.

McDonald's posted January sales that beat expectationsat established restaurants across the globe, with robust U.S. performance helping to offset the impact of weakness in Europe.

Among earnings, Walt Disney gainedafter the conglomerate reported earnings that beat expectations, but its revenue missed forecast as attendance at its parks and resorts rose. In addition, at least three brokerages boosted their price targets on the firm.

Sprint Nextel declined after the wireless provider posted a wider lossas costs from the Apple iPhone weighed down the No. 3 U.S. mobile operator.

Time Warner reported better-than-expected profit, thanks to its cable networks and the latest Harry Potter movie.

Buffalo Wild Wings surged after the bar and grill chain posted results that topped expectations as more consumers ate at both its new and existing restaurants. In addition, Wedbush raised its price target on the firm to $90 from $82.

Cisco , Groupon , Visa and Whole Foods are among firms scheduled to post earnings after-the- bell tonight.

Among banks, Morgan Stanley closed higher even after brokerage Collins Stewart cut its rating on the financial giant to "hold" from "buy."

YahooChairman Roy Bostock and three other directors will step down as the struggling company ploughs ahead with an internal overhaul, including discussions on dealing with its stakes in China's Alibaba Group and Yahoo Japan. Meanwhile, S&P Capital IQ reiterated its "strong buy" rating on the search-engine firm.

On the economic front, weekly mortgage applications surged last week, buoyed by increased demand for refinancing as interest rates declined, according to the Mortgage Bankers Association.

Treasury prices held their losses after the government auctioned $24 billion in 10-year notes at a high yield of 2.02 percent and bid-to-cover of 3.05.

—Follow JeeYeon Park on Twitter: @JeeYeonParkCNBC

Coming Up This Week:

WEDNESDAY: Earnings from 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 CNBC.com: