Stocks fluctuated in thin trading Thursday as investors showed skepticism over Greece's ability to resolve their growing debt crisis and ahead of the quadruple witching at the end of the week.
The Dow Jones Industrial Average gained after skidding almost 1.5 percent in the previous session.
AmEx and Hewlett-Packard led the blue-chip gainers, while JPMorgan and Alcoa slid.
The S&P 500 turned higher, while the tech-heavy Nasdaq remained lower. The CBOE Volatility Index, widely considered the best gauge of fear in the market, jumped almost 10 percent to trade above 23—its highest level since mid-March.
The major indices are struggling to finish the week higher, following six-consecutive losing weeks.
Materials and techs and consumer discretionary led the S&P sector laggards.
"Traders are unwinding their positions ahead of quadruple witching (Friday)," said Alan Valdes, director of floor operations at DME Securities. "Volume is very light today as well."
Quadruple witching is when contracts for stock index futures, stock index options, stock equity options and single stock futures expire. This happens once every quarter, on the third Friday of March, June, September and December.
Valdes added that if the S&P doesn't hold the 1,265 level, the markets could see a further selloff.
"And I think we're going to selloff."
International lenders struggled to save Greece from default. Greek Prime Minister George Papandreou said he would reshuffle the government and would seek a confidence vote in parliament, responding to violent protests in Athens. Meanwhile, there was some chatter that China may provide some sort of European bailout. The Chinese Premier is scheduled to visit Europe later this month. (Read More: 5 Things Investors Need to Know On Latest Greece Crisis)
The euro fell to a three-week low against the dollaramid the political turmoil in greece.
Meanwhile, the main European banking regulator has told the European banks they need to stress the sovereign debt in their portfoliosand financial institution debt in their portfolio, CNBC learned. The banks have six months to raise additional provisions.
Barclays slipped following the news.
Bank stocks including Wells Fargo and JPMorgan turned lower. Citigroup also slipped after the firm said the hacker attack affected about twice as many customers as it had originally estimated.
Capital One gained after the bank won the bid for ING Direct, ING's U.S. online bank.
Shares of Moody's fell to lead the financial sector laggards after Lazard downgraded the ratings agency to "neutral" from "buy."
Among techs, Pandora plunged to trade below its $16 offering priceon its second day of trading. BTIG initiated coverage on the firm with a "sell" rating and a $5.5 price target. Almost three-quarters of the 28 tech IPOs this year are down since their first day close.
Microsoft climbed after the Dow component unveiled a test version of the softwarethat will allow developers to produce games for the company's Kinect gaming device.
Hewlett-Packard sued rival Oracle to force the world's No. 3 software maker to reverse its decision to discontinue the development on Intel's
Meanwhile, Oracle sued Google for "billions of dollars" in a patent lawsuit, according to a court filing. Both stocks were lower.
On the earnings front, food producer Smithfield Foods gained after the nation's largest pork producer reported a better-than-expected profiton higher prices at its two key units, hog production and pork processing.
Kroger advanced after the grocery-store chain posted a higher-than-expected profit and boosted its full-year earnings forecast.
Meanwhile, Finisar sank after the network equipment maker forecast a dismal first quarter, hurt by a continued slowdown in demand from Chinese telecom equipment makers. Rivals JDSU and Ciena also tumbled following the news.
Research In Motion is slated to report earnings after-the-bell.
On the M&A front, Southern Union soared after it agreed to be acquired by rival Energy Transfer Equity for about $4.11 billion to create one of the largest U.S. natural gas pipeline operators.
Stocks were encouraged by a handful of better-than-expected economic news. Housing starts rose more than expected and permits for future construction touched a five month high in May, according to the Commerce Department.
Also, new applications for jobless benefits fell to 414,000 in the latest weekfrom an upwardly revised 430,000 in the week before.
However, markets turned briefly negative after news factory activity in the U.S. Mid-Atlantic region unexpectedly shrank to its lowest level since July 2009 from the month before, in another sign of weakness in the manufacturing sector, according to the Philadelphia Federal Reserve Bank.
And the U.S. current account deficit increased in the first quarter on strong imports, said the Commerce Department. The deficit represented 3.2 percent of U.S. gross domestic product, up from 3.0 percent in the fourth quarter.
European shares hit a three-month low as worries about Greek's debt troubles worsened and investors feared contagion, reflected in Spain's debt auction.
On Tap This Week:
THURSDAY: Fed's Fisher speaks, money supply; Earnings from Research In Motion
FRIDAY: Consumer sentiment, leading indicators, quadruple witching
More on CNBC.com