Stocks erased losses to end little changed on Tuesday after a Greek government source said the conservative party leader was expected to deliver a letter of commitment to the country's international lenders.
A sign of Greece's commitment to the tough austerity measures demanded by euro zone leaders was a catalyst for buyers to jump into the stock market late in the session.
Euro zone finance ministers are due to hold a telephone conference call on Wednesday about a 130 billion euros bailout to avert a chaotic Greek default.
Late-day moves by stocks are often exacerbated by dealers who are hedging positions.
"There has just been no volume for the last week or so, so you are kind of able to push stocks around a little bit more," said Sam Ginzburg, head of capital markets at First New York in New York.
Follow us
Bank shares, which have been the most affected by developments out of Greece, cut some of their losses.
The Dow Jones industrial average <.DJI> gained 4.24 points, or 0.03 percent, to 12,878.28. The Standard & Poor's 500 Index <.SPX> dropped 1.27 points, or 0.09 percent, to 1,350.50. The Nasdaq Composite Index <.IXIC> edged up 0.44 points, or 0.02 percent, to 2,931.83.
Materials and financials were the worst performing sectors after rising more than 10 percent for the year.
The benchmark index has encountered strong resistance in the 1,355-1,360 area.
"If we don't take out 1,360 on the S&P, the more times we try to take it out and don't, it tells you that we keep making lower highs, which increases the probability that you have your 3, 5, 7 percent selloff," said Ginzburg.
The S&P materials index <.GSPM> lost 1.3 percent as Freeport-McMoRan Copper & Gold fell 3.8 percent to $42.96 and the S&P financial index <.GSPF> slipped 1.1 percent with Citigroup off 2.4 percent to $32.08.
Volume was light with about 6.78 billion shares traded on the New York Stock Exchange, NYSE Amex and Nasdaq, shy of the daily average of 6.96 billion.
Economic data showed a weaker-than-expected gain in January retail sales, which was due in part to discounting in auto sales, but a rebound in an underlying measure of sales pointed to an improving economy.
The S&P retail index <.RLX> gained 0.3 percent after hitting an intraday high of 570.33, the highest level on record for the index.