Stocks Climb Ahead of Close; Techs Drag

Stocks were higher for a third session Wednesday, led by banks, following the Greek vote and a positive pending home sales report.

The Dow Jones Industrial Average gained after briefly dipping into negative territory, following a two-day triple-digit rally in the previous sessions.

The S&P 500 traded above 1,300, while the tech-heavy Nasdaq struggled to stay higher. The CBOE Volatility Index, widely considered the best gauge of fear in the market, tumbled near 17.

The Dow and Nasdaq are on track for their best weekly gains in three months, while the S&P is on pace for its biggest one-week gain since Nov. 2010. However, all three major indices are on pace for their biggest monthly loss since last August.

Among key S&P sectors, financials, energy and materials led the gainers.

Greece's parliament approved a five-year austerity planwith 155 votes in favor and 138 votes against. It must now win approval on Thursday for legislation detailing specific implementation measures for the 28 billion austerity package.

If the second vote passes, release of the loan tranche could be approved by finance ministers on Sunday. The euro gained against the dollar.

Meanwhile, some strategists said they see this opportunity for investors to buy beaten-down stocks in Europe.

Europe is on sale,” Sarah Ketterer, portfolio manager and CEO of Causeway Capital Management told CNBC, adding that European P/E multiples are lower than every other region in the world. “European price-to-book values are as low as they’ve been since 2000 and dividend yields in Europe are higher than any other market….So it all looks fantastic for European equities.”

"Traders moving forward know that the Greece situation is in control," said Todd Schoenberger, managing director of LandColt Trading. "And because it’s in control, they're looking out for the next time bomb, which is nonfarm payrolls [next Friday]."

Financials, down almost 5 percent this year, were the leading sector today. Bank of America jumped after the bank reached a final settlement in which it will pay $8.5 billion in cash to a group of private trustswho say the bank violated its obligations regarding mortgages issued from Countrywide Financial. Meanwhile, S&P Equity raised its rating on the firm to "strong buy" from "hold."

Meanwhile, shares of Visa and MasterCard soared after being halted briefly following the Fed's decision to cap debit card swipe fees at a much higher level than earlier suggested.

Rivals Citigroup , JPMorgan , Morgan Stanley and Goldman Sachs also advanced even after the banks' price targets were cut by KBW.

Oil prices climbedafter a weekly government report showed inventories fell. U.S. light, sweet crude rose $1.88 to settle at $94.77 a barrel, while London Brent crude rose above $110.

Among techs, Microsoft slipped to lead the Dow laggards, a day after the software giant unveiled plans to create an online version of its popular Office program.

Meanwhile, Apple edged higher amid speculation that the tech giant is expected to cut its iPhone 3GS to $0 in conjunction with its iPhone 5 launch, expected in September. According to an RBC note, the approach is intended to "target mid-market smartphone buyers" and counter Android's expansion.

BJ's Wholesale climbed after the retailer agreed to be acquired by private equity firm Leonard Green & Partnersand funds advised by CVC Capital Partners in a deal that values the company at about $2.8 billion. Meanwhile, S&P Equity cut its rating on the firm to "hold" from "buy."

On the earnings front, KB Home tumbled after the homebuilder reported a bigger-than-expected quarterly loss. Pulte and D.R. Horton also slipped.

Monsanto gained after the agribusiness company said its net income skyrocketed nearly 80 percent, thanks to robust sales in its core seeds and genetic traits business.

Family Dollar Stores turned higher even after the retailer posted a lower-than-expected profit. And General Mills also gained even after the food manufacturer forecast weaker earnings ahead amid higher costs for ingredients and fuel.

U.S. Steel and AK Steel rallied to lead the S&P index after Deutsche Bank raised its rating on the steelmaker to "buy" from "hold."

On the IPO front, HomeAway soared on their market debut as investors were drawn to the latest slew of Internet companies.

Treasurys extended lossesafter the government auctioned $29 billion in 7-year notes, which had a high yield of 2.430 percent and a bid-to-cover of 2.62.

In economic news, pending home sales rose more than expected in May, according to the National Association of Realtors. The NAR's Home Sales Index increased 8.2 percent to 88.8, rebounding from April's seven-month low. Economists had expected home resale contracts to rise only 3.8 percent after a previously reported 11.6 percent drop.

Weekly mortgage applications slipped last weekamid weakening demand, even as mortgage rates dropped, according to the Mortgage Bankers Association.

Meanwhile, President Obama said tax cuts for the wealthiest Americans must be endedas part of a deficit deal, which he said he believed Republicans and Democrats would reach. (Watch: Reaction to Obama's Speech)

Obama also said he and Vice President Joe Biden would continue talks with leaders from Congress to reach a deal that would cut the deficit and allow for the debt ceiling to be raised.

European shares hit their highest close in two-weeksfollowing the Greek vote.

On Tap This Week:

THURSDAY: Weekly jobless claims, Fed's Bullard speaks, Chicago PMI, End of QE2, Marathon Oil split takes place
FRIDAY: Consumer sentiment, ISM mfg index, construction spending, Biden's deadline for deficit plan, HP launches TouchPad, auto sales

More on