Stocks Close Higher Amid Fed Action Hopes

Stocks rallied Tuesday amid optimism that the Federal Reserve will announce further steps to help the economy following their two-day meeting, but finished off session highs after reports that a German official said there were no plans to use the EU's rescue fund to buy bonds of troubled countries.

The Dow Jones Industrial Average climbed 95.51 points, or 0.75 percent, to close at 12,837.33, led by BofAand Microsoft .

The S&P 500 rose 13.20 points, or 0.98 percent, to end at 1,357.98. Nasdaq jumped 34.43 points, or 1.19 percent, to finish at 2,929.76.

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

Among the key S&P sectors, materials and financials led the gainers, while telecoms lagged.

Germany's news from the G20 meeting countered an earlier report from The Guardian that said Chancellor Angela Merkel might surrender to market pressure amid rising bond yields in Spain.

The Fed’s two-day meeting starts on Tuesday with an announcement expected on Wednesday afternoon. Last week’s weak jobs data lifted investors’ hopes of an extension to "Operation Twist", the Fed’s effort to drive down long-term borrowing costs by selling short-dated securities. European shares were also higheron the prospect.

“The market is definitely factoring in an extension of Operation Twist—but if you go to statistics, a week after quadruple witching this time of year is generally down [for stocks],” said Richard Ilczyszyn, chief market strategist and founder of IiTrader.com on CNBC’s “Squawk on the Street.” “So I think ultimately, everything’s priced in—you’ll get a little bit of a pop if the market gets what it wants, but you should take that opportunity to sell into the rally.”

In Greece, political leaders raced to build a coalition government led by conservative New Democracy leader Antonis Samaras, that would seek to renegotiate the terms of Greece's 130 billion euro EU/IMF bailout agreement.

Among financials, Bank of America jumped, a day after the bank said it is close to a deal to sell its overseas wealth unit to Julius Baer in a deal valued at between $1.5 billion to $2 billion, sources told CNBC. Shares of BofA have rallied almost 47 percent so far this year.

JPMorgan Chase held their gains after CEO Jamie Dimon testified to the House Committee on Financial Services about the firm's $2 billion trading loss from a failed hedging strategy.

Among techs, Microsoft rallied after the company unveiled its own tablet, called the Surface, in an attempt to win over some market share from Apple's iPad. No pricing details were provided at the time of release. In addition, S&P Capital IQ boosted its rating on Microsoft to "strong buy" from "buy."

Facebook gained near $32 a share after brokerage Susquehanna reiterated its positive rating on the social-networking giant's shares.

Among earnings, FedEx rebounded even after the package delivery company handed in current quarter and full-year guidance that missed estimates.

Discover Financial gained along with the broader market evenafter the credit-card provider reported earnings that fell more than 10 percent.

Oracle rallied after the tech giant posted stronger-than-expected quarterly profit Monday afternoon, releasing the results three days ahead of schedule. CLSA raised its rating on the firm to "outperform" from "underperform."

Adobe is slated to post earnings after-the-bell tonight.

Walgreen said it would buy a 45 percent stakein Alliance Boots for $6.7 billion in cash and stock, in a move that will help the drugstore chain's earnings this year. In addition, Walgreen said it would boost its quarterly dividend to 27.5 cents from 22.5 cents. Meanwhile, shares slumped after the firm missed revenue expectations.

JCPenney plunged to trade near two-year lows after the retailer announced President Michael Francis will be leaving the company. The unexpected move comes as the mid-price department store chain is struggling to win back consumers and reverse plunging sales. At least two brokerages cut their price targets on the company.

On the economic front, housing starts fell 4.8 percent to a seasonally adjusted rate of 708,000 units in May, according to the Commerce Department. But building permits surged to its highest in more than three years.