Stocks End Higher, Nasdaq Positive for Year

Stocks closed higher Tuesday, with the Nasdaq rebounding into the positive territory for the year, as investors bet that Greece will be able to avoid a default on its debt and ahead of a crucial confidence vote in Athens.

The Dow Jones Industrial Average gained 109.63 points, or 0.91 percent, to finish at 12190.01, led by Caterpillar , Alcoa and DuPont .

The S&P 500 rose 17.16 points, or 1.34 percent, to end at 1,295.52. Many strategists are watching 1,360 as the next technical level on the upside for the S&P.

The tech-heavy Nasdaq jumped 57.60 points, or 2.19 percent, to close at 2687.26. Today's move marks the biggest outperformance by the Nasdaq versus the Dow and S&P since mid-October 2010.

The CBOE Volatility Index, widely considered the best gauge of fear in the market, tumbled almost 7 percent to trade below 19.

Most key S&P sectors were higher, led by materials, techs and consumer discretionary.

"Our short-term charts do indicate that we will see a minor rally unfold over the next few days, which we've been experiencing as of late," Michael McGervey president of McGervey Wealth Management told CNBC. "Our intermediate charts are showing a lot of probability that we will see lower prices over the next couple of weeks with the likelihood of rendering into a lull."

Volume was light with the consolidated tape of the NYSE at 3.46 billion shares, while just 851 million shares changed hands on the floor.

Euro zone finance ministers said the Greek government had until July 3 to approve new steps to get the next installment of 110 billion euros. Meanwhile, the market expects a vote of confidencein Greek Prime Minister George Papandreou new cabinet to pass—the first hurdle the government must clear to avert the euro zone's first sovereign debt default. The vote is due around 5 pm ET. The euro gained against the U.S. dollar.

JPMorgan pared gains after the SEC said the bank will pay $153.6 million to settle charges that it misled investors in a mortgage securities transaction as the housing market was starting to decline. Under the settlement, harmed investors will receive all of their money back.

On the tech front, Oppenheimer lowered its price target on Apple to $420 from $450, citing possible delays on the firm's widely anticipated iPhone 5, which would lead to slower September sales. Apple has been trading below its 200-day moving average.

Research In Motion gained after declining almost 7 percent in the previous session. The BlackBerry maker lost a second marketing executive in the latest slew of bad news. The firm's market value has decreased by half this year. Meanwhile, Nokia unveiled a new smartphone that uses an old software that the firm had planned to discontinue.

Meanwhile, Credit Suisse downgraded MotorolaMobility to "underperform" from "outperform."

Citigroup released a note that said it expects pressure on the semiconductor sector through earnings season, but added that it is hopeful for a rebound in August, sending shares of Texas Instruments , Micron and Marvell up more than 2 percent each.

Baidu soared after China Real Estate Information said it will expand its prior agreement to become the exclusive seller of the Chinese Internet giant's real estate advertising product.

Best Buy advanced after the electronic retailer's board agreed to raise the quarterly dividend by 7 percentand approve a buyback plan for $5 billion in common shares.

On the earnings front, Walgreens reported a higher profit, however, shares tumbled to lead the S&P laggards after the drug retailer said it failed to renew an agreement with pharmacy benefits manager Express Scripts .

Barnes & Noble also slipped after the bookstore chain reported a wider-than-expected loss as sales were under pressure from the going-out-of-business sales of bankrupt rival Borders.

Adobe Systems is slated to release its quarterly report after the bell. FedEx and Bed Bath & Beyond are expected to post earnings Wednesday.

WholeFoods jumped more than 6 percent to lead the S&P gainers after the upscale grocer's rating was raised to "outperform" by BMO Capital Markets on Monday.

Oil prices finished mixed amid some profit taking ahead of the expiry of the front-month U.S. crude futures contract. U.S. light, sweet crude gained 14 cents to settle at $93.40 a barrel, while London Brent crude fell 74 cents to settle at $110.95.

Meanwhile, BP advanced after one of the oil company's contractors WeatherfordInternational agreed to pay $75 million to settle all potential claims between the companies from the Gulf of Mexico oil spill.

In M&A news, Israeli electronic security systems maker Visonic said it was in talks to be acquired by Tyco International for $90 to $105 million.

On the economic front, existing home sales sales fell less than expected in May, according to the National Association of Realtors.

Homebuilders including Pulte and Toll Brothers were higher following the news.

The FOMC begins a two-day meeting, with the announcement expected Wednesday afternoon, followed by a new conference from chairman Ben Bernanke. The Fed is expected to cut its growth forecast for 2011, but Bernanke will likely continue to argue the slowdown is temporary.

European shares closed higheramid expectations that policymakers can come up with a solution to save Greece from missing its July debt payment and avoid short-term contagion risk to euro zone peripheral countries.

Coming Up This Week:

TUESDAY: Earnings from Adobe
WEDNESDAY: Weekly mortgage apps, oil inventories, FOMC meeting announcement; Earnings from FedEx, Bed Bath & Beyond
THURSDAY: Weekly jobless claims, new home sales, money supply, Yahoo shareholders meeting; Earnings from ConAgra, Discover Financial, Oracle, Accenture, Micron
FRIDAY: Durable goods, GDP, corporate profits

More on CNBC.com